People often struggle to decide what to do based on how they feel. MoodMate solves this by providing instant, personalized recommendations - music, movies, activities - based on the user’s current mood.
MoodMate is a lightweight backend service that generates personalized recommendations (music, activities, and food ideas) based on a user’s mood. Built using Spring Boot, the project focuses on clean backend architecture, REST APIs, validation, and structured error handling.
This project is being built in phases, with gradual complexity — from simple in-memory storage → PostgreSQL → AI-powered sentiment analysis.
Goal: Build the basic backbone of MoodMate without any database.
Focus Areas:
- Create Recommendation model (song, quote, activity, movie)
- Store data in ArrayLists (temporary)
- Build
/recommend?mood=endpoint - Build optional
/recommend/{type}?mood=endpoint - Add validation + basic error handling
- Organize controllers, services, DTOs
Outcome:
A working MVP that returns mood-based recommendations from in-memory data.
📌 API Endpoints
/v1/api/recommendations/all- To get all the recommendations for all the mood types that are currently saves as a list
- It returns a JSON object containing all the moods with music, activities and food
/v1/api/recommendations?mood=?- To get particular mood's recommendations with all - food, activity, and music options
- Example:
/v1/api/recommendations?mood=Happy{ "dining": "Try a new ice cream flavor", "moodType": "Happy", "music": "Upbeat music", "stuffToDo": "Go for a walk in the park" } - Returns an error if the mood is undefined or null
/v1/api/recommendations?mood=saddd{ "error": "Not Found", "message": "No recommendations found for the specified mood type: saddd", "path": "/v1/api/recommendations", "status": 404, "timestamp": "2026-02-10T22:52:36.615475" }/v1/api/recommendations?mood={ "error": "Bad Request", "message": "Mood type cannot be null or empty", "path": "/v1/api/recommendations", "status": 400, "timestamp": "2026-02-10T22:53:15.412611" }
/v1/api/recommendations/{type_of_recommendation}?mood=?- To get one type of recommendation for the specified mood
- Example:
/v1/api/recommendations/dinig?mood=stressed<h1>Order takeout from your favorite restaurant</h1>
- Returns an error in the following cases:
- Mood is undefined or null - output is similar to the above listed examples
- type is undefined
/v1/api/recommendations/musikkkk?mood=stressed
{ "error": "Bad Request", "message": "Invalid recommendation type: musikkkk. \nValid types are: 'music' or 'todo' or 'dining' only.", "path": "/v1/api/recommendations/musikkkk", "status": 400, "timestamp": "2026-02-10T22:58:09.754679" }
mvn spring-boot:runServers run on http://localhost:8080
OR
After running the project, you can check out the Mood Mate AI folder and import the BRUNO files for testing on Bruno App.
Or you can just copy the layout and test it on Postman or whichever API testing tool you are comfortable with.
- Java 21
- Spring Boot 3.x / Web MVC
- Maven
- JSON-based API responses
- Upcoming: PostgreSQL, Spring Data JPA, JWT
- Build basic endpoints
- Custom exception handling
- In-memory recommendations list
- Clean project structure
- Add PostgreSQL
- Add JPA entities and repositories
- Store recommendations in a real database
- Add CRUD “admin” endpoints
- Add mood synonyms
- Add sentiment analysis
- Add fuzzy string matching
- Handle spelling mistakes (“sadd” → “sad”)
- Build a React frontend
- Real-time recommendation fetching
- UI with TailwindCSS
- Deploy frontend (Vercel/Netlify)
- Integrate Gemini/OpenAI
- Detect mood from user text
- Deliver personalized suggestions
- Enable multi-turn conversational flow