Mochi: AI-Powered Daily Wellness Companion

Inspiration

College stress builds quietly—deadlines, pressure, late nights—rarely as one big moment. We noticed 75% of college students report severe stress, yet existing wellness apps fail with <10% 30-day retention. Why?

When people are stressed, they don't want 15-minute meditations or complex tracking. They want something fast, personal, and immediately helpful.

Our Insight: Wellness isn't about isolated moments—it's about patterns over time and micro-interventions that stick. One bad day doesn't define you, but patterns over 7 days reveal what actually helps.

We built Mochi—a companion that turns 30-second daily check-ins into trend-aware insights and personalized micro-actions (breathing, games, reading, AI chat).

What It Does

Mochi creates a closed feedback loop: emotion → pattern → action → progress.

Core Features

1. Daily Check-Ins (30 seconds)

  • Simple 1-5 mood scale + optional "meltdown" flag
  • One check-in per day feeds all recommendations

2. Multi-Signal Trend Analysis Synthesizes three data streams to find your dominantSignal:

  • Mood scores (7-day average)
  • Stress indicators (meltdown frequency, consecutive low-mood days)
  • Sleep quality (inferred from notes)
If ≥3 days high stress → Focus: STRESS_STEADY_ENERGY
If ≥3 days low mood    → Focus: MOOD_LIFT
If ≥3 days poor sleep  → Focus: SLEEP_SUPPORT
Otherwise              → Focus: BALANCED

3. Adaptive Breathing Plans Plans change based on stress level + usage patterns:

$$ S_{\text{stress}} = 0.7 \cdot S_{\text{survey}} + 0.3 \cdot \left(100 - \frac{t_{\text{usage}}}{210} \cdot 100 - \min\left(30, \frac{t_{\text{breathing}}}{70} \cdot 30\right)\right) $$

  • High stress + low usage: 2-min sessions, 3×/day ("Start small")
  • Medium stress: 5-7 min, 2×/day ("Deepen your practice")
  • Low stress + improving: 10-14 min, 1×/day ("Sustain your flow")

4. AI Pet Companion (Mochi) Powered by NVIDIA NIM, with:

  • Smart mood detection: 100+ keywords across 5 priority levels, handles negation ("not good" → sad)
  • Crisis detection: Safety keywords trigger immediate resources
  • Context-aware responses: References your stress profile + recent check-ins
  • Privacy-first: No stored chat history

5. Therapeutic Mini-Games (15-90s each)

  • Cloud Clearing, Emotion Match, Thought Cloud, Empathy Echo, Kindness Garden, Stigma Smasher
  • XP/leveling system (Seedling → Rooted)
  • Session tracking feeds progress analytics

6. Daily AI Health Recommendations Personalized nutrition/wellness tips based on your dominant signal + 7-day trends (breakfast, lunch, snacks, habit).

7. Progress Dashboard 4-chart carousel: breathing minutes, reading minutes, health actions, game time—all aggregated over 7 days with weekly averages.

How We Built It

Tech Stack:

  • Frontend: React 18 + TypeScript + Vite, Tailwind CSS, Framer Motion, React Router
  • Backend: Express.js + TypeScript, Prisma ORM, PostgreSQL (13 models)
  • AI: NVIDIA NIM API (Nemotron-nano-12b-v2-vl)
  • Auth: JWT in HTTP-only cookies + bcryptjs

Key Technical Implementations:

1. Adaptive Stress Algorithm

stressScore = 0.7 × surveyScore + 0.3 × (usageScore - breathingBonus)
// 70% self-report + 30% behavioral data + breathing reward

2. Trend Detection Compares current vs. previous week (±5 threshold filters noise):

if (delta >= 5) → 'UP' (stress increasing)
if (delta <= -5) → 'DOWN' (improving)
else → 'FLAT' (stable)

3. Idempotent API Design

  • Health recommendations: unique constraint on (userId, date) prevents duplicates
  • Game sessions: server-side duration calculation handles incomplete sessions
  • Session tracking: indexed on (userId, createdAt) for <200ms queries

4. AI Safety + Efficiency

  • Crisis keywords detected before AI call → immediate resources
  • Compact context (7 days only = 200 tokens vs. 2000+)
  • Fallback to mood-based responses if API fails
  • No stored chat history (privacy-first)

Challenges We Faced

1. Real-Time State Synchronization

Problem: Timer UI didn't update after sessions completed; game data showed stale state if user closed without clicking "End."

Solution:

  • Created ReadingStatsContext for centralized state
  • Interval cleanup pattern (useEffect with return cleanup)
  • Server-side duration calculation: (endedAt - startedAt) / 1000
  • localStorage persistence for incomplete sessions

2. AI Integration Without Breaking Core Product

Problem: NVIDIA NIM has latency (2-5s), rate limits (100/day), and costs ~$0.002/message.

Philosophy: AI is an enhancement, not a dependency. Core loop (check-in → trends → actions) works even if AI fails.

Solutions:

  • Graceful degradation: Fallback to mood-based canned responses
  • Client-side mood detection: 100+ keywords run in <1ms for instant feedback
  • Caching: Weekly stress profile stored in DB, not recalculated per message
  • Cost optimization: 7-day context window (200 vs. 2000 tokens), compact prompts

Result: App fully functional without AI; AI adds ~30% engagement lift when available.

3. Privacy + Personalization Balance

Challenge: Users want insights but worry about mental health data privacy.

Approach:

  • Local-first mood detection (no API call for keywords)
  • No stored chat history (stateless AI chat)
  • Only aggregate stats saved (no free-text journals)
  • GDPR-compliant account deletion

What We Learned

1. Personalization Builds Trust—But Only If Accurate

When Mochi says "you've had 3 high-stress days, but your 45 minutes of breathing is working"—engagement spikes. Generic advice ("try meditation") when you've already done 60 minutes of breathing? Trust erodes.

Key: Personalization = demonstrating awareness of their journey, not just using their name.

2. Trends Beat Snapshots—If Actionable

One stressed day? Not urgent. 4 consecutive days + declining usage? That's a signal.

Actionable Insight Formula: $$\text{Insight} = \text{Pattern} + \text{Context} + \text{Next Best Action}$$

Instead of raw charts, we built: "Your stress is up 12 points. Try 2-min sessions, 3×/day based on your pattern."

3. UX Stability > Feature Quantity

We built 8 mini-games; 2 had buggy timers. Users preferred 6 polished games over 8 half-working ones.

Lesson: A broken timer makes users question if their data is even being saved. Every feature now has error states + 3-failure-mode testing.

4. Data Models Are Product Decisions

Choosing WeeklyStressProfile vs. DailyStressScore shaped our narrative:

  • Weekly filters noise ("one bad day doesn't define you")
  • Enables trend detection (UP/DOWN/FLAT)
  • Matches user mental model ("How was your week?")

Tradeoff: Can't show intra-week shifts. We chose simplicity + stability.

What's Next

Short-Term:

  • Enhanced recommendation explanations ("why this suggestion today")
  • Monthly summaries + correlation insights ("mood improves 30% on breathing days")
  • 4 more mini-games, expanded reading library (50 stories)
  • Anonymous support groups + peer encouragement

Long-Term:

  • Privacy controls (data export, toggle AI usage)
  • Wearable integration (HRV stress detection, calendar reminders)
  • Therapist dashboard (opt-in trend sharing, crisis alerts)
  • Research partnerships (validate efficacy with RCTs)

Accomplishments We're Proud Of

Multi-signal trend synthesis combining mood + stress + sleep + usage into actionable insights ✅ Adaptive algorithms that actually change recommendations (not just different messages) ✅ AI with safety + efficiency: Crisis detection before AI call, 200-token context window, <1ms client-side mood detection ✅ Idempotent API design prevents duplicate AI charges and data corruption ✅ <200ms aggregation across 4 dimensions over 7 days (tested with 1000 sessions)


Built With

Frontend: React 18 • TypeScript • Vite • Tailwind CSS • Framer Motion Backend: Express.js • TypeScript • Prisma ORM • PostgreSQL AI: NVIDIA NIM API (Nemotron-nano-12b-v2-vl) Auth: JWT (HTTP-only cookies) • bcryptjs


Mochi: 30 seconds daily. Personalized insights. Real support.

Built With

Share this project:

Updates