Moodify50 is a custom music streaming platform that leverages the Spotify Web API, Spotify Iframe API, and Spotify OAuth2 to provide a Premium-like experience without ads. The platform is built from scratch, featuring a custom music player that allows users to stream their favorite music without interruptions.
Table of Contents
- User Authentication and Authorization
- Music Recommendation Engine based on your own preferences and moods (energetic, happy, sad, depressed)
- User Profile Management, including Favorite Artists and Genres
- Search Functionality for Songs, Artists, and Genres
- Playlist Management (Create, Add, Rename, Delete)
- Music Playback and Streaming
- Music Controls (Repeat, Shuffle, and Queue)
- View full Lyrics (Synced with song)
The project consists of multiple files and directories, each serving a specific purpose in the overall architecture of the platform. The main directory contains the following subdirectories:
- moodify50: This directory contains the core application files, including the custom music player, API integrations, and user interface components.
- server: This directory contains the server-side code, including API routes, database models, and authentication logic.
- static: This directory contains static assets, such as images, CSS files, and JavaScript files.
- templates: This directory contains HTML templates for the user interface components.
- manage.py: This file contains the application's entry point, responsible for initializing the Django framework and loading the application's configuration.
- settings.py: This file contains the application's configuration settings, including database connections, API keys, and authentication settings.
- urls.py: This file defines the URL routes for the application, mapping URLs to specific views and API endpoints.
- wsgi.py: This file contains the WSGI application object, responsible for serving the application over the web.
- models.py: This file defines the database models for the application, including user profiles, music tracks, and playlists.
- views.py: This file contains the application's views, responsible for handling HTTP requests and returning responses.
- forms.py: This file defines the application's forms, used for user input validation and data processing.
- templates/base.html: This file contains the base HTML template for the application, including the navigation menu and footer.
- templates/index.html: This file contains the index page template, displaying the music player and search bar.
- static/css/style.css: This file contains the application's CSS styles, defining the visual layout and design.
- static/js/script.js: This file contains the application's JavaScript code, responsible for handling user interactions and API requests.
During the development of Moodify50, several design choices were debated and carefully considered. Some of the most significant decisions include:
- The choice of using the Spotify Web API and iframe API to power the music streaming functionality, leveraging the existing infrastructure and expertise of Spotify to provide a seamless user experience.
- The use of Django as the web framework, due to its robustness, scalability, and ease of use. Django's built-in authentication and authorization system was particularly useful in implementing user authentication and access control.
- The use of AJAX for asynchronous requests to the Spotify API, allowing for seamless searching and music playback.
- The use of jQuery for DOM manipulation and event handling, providing a responsive and interactive user interface.
- The use of HTMX for handling search requests, providing a fast and efficient way to retrieve search results from the Spotify API.
- The use of MVT (Model-View-Template) architecture, which separates the application logic into three interconnected components:
- Model: Represents the data and business logic of the application, encapsulating the database models and API integrations.
- View: Handles HTTP requests and returns responses, interacting with the model to retrieve and manipulate data.
- Template: Defines the user interface components, using the data provided by the view to render the HTML templates.
System Requirements:
- Python:
version 3.9+
To get started with this project, follow these steps:
- Clone the repository:
git clone https://github.com/snowby666/moodify50
- Change to the project directory:
cd moodify50
- Install the dependencies:
pip install -r requirements.txt
- Run the development server:
python manage.py runserver
Contributions are welcome! Here are several ways you can contribute:
- Report Issues: Submit bugs found or log feature requests for the
moodify50
project. - Submit Pull Requests: Review open PRs, and submit your own PRs.
- Join the Discussions: Share your insights, provide feedback, or ask questions.
Contributing Guidelines
-
Fork the Repository: Start by forking the project repository to your github account.
-
Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/snowby666/moodify50
-
Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
-
Make Your Changes: Develop and test your changes locally.
-
Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
-
Push to github: Push the changes to your forked repository.
git push origin new-feature-x
-
Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
-
Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
This program is licensed under the GNU GPL v3. All code has been written by me, snowby666.
snowby666/moodify50: Spotify Premium @ Home
Copyright (C) 2024 snowby666
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.