Moodify is a full-stack mood-based music app built with a React frontend and an Express/MongoDB backend. The app uses facial expression detection and user authentication to let users explore and play songs based on their mood.
Live Demo: moodify-beige-kappa.vercel.app
Frontend/- React application built with Vite
- Routes and pages for authentication and the home/music experience
- Expression component for face-based mood detection
- Song player and UI styling with SCSS
Backend/- Express server powering authentication, song data, and file upload/storage
- MongoDB models for users, songs, and token blacklisting
- Middleware for auth and song request validation
- Redis caching and image storage support
- React 19
- Vite for fast development and build tooling
- React Router DOM for client-side routing
- Axios for HTTP requests
- Sass for component styling
@mediapipe/tasks-visionfor face expression or vision-related features
- Node.js with Express 5
- MongoDB via Mongoose for data storage
- JWT (
jsonwebtoken) for authentication tokens bcryptjsfor password hashingcookie-parserfor cookie handlingcorsfor cross-origin supportdotenvfor environment variablesioredisfor caching supportmulterfor file upload handling@imagekit/nodejsfor image storage integrationnode-id3for reading/writing MP3 metadata
- User accesses the React app in the browser.
- Authentication pages allow users to register or log in.
- After login, users can navigate to the home page where mood detection and music playback are available.
- The app likely uses the facial expression utility to detect mood and then fetch recommended songs.
axiossends requests to the backend API for login, registration, and song data.
server.jsloads environment variables and starts the Express server.- API routes are defined in
src/routes/for auth and song-related operations. - Middleware checks authentication tokens on protected endpoints.
- MongoDB stores users, songs, and blacklisted tokens.
- Redis caching may be used to speed repeated data requests.
- Uploaded song or image assets are processed by
multerand stored using the configured storage service.
cd Frontend
npm install
npm run devcd Backend
npm install
npm run dev- Update backend
.envvalues for MongoDB, Redis, JWT secret, and any storage service keys. - The backend uses CommonJS while the frontend uses ES modules.
- Add tests and deployment configuration as needed.