Welcome to Beatify Core! This project is a backend service for a music streaming application that handles music management, user authentication, and streaming functionalities.
- Music Hosting: Store and manage music files.
- User Authentication: Secure user registration and login.
- Music Streaming: Stream music with support for HTTP range requests.
- Music Uploading: Allow users to upload their music.
- Music Fetching: Retrieve music from alternative resources if not available on the platform.
- Music Management: Handles operations related to storing and managing music.
- User Authentication: Manages user accounts and authentication using JWTs.
- Streaming Service: Supports streaming of music files with range requests.
To run this project locally, you need to have Go installed. Follow these steps to get started:
- Clone the repository:
git clone https://github.com/YuanziX/beatify-core.git
- Navigate to the project directory:
cd beatify-core
- Install dependencies:
go mod tidy
Create a .env
file in the root directory of the project and add your environment variables. Example configuration is included in .env.sample
To start the server, use the following command:
make run
- GET /users: Get a list of users (To be protected with RBA).
- POST /user: Create a new user.
- GET /user/{email}/verify: Verify a user's email.
- GET /user/{email}/isVerified: Check if a user's email is verified.
- GET /user/{email}/resendVerificationMail: Resend verification email.
- GET /user/{email}: Get user details by email (protected).
- DELETE /user/{email}: Delete a user by email (protected).
- POST /login: Log in a user.
- GET /logout: Log out a user (protected).
- GET /music: Get a list of available music.
- GET /music/stream?id=n: Stream music file with id n.
If you would like to contribute to Beatify Core, please fork the repository and create a pull request with your changes. Make sure to follow the code style guidelines and add appropriate tests.
This project is licensed under the MIT License.
For any questions or feedback, please contact YuanziX.