{"id":22771396,"url":"https://github.com/ramxcodes/syncify-backend","last_synced_at":"2025-03-30T12:14:14.295Z","repository":{"id":261628461,"uuid":"884878662","full_name":"ramxcodes/Syncify-backend","owner":"ramxcodes","description":"Syncify Backend is a powerful and scalable backend solution for a music streaming platform. It provides robust features such as user authentication, song and album management, real-time communication, and scheduled tasks.","archived":false,"fork":false,"pushed_at":"2024-11-30T12:39:27.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T13:51:15.991Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ramxcodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-07T14:52:14.000Z","updated_at":"2024-11-30T12:39:31.000Z","dependencies_parsed_at":"2024-11-07T15:49:28.909Z","dependency_job_id":"e037fcdc-36b1-4134-afd0-06d4cde0f21d","html_url":"https://github.com/ramxcodes/Syncify-backend","commit_stats":null,"previous_names":["ramxcodes/syncify-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramxcodes%2FSyncify-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramxcodes%2FSyncify-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramxcodes%2FSyncify-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ramxcodes%2FSyncify-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ramxcodes","download_url":"https://codeload.github.com/ramxcodes/Syncify-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314149,"owners_count":20757463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-11T16:13:32.192Z","updated_at":"2025-03-30T12:14:14.278Z","avatar_url":"https://github.com/ramxcodes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🎵 Syncify Backend 🎵\n\n## 🌟 Introduction\n\nSyncify Backend is a powerful and scalable backend solution for a music streaming platform. It provides robust features such as user authentication, song and album management, real-time communication, and scheduled tasks.\n\n`Some Features -`\n\n🎸 Control music playback with next and previous song options \u003c/br\u003e\n🔈 Adjust the volume seamlessly using a slider\u003c/br\u003e\n🎧 Admin dashboard for managing albums and adding new songs\u003c/br\u003e\n💬 Real-time chat integrated within Spotify\u003c/br\u003e\n👨🏼‍💼 Track users' online and offline status\u003c/br\u003e\n👀 View what others are listening to in real-time\u003c/br\u003e\n📊 Collect data for analytics insights\u003c/br\u003e\n\n---\n`Tech Stack -`\n\n[![Tech](https://skillicons.dev/icons?i=nodejs,express,mongodb,js,git,github,vscode)](https://syncify.rocks)\n\n## 📚 Table of Contents\n\n- [🌟 Introduction](#-introduction)\n- [🚀 Installation](#-installation)\n- [🛠️ Usage](#️-usage)\n- [✨ Features](#-features)\n- [📦 Dependencies](#-dependencies)\n- [⚙️ Scripts](#️-scripts)\n- [🔧 Configuration](#-configuration)\n- [📊 API Endpoints](#-api-endpoints)\n- [🙌 Contributors](#-contributors)\n- [📜 License](#-license)\n\n---\n\n## 🚀 Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/ramxcodes/Syncify-backend.git\n   cd syncify-backend\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   npm install\n   ```\n\n3. Set up environment variables:\n   - Create a `.env` file in the root directory.\n   - Define the following variables:\n     ```dotenv\n     PORT=\u003cyour-port\u003e\n     MONGODB_URL=\u003cyour-database-url\u003e\n     ADMIN_EMAIL=\u003cadmin-email\u003e\n     CLOUDINARY_API_KEY=\u003cyour-cloudinary-api-key\u003e\n     CLOUDINARY_API_SECRET=\u003cyour-cloudinary-api-secret\u003e\n     CLOUDINARY_CLOUD_NAME=\u003cyour-cloudinary-cloud-name\u003e\n     NODE_ENV=development\n     CLERK_PUBLISHABLE_KEY=\u003cyour-clerk-publishable-key\u003e\n     CLERK_SECRET_KEY=\u003cyour-clerk-secret-key\u003e\n     ```\n\n---\n\n## 🛠️ Usage\n\n### Start the server\n\n- Development mode:\n  ```bash\n  npm run dev\n  ```\n- Production mode:\n  ```bash\n  npm start\n  ```\n\nThe server will be accessible at `http://localhost:\u003cPORT\u003e`.\n\n---\n\n## ✨ Features\n\n- **👤 User Management:** APIs for user registration, login, and profile updates.\n- **🔑 Authentication:** Secure user authentication using **Clerk**.\n- **🎶 Song Management:** Upload, delete, and fetch songs. Features include:\n  - Trending songs\n  - Personalized recommendations\n  - Featured playlists\n- **💿 Album Management:** Create, delete, and fetch albums, including song associations.\n- **📡 Real-Time Communication:** Enable live chat \u0026 see what others are listening to.\n- **📊 Analytics:** Provide detailed statistics on admin page with number of songs, albums, users, and artists.\n- **📂 File Uploads:** Handle media uploads via Cloudinary with size limits and temporary storage.\n- **⏱️ Scheduled Jobs:** Automatically clean temporary files using `node-cron`.\n\n---\n\n## 📦 Dependencies\n\n### Core Dependencies\n\n- `express` - Web framework\n- `mongoose` - MongoDB object modeling\n- `dotenv` - Manage environment variables\n- `cors` - Enable CORS\n- `socket.io` - Real-time communication\n- `cloudinary` - Media uploads\n- `express-fileupload` - File handling middleware\n- `node-cron` - Cron job scheduling\n\n### Development Dependencies\n\n- `nodemon` - Auto-restart server on changes\n\nCheck `package.json` for the full list of dependencies.\n\n---\n\n## ⚙️ Scripts\n\n- `npm run dev`: Start the server in development mode.\n- `npm run start`: Start the server in production mode.\n- `npm run seed:songs`: Seed the database with song data.\n- `npm run seed:albums`: Seed the database with album data.\n\n---\n\n## 🔧 Configuration\n\n- **Environment Variables:** Defined in `.env` file.\n- **CORS Settings:** Configured for `http://localhost:3000`.\n- **File Uploads:** Temporary files stored in the `tmp` directory with a 10 MB limit.\n\n---\n\n## 📊 API Endpoints\n\n### User Routes\n\n- `/api/users` - Manage users\n- `/api/users/messages` - Retrieve user messages\n\n### Auth Routes\n\n- `/api/auth` - User authentication\n\n### Admin Routes\n\n- `/api/admin` - Admin functionalities\n- `/api/admin/create-song` - Add a new song\n- `/api/admin/create-album` - Add a new album\n\n### Song Routes\n\n- `/api/songs` - Retrieve all songs\n- `/api/songs/trending` - Fetch trending songs\n- `/api/songs/featured` - Fetch featured songs\n- `/api/songs/made-for-you` - Personalized recommendations\n\n### Album Routes\n\n- `/api/albums` - Retrieve all albums\n- `/api/albums/:albumId` - Retrieve album details by ID\n\n### Statistics Routes\n\n- `/api/stats` - Get platform statistics\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framxcodes%2Fsyncify-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framxcodes%2Fsyncify-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framxcodes%2Fsyncify-backend/lists"}