Inspiration
Most personal tracking apps force an uncomfortable trade-off: either they feel like stressful spreadsheets that punish missed days with broken streaks, or they send your most private daily data — budgets, medication doses, weight, sleep, and journal notes — straight to cloud LLMs.
We wanted Mellow to feel like a calm, sunlit room instead of a productivity dashboard: one offline-first sanctuary for habits, workouts, study plans, budgets, medications, and health metrics, powered by Milo — a consent-gated hybrid AI companion that thinks on your device by default and only escalates to the cloud when a job genuinely needs it and you say yes.
What it does
Mellow models every kind of personal goal inside one recursive target engine (checklists, numeric targets, stay-under budgets, reach-down-to goals, multi-level plans, and reminder slots):
- Milo — Consent-Gated Hybrid AI Companion: Log expenses, workouts, and medications in plain language or voice ("Spent $15 on lunch, Lat pulldown 10 kg × 12, took my 2 pm antibiotic"), ask how your week went, or build a multi-week plan from scratch. Every automatic change comes with instant Undo, ambiguous requests return tappable disambiguation choices, and every reply visibly shows whether it ran on-device or in the cloud.
- Transparent Cloud Consent & Privacy Lock: Users choose Ask each time, Always allow, or Never, on-device only. When a complex job like Plan Builder needs the cloud, Milo pauses and shows exactly what would be sent (
Allow once,Always allow, orNot now). - Calm Clay Sanctuary UI: Full-bleed 3D matte clay room scenes (Home, Gym, Bedroom, Office, Outdoor, Club) with frosted glass sheets, a responsive two-column layout on Web/tablets, pull-to-talk offline voice on iPhone, note photos, and zero guilt-tripping streak counters.
- Health & Cross-Device Sync: Optional read-only Apple HealthKit (iOS) and Android Health Connect integration (steps, active calories, sleep, weight), local and FCM reminders, and offline-first delta sync across iOS, Android, and Web.
How we built it
Mellow runs on iOS, Android, and Web from a single Kotlin Multiplatform + Compose Multiplatform codebase (:shared + :composeApp + iosApp + Ktor :server):
- Firebase AI Logic (Hybrid Inference):
- iOS (iPhone 16):
FirebaseAILogicHybridModelpairing Apple Foundation Models on-device with Cloud Gemini fallback, plus offlineSFSpeechRecognizervoice dictation (auto-sending after a natural pause). - Android:
com.google.firebase:firebase-aiusingPREFER_ON_DEVICE,ONLY_ON_DEVICE, andONLY_IN_CLOUDmodes for seamless Gemini Nano / Cloud fallback. - Web (Chrome):
firebase/aiJS SDK (PREFER_ON_DEVICE) leveraging Chrome Gemini Nano on-device with automatic cloud escalation.
- iOS (iPhone 16):
- Firebase App Check, Remote Config, Auth, Hosting & FCM:
- App Check: reCAPTCHA Enterprise on Web (
mellow.olyxit.com), Play Integrity / debug on Android, and App Attest / debug on iOS. - Remote Config (
remote_config.json): Live control overdeep_model,fast_model,cloud_thinking, and per-platform on-device input token budgets (2,500mobile /6,000web). - Firebase Auth: Frictionless Anonymous Guest mode with in-place Google Sign-In linking.
- Ktor Sync & Media Server (
api-mellow.olyxit.com): Reuses:sharedTargetEvaluatorfor delta sync, JWT-authenticated/media/{id}note photo storage (with EXIF stripping and per-account quotas), and FCM reminder scheduling.
- App Check: reCAPTCHA Enterprise on Web (
Challenges we ran into
- Small on-device context windows and hallucination risk: Mobile local models have tight token budgets (
2,500tokens) and struggle when handed raw multi-week logs. We solved this by building an on-device intent classifier + narrow alias-compressed prompts (t1,t2) inPromptBuilder, paired with a deterministicInsightEnginethat computes all look-back numbers locally in Kotlin so small models never invent stats. - Safe AI mutations: Every AI action passes through
TargetValidatorand a 3-tierActionExecutor(low-risk actions auto-apply with a persistedUndoBatch; multi-target plans and destructive edits require explicit preview confirmation). - Cross-platform Compose Multiplatform polish: Designing one serene UI that feels native on phones (vertical clay scenes + draggable frosted sheets) and intentional on desktop browsers (1376×768 landscape scenes anchored to a two-column glass panel) while keeping WasmJS fast.
Accomplishments that we're proud of
- True 3-platform Hybrid AI (iPhone 16 Airplane Mode via Apple Foundation Models, Chrome Desktop via Gemini Nano, and Android Cloud Fallback) backed by 216 passing unit tests across
:shared,:server, and:composeApp. - Making hybrid AI privacy visible and tangible through the onboarding flow, live on-device/cloud reply badges read from real SDK
inferenceSource, and the just-in-time "What would be sent" cloud consent sheet. - Shipping a cohesive, end-to-end product — not just a chat prototype — complete with HealthKit, Android Health Connect, note photos, templates, and live cross-device sync.
What we learned
Small on-device models (Apple Foundation Models and Gemini Nano) shine when you pair them with deterministic domain engines, narrow intent-scoped prompts, and constrained JSON schemas. Let deterministic code handle math, schedules, and validation; let on-device AI handle fast, private natural-language intent; and reserve cloud models transparently for deep multi-step planning.
What's next
- Expanding on-device structured-output capabilities as Android AICore and Chrome Gemini Nano roll out across more devices.
- Adding shareable routine templates and richer progress insights inside
InsightEngine. - Publishing Mellow natively to the Apple App Store and Google Play Store.
Testing Instructions for Judges
- Live Web App (No Login Required): Open https://mellow.olyxit.com in Chrome Desktop (Firebase App Check via reCAPTCHA Enterprise runs automatically).
- Complete the 3-step onboarding and choose Not now, stay as a guest.
- Tap Pick a template → Try a sample week to populate Gym plan, DSA practice, Monthly budget, Medications, Daily steps, Sleep, Weight, and an overdue task.
- Open Tell Milo… to test:
- On-device AI (with Chrome Prompt API / Gemini Nano enabled): log "Spent $15 on lunch" or "Took antibiotic" and verify the
On-device · Gemini Nanobadge and Undo. - Cloud Plan Builder (Consent-Gated): Tap Build a plan with Milo (e.g., "13-week DSA interview plan") to see the "This needs the cloud — What would be sent" prompt and multi-level
Cloud · deepplan preview. - Privacy Lock: Switch Menu → Settings → Milo → Never, on-device only to confirm cloud features are locked off.
- On-device AI (with Chrome Prompt API / Gemini Nano enabled): log "Spent $15 on lunch" or "Took antibiotic" and verify the
- iOS & Android: Shown live in our demo video (iPhone 16 Airplane Mode + Apple Foundation Models + offline voice + HealthKit; Android Cloud Fallback + Health Connect). Live Firebase configs are gitignored; copy the
.exampletemplates inREADME.mdto build against your own Firebase project.