Backend logic for login # and storing history/liked
Report Bug
.
Request Feature
- Table Of Contents
- About the Project
- Built With
- Getting Started
- Routes
- Dummy data
- License
- Todo
- Authors
This repo contains the backend logic for Muxik, including login, register, forget password, update profile, adding songs to history, adding liked songs, and many more functionalities.
Muxik backend api is built using express , Mongodb , JWT and Nodemailer
Git is a distributed version control system used for software development. It allows multiple developers to work on the same codebase simultaneously, keeping track of changes and managing versions. It also enables users to revert changes and collaborate more effectively.
NodeJs is a JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to execute JavaScript code outside of a web browser, making it possible to create server-side applications with JavaScript. Node.js is fast, lightweight, and scalable, making it popular for building modern web applications.
Thunder Client is a lightweight Rest API client extension for VS Code
Rename env.example to env and fill the values
⚠️ Note: MongoDb memory server can be used by changing the config inside Database.js
git clone https://github.com/ShivaBhattacharjee/Muxik-backend
cd Muxik-backend
npm install
To start in development mode
npm run dev
Or
npm start
sudo docker run -p <your-port-number>:3000 \
-e MONGODB_URI=yourmongodburi \
-e JWT_SECRET=yourjwttoken \
-e EMAIL_ID=youremail \
-e EMAIL_PASSWORD=yourpassword \
immashiva/muxikapi:latest
sudo docker run -p 8080:3000 \
-e MONGODB_URI=yourmongodburi \
-e JWT_SECRET=yourjwttoken \
-e EMAIL_ID=youremail \
-e EMAIL_PASSWORD=yourpassword \
immashiva/muxikapi:latest
⚠️ Note: Bearer Token can be obtained after successfull login
Endpoint | Method | Bearer Token |
---|---|---|
api/validation/register | POST | No |
api/validation/verify-register | POST | No |
api/validation/resend-email | POST | No |
api/validation/reset-password | POST | No |
api/validation/confirm-reset-password | POST | No |
api/validation/# | POST | No |
⚠️ Note: Routes remain the same for both liked and history requests; the method used will determine which function triggers the database queries. The queries depend on the username obtained from the bearer token.
Endpoint | Method | Bearer Token |
---|---|---|
api/user/liked-songs | GET | Yes |
api/user/history | GET | Yes |
api/user/user-info | GET | Yes |
Endpoint | Method | Bearer Token |
---|---|---|
api/user/liked-songs | POST | Yes |
api/user/history | POST | Yes |
api/user/user-info | POST | Yes |
Endpoint | Method | Bearer Token |
---|---|---|
api/user/liked-songs | DELETE | Yes |
api/user/history | DELETE | Yes |
Endpoint | Method | Bearer Token |
---|---|---|
api/user/user-info | PUT | Yes |
{
"username" : "user",
"password" : "password",
"email" : "email@gmail.com",
"profile" : "thisIsImage"
}
{
"email" : "email@gmail.com",
"verificationCode" : "code"
}
"email" : "email@gmail.com"
⚠️ Note: Only users verified via otp can login
{
"username":"user",
"password" : "password"
}
{
"email": "email of registered user"
}
{
"email": "email@gmail.com",
"otp": "otp",
"newPassword": "new password"
}
{
"username": "user",
"songId": "1234",
"songName": "test song",
"banner": "https://example.com/song_banner.jpg"
}
{
"songId" : "song id"
}
{
"username": "user",
"songId" : "1234",
"songName" : "test song",
"banner" : "https://example.com/song_banner.jpg"
}
{
"songId" : "song id"
}
{
"username" : "new username"
"profile" : "new profile"
}
Distributed under MIT License . See LICENSE for more information.
- ✅ Register and verify
- ✅ OTP Resend
- ✅ Login
- ✅ Get User info
- ✅ Update user profile
- ✅ Reset Password
- ✅ custom email for register account and reset passowrd
- ✅ Verify Reset password
- ✅ Liked Songs
- ✅ History
- ❌ Custom Playlists
- ✅ Code Refactoring
- Shiva Bhattacharjee - Shiva Bhattacharjee