Mood Swings is a web app that allows users to track and explore their daily moods. Users can select their mood each day and visit different “towns” based on how they are feeling. Each town offers a unique experience, from sharing happy notes to breathing exercises. Each page also displays a live word cloud showing the current moods of all users. Users can also view mood trends on the dashboard.

Source: Mood Swings amiresponsive
| Wireframe | Implementation |
|---|---|
| App Flow | ![]() |
| Town Map | ![]() |
This project features a FastAPI backend with analytics engine.
MoodType enum / API docs)| Feature | Implementation |
|---|---|
| Home page | ![]() |
| Mood choices | ![]() |
| The Happy Place wordcloud | ![]() |
| Calm-Down Corner | ![]() |
| Calm-Down Corner Breathing excercice | ![]() |
| Calm-Down Corner wordcloud | ![]() |
| UP-SAD Down | ![]() |
| UP-SAD Down funny videos | ![]() |
| UP-SAD Down wordcloud | ![]() |
| Positivity Board | ![]() |
| Mood Tracker | |
| Meet the team | ![]() |
GitHub Projects served as an Agile tool for this project. Through it, User Stories and issues were planned, then subsequently tracked on a regular basis using the Kanban project board.

### Technologies Used
frontend/
├── assets/
│ ├── css/
│ │ ├── calm-town.css
│ │ ├── dashboard.css
│ │ ├── index.css
│ │ ├── happinesstown.css
│ │ └── sadness-town.css
│ ├── js/
│ │ ├── calm-town.js
│ │ ├── dashboard.js
│ │ ├── index.js
│ │ ├── happinesstown.js
│ │ ├── sadness-town.js
│ │ └── client.js
│ └── images/
├── calm-town.html
├── dashboard.html
├── index.html
├── happinesstown.html
├── sadness-town.html
└── 404.html
frontend folderindex.html in your browser💡 We recommend using the Live Server extension in VS Code for the best experience
The site is deployed using GitHub Pages. Visit the deployed site here
To Deploy the site using GitHub Pages:


Copy the URL for the repository.

Manual testing was carried out by the frontend team across Chrome and mobile browsers to ensure all key user interactions work as expected.
| Test | Description | Result |
|---|---|---|
| Navigation links | All nav links route to the correct pages | ✅ Pass |
| Buttons | All buttons trigger the correct actions | ✅ Pass |
| Responsive design | All pages display correctly on desktop and mobile screen sizes | ✅ Pass |
| Mood selection | Users can select their daily mood and are directed to the correct town | ✅ Pass |
| Breathing exercise animation | The animated breathing exercise on the Calm-Down Corner page runs correctly | ✅ Pass |
| Happiness notes form | Users can submit a happiness note (≤100 characters) and it displays correctly | ✅ Pass |
Performance testing was carried out using Chrome DevTools Lighthouse on the deployed site.
| Category | Score |
|---|---|
| Performance | 98 |
| Accessibility | 95 |
| Best Practices | 96 |
| SEO | 100 |

💡 Lighthouse scores were recorded on the deployed GitHub Pages site: https://dima-bulavenko.github.io/mood_swings/index.html
The backend follows a layered architecture:
uv (dependency manager)backend/
├── core/domain/
├── infrastructure/sqlalchemy/
├── service/
├── main.py
├── seed_data.py
├── pyproject.toml
└── mood_swings.db # generated at runtime
| Method | Endpoint | Description |
|——–|———-|————-|
| POST | /users | Create anonymous session |
| POST | /moods?user_id= | Create today’s mood |
| GET | /moods/today?user_id= | Retrieve today’s mood |
| PUT | /moods/today?user_id= | Update today’s mood |
| POST | /notes?user_id= | Create happiness note |
| GET | /notes/latest?user_id= | Get 5 most recent notes from other users |
| GET | /mood-frequency | Top 5 moods |
| GET | /weekly-trend | Mood by weekday |
| GET | /top-happy-words | Top 10 words |
| GET | /user-history?user_id= | 7-day mood history |
This module implements a comprehensive data analytics and machine learning pipeline for the Mood Swings project, handling synthetic mood data from 700 records (50 users × 14 days) stored in SQLite database and CSV format.
mood_swings.db (SQLite)data/mood_swing_data.csvTable: moods
| Column | Type | Description |
| ———– | ———- | —————————————————- |
| id | INTEGER PK | Unique record identifier |
| user_id | INTEGER | References user account |
| mood | TEXT | Mood classification: "happy", "sad", or "calm" |
| tags | TEXT | Optional additional labels relating to the mood |
| town_name | TEXT | Geographic location associated with the mood |
| note | TEXT | Optional user comments |
| hour_of_day | INTEGER | Hour of the day (0–23) |
| day_of_week | INTEGER | Day of the week (0 = Sunday, 6 = Saturday) |
| timestamp | DATETIME | Recording date and time |
Install dependencies and initialize the database with the following steps:
data/mood_swing_data.csvmood_model.joblibassets/wordclouds/{calm-down_corner, happy_place, up-sad_down}.pngPython (Pandas, Scikit-learn, XGBoost, Plotly, WordCloud)
## Future Enhancements
This project was built by the Mood Coders team:
This project utilizes visual assets from the following sources:
Background Textures: All general background images were sourced via iStock.
Homepage Illustration: The main cartoon background was refined and edited using Gemini’s image editing tools to ensure visual consistency and style alignment across the project.