Skip to content

Commit

Permalink
✨ Add list downloads and Spotify integration 🎢
Browse files Browse the repository at this point in the history
- Added support for listing downloads in progress and completed tasks πŸ“œ
- Integrated Spotify API to allow track and playlist downloads from Spotify 🎧
- Enhanced download task tracking and status updates πŸ“ˆ
  • Loading branch information
adelelawady committed Oct 30, 2024
1 parent cab1b45 commit f79e566
Show file tree
Hide file tree
Showing 118 changed files with 4,287 additions and 430 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,6 @@ Desktop.ini
/.nyc_output/
rootFolder
plugins
output_folder
mongodb
output_folder
134 changes: 133 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
🎢 BeatStream

BeatStream is a powerful music streaming and management application built using **JHipster** and Java. It allows users to download tracks and playlists from popular platforms like YouTube, SoundCloud, and Spotify. BeatStream also lets you upload your own songs, create a personalized library of tracks and playlists, and manage your music collection seamlessly. 🎧

## Features

- πŸ“₯ **Download Music:** Easily download tracks and playlists from YouTube, SoundCloud, and Spotify.
- πŸ“€ **Upload Your Own Songs:** Add your personal music tracks to your library.
- πŸ“š **Library Management:** Create and manage a comprehensive library of songs and playlists.
- πŸ“Š **Download Tracking:** Keep track of your downloads, including their progress and status.
- πŸ”„ **Task Downloads:** Queue multiple downloads and manage them efficiently.
- πŸ› οΈ **Powerful Tools:** Utilizes **yt-dl** for downloading, **ffmpeg** for audio processing, and **ChromeDriver** for web automation.

## Technologies Used

BeatStream is built using:

- **Java** for the backend.
- **Spring Boot** for building the application.
- **JHipster** for rapid development and scaffolding.
- **Angular** (if applicable) for the front end.
- **MongoDb** (or your preferred database) for data persistence.

## Requirements

To run BeatStream, you will need:

- β˜• Java Development Kit (JDK) 11 or later
- πŸŽ₯ **yt-dl:** A command-line program to download videos from YouTube and other sites.
- 🎡 **ffmpeg:** A tool to handle multimedia files and streams.
- 🌐 **ChromeDriver:** For automating Chrome browser actions.
- **Node.js** and **npm**
- πŸ±β€πŸ **MongoDB:** Ensure that you have MongoDB running, as BeatStream uses it for data storage.

## Installation

1. πŸ› οΈ **Clone the repository:**
```bash
git clone https://github.com/adelelawady/beatstream.git
cd beatstream
2. run
./mvnw
```

# Usage

πŸš€ Access the application:
Open your web browser and navigate to http://localhost:8080.
πŸ“– Follow the on-screen instructions to download tracks, upload songs, and manage your library.

# API Documentation

For API documentation, visit http://localhost:8080/swagger-ui/.

# Contributing

🀝 Contributions are welcome! If you have suggestions for improvements or new features, feel free to fork the repository and submit a pull request.

# License

πŸ“ This project is licensed under the MIT License - see the LICENSE file for details.

# beatStream

This application was generated using JHipster 8.7.1, you can find documentation and help at [https://www.jhipster.tech/documentation-archive/v8.7.1](https://www.jhipster.tech/documentation-archive/v8.7.1).
Expand Down Expand Up @@ -67,7 +129,7 @@ JHipster ships with PWA (Progressive Web App) support, and it's turned off by de
The service worker initialization code is disabled by default. To enable it, uncomment the following code in `src/main/webapp/app/app.config.ts`:

```typescript
ServiceWorkerModule.register('ngsw-worker.js', { enabled: false }),
ServiceWorkerModule.register('ngsw-worker.js', { enabled: false });
```

### Managing dependencies
Expand Down Expand Up @@ -271,3 +333,73 @@ To configure CI for your project, run the ci-cd sub-generator (`jhipster ci-cd`)
[Leaflet]: https://leafletjs.com/
[DefinitelyTyped]: https://definitelytyped.org/
[Angular CLI]: https://cli.angular.io/

### Angular Core Libraries

- **@angular/common**: Core common utilities 🌐, includes common directives like NgIf and NgFor, as well as pipes for handling dates, currency, and more.

- **@angular/compiler**: Essential for Angular template compilation πŸ› οΈ, allowing HTML and Angular directives to render as interactive elements.

- **@angular/core**: The heart of Angular's framework 🧩, including essential services and modules.

- **@angular/forms**: Handles forms and form validation πŸ“, managing both reactive and template-driven forms.

- **@angular/localize**: Localization support 🌍, enabling the app to support multiple languages.

- **@angular/platform-browser** and **@angular/platform-browser-dynamic**: Provide DOM interactions πŸ–±οΈ and template compilation on the browser.

- **@angular/router**: Routing and navigation 🧭, handling URL routing for a single-page application structure.

### Capacitor Plugins

- **@capacitor/android**, **@capacitor/cli**, **@capacitor/core**, **@capacitor/ios**: Facilitate mobile functionality for both iOS and Android πŸ“±, enabling native functionality access, like file storage, notifications, and more.

### FontAwesome Libraries

- **@fortawesome/angular-fontawesome**: Angular component library for FontAwesome icons 🎨, allowing easy integration of scalable icons.

- **@fortawesome/fontawesome-svg-core** and **@fortawesome/free-solid-svg-icons**: Core FontAwesome SVG support πŸ–ΌοΈ, providing a vast collection of icons for UI components.

### Translation and Localization

- **@ngx-translate/core**: Core translation module 🌐, enabling dynamic translation handling.

- **@ngx-translate/http-loader**: Allows loading translation files via HTTP requests πŸ“‚, making it simple to manage and update language files.

### UI Frameworks

- **@ng-bootstrap/ng-bootstrap**: Integrates Bootstrap into Angular πŸ–ŒοΈ, enabling styled components like modals, alerts, and accordions.

- **bootstrap** and **bootswatch**: Bootstrap library and themes 🎨, providing pre-designed styles and UI components.

- **@popperjs/core** and **popper.js**: Handle positioning of tooltips and pop-ups πŸ—‚οΈ, essential for creating interactive UI elements.

### File Handling

- **ngx-file-drop**: Allows drag-and-drop file upload functionality πŸ“₯, enabling users to upload files by dragging them into a specified area.

### Media Playback

- **ngx-plyr** and **plyr**: Video and audio player support 🎢, providing customizable and lightweight media player features.

### Utilities and Functional Libraries

- **dayjs**: Lightweight date library πŸ—“οΈ, ideal for date and time manipulation.

- **jquery**: General DOM manipulation library ✨, enhancing the functionality of traditional JavaScript.

- **rxjs**: Reactive programming support πŸ”„, offering observables that handle asynchronous data streams.

- **tslib**: Utility library for TypeScript πŸ”§, minimizing bundle size and supporting helper functions.

- **zone.js**: Execution context manager πŸ”, crucial for handling async operations and change detection in Angular.

### Infinite Scrolling

- **ngx-infinite-scroll**: Provides infinite scroll functionality πŸ”„, enabling content to load dynamically as the user scrolls.

### WebSocket and Real-time Communication

- **@stomp/rx-stomp**: Manages STOMP messaging over WebSockets πŸ”—, allowing real-time data communication.

- **sockjs-client**: Provides a WebSocket fallback 🌐, maintaining connection stability even when WebSocket isn’t supported.
101 changes: 101 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore

# Built application files
*.apk
*.aar
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/

# Google Services (e.g. APIs or Firebase)
# google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

# Version control
vcs.xml

# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/

# Android Profiling
*.hprof

# Cordova plugins for Capacitor
capacitor-cordova-android-plugins

# Copied web assets
app/src/main/assets/public

# Generated Config files
app/src/main/assets/capacitor.config.json
app/src/main/assets/capacitor.plugins.json
app/src/main/res/xml/config.xml
2 changes: 2 additions & 0 deletions android/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build/*
!/build/.npmkeep
54 changes: 54 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apply plugin: 'com.android.application'

android {
namespace "com.konsol.beatstream"
compileSdk rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.konsol.beatstream"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
implementation project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
}

apply from: 'capacitor.build.gradle'

try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}
19 changes: 19 additions & 0 deletions android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN

android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {


}


if (hasProperty('postBuildExtras')) {
postBuildExtras()
}
21 changes: 21 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.getcapacitor.myapp;

import static org.junit.Assert.*;

import android.content.Context;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {

@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

assertEquals("com.getcapacitor.app", appContext.getPackageName());
}
}
Loading

0 comments on commit f79e566

Please sign in to comment.