Inspiration
We started with a simple question: what if the moment you write “I feel off,” something kind and practical met you there? Mindful Harmony grew from our own need for small, realistic help on busy days. We wanted a companion that listens without judgment, reflects our feelings back clearly, and suggests one tiny step we can actually take right now.
What it does
Mindful Harmony combines journaling, music, and micro-actions. You can type or speak a short entry. The app offers an empathetic reply, names a likely emotion, and suggests one quick action such as a one-minute breathing exercise. If you want sound to guide the mood, it builds a Spotify playlist tuned to energy, tempo, and valence. You can also see gentle trends and share light support with friends.
How we built it
The frontend is a React single-page app that talks to a Flask API. The backend uses MongoDB Atlas with indexes on users and entries for fast queries. Gemini handles text analysis and reply generation, and Spotify powers recommendations and playlist creation. Authentication relies on short-lived JWTs. We designed the UI to feel calm and respectful: generous spacing, clear hierarchy, and micro-interactions only where they help.
Challenges we ran into
Spotify occasionally returned 403 or 404 during development. The fixes were practical: add the tester account in the dashboard, ensure the exact redirect URI, loosen over-constrained recommendation filters, prefer market=from_token, and avoid VPNs or proxies that break calls. We also removed deprecated Mongo options and compared database handles with is not None to prevent subtle Python errors. On the design side, we iterated away from a glossy “AI look” toward something quieter and more human.
Accomplishments that we're proud of
- Shipped an end-to-end MVP: journaling + AI reply + mood playlists.
- Gemini wired reliably: strict JSON + safe fallbacks so it never stalls.
- Spotify working: OAuth + playlist creation; fixed 403/404 with proper config.
- Calm, accessible UI: clean layout, readable typography, no “AI-generated” feel.
- Solid backend: Flask + MongoDB Atlas with indexes, health checks, and CORS done right.
- Safety & privacy: non-clinical tone, crisis resources, journals private by default.
What we learned
OAuth is unforgiving about redirect URIs and who is allowed to test. Network issues can masquerade as API failures, so a minimal diagnostics route saves time. CORS needs explicit, kind handling of preflight requests. Most of all, short caring replies plus a single next step help more than long advice.
What's next for Mindful Harmony
We want mood-specific companions (coach, listener, cheerleader), on-device voice for private journaling, richer trend insights with user consent, and offline-first notes that sync when a connection returns.
Log in or sign up for Devpost to join the conversation.