How ankitjakhar123/soundlink-project works
Project type and purpose
• This is a full-stack, Progressive Web App (PWA) music streaming platform called SoundLink.
• Frontend: React + Vite + TailwindCSS, served (e.g., via Netlify) as a PWA.
• Backend: Node.js + Express API, MongoDB (Mongoose), JWT-based auth, Cloudinary for media.
• Additional services: health-ping micro-service, CI health-check workflow, Dockerfile for containerization.
File structure
• Top-level:
• .github/workflows/health-ping.yml – CI job to ping or health-check the service
• SoundLink Frontend/ – React/Vite PWA code
• SoundLink Backend/ – Express server, Dockerfile, ping-service, package.json
• Frontend:
• public/ – static assets, manifest.json, service worker hooks
• src/components – UI components (Pages, Player, Admin, Layout, etc.)
• src/context – React Context providers (AuthContext, PlayerContext, RadioContext)
• src/utils – API wrappers (axios), PWA helpers, SEO config, YouTube integration
• Backend:
• src/routes → express.Router definitions per resource (user, song, playlist, search, analytics, etc.)
• src/controllers → business logic and request handling
• src/models → Mongoose schemas (User, Song, Album, Playlist, Favorite, Play, Comment, MovieAlbum, userSettings)
• src/middleware → auth check, file upload (multer), request validation
• src/config → external service configs (MongoDB, Cloudinary)
• src/utils → keepAlive (prevents idle dynos), swagger.js for API docs
• ping-service.js → simple service to expose health endpoint
• Dockerfile – container definition
Key insights from README
• Frontend communicates over REST with backend via Axios; uses React Router, Context API, Framer Motion.
• Backend exposes CRUD endpoints for content, authentication, analytics; secures with JWT, rate limiting, CORS.
• MongoDB stores all persistent data; Cloudinary stores audio files and user avatars.
• PWA integration via Vite PWA plugin, Workbox; offline caching, installable app.
Detailed coverage
• PWA offline cache layer (service worker intercepts static assets and API calls).
• Backend layers:
[Routes] → [Auth Middleware / Multer / Validation] → [Controllers] → [Models]
• Endpoints: /auth, /songs, /playlists, /search, /analytics, /favorites, /admin/*