Skip to content

Phoenix1808/AuraPulse

Repository files navigation

AuraPulse

A voice-first, on-device AI wellness companion that catches burnout before it catches you.


Platform Kotlin AI Voice

UI Architecture Privacy


AuraPulse — the Aura Orb on Home

The Aura Orb breathes, shifts colour with risk, and shows your burnout index at a glance.


The Problem

India's 300 million students and young professionals face a silent epidemic: burnout. Unlike sudden illness, burnout builds gradually over days and weeks — yet no accessible tool warns users before it strikes.

Existing mental health apps rely on static questionnaires, require expensive subscriptions, or store sensitive data on remote servers.

There is no voice-first, privacy-preserving, AI-powered companion that can detect early burnout signals, learn from daily emotional patterns, and proactively intervene — specifically designed for India's students and early-career workforce.


The Solution

AuraPulse is a voice-first, on-device Android wellness companion.

Each day, a 2-minute natural conversation with an AI (powered by Agora ConvoAI) captures the user's emotional state — no forms, no typing. Gemini then analyses the transcript to extract mood, energy, and stress signals.

Over 7–14 days, a local prediction engine identifies dangerous burnout trajectories and delivers timely, personalised nudges — breathing exercises, social prompts, rest reminders — before the user hits crisis.

All data stays on the device. No account needed. Free forever.


See it in action

Home — dark theme

Home — dark theme
Aura Orb showing the on-device burnout index, with the live AI Coach card right below.
Home — light theme

Home — light theme
Every surface adapts cleanly via mirrored DayNight tokens.
Quick actions and voice CTA

Quick actions
The 5-emoji quick check-in and the premium Talk to your AI Coach voice CTA — the marquee feature.
Chat with AuraPulse

Chat with AuraPulse
Multi-turn typed conversation. Stays warm even when the API quota is dead — keyword-aware empathetic fallback.
Trends — gauge, pills, mood chart

Trends
Burnout gauge, at-a-glance insight pills, and a 14-day mood line.
AI Weekly Digest

AI Weekly Digest
7-day energy bars, detected patterns and a 3-day forecast — computed on-device, no API call.
History with colour-coded emotions

History
Every past check-in with a colour-coded dominant emotion — calm=blue, tired=amber, overwhelmed=red, content=green.
Breathing nudge

Breathing nudge
Auto-suggested on HIGH-risk days. Pick a pattern, follow the breathing circle.

Key features

  • 2-minute voice check-in — real spoken conversation via Agora ConvoAI + Cartesia STT/TTS. No forms, no typing.
  • Typed Chat with AuraPulse — voice fallback that still feels warm during free-tier quota exhaustion thanks to a keyword-aware scripted mode.
  • Quick check-in (QnA) — 5 sliders, deterministic scoring, ~30 seconds. The fast path on busy days.
  • AI Coach card on Home — live Gemini-generated nudge conditioned on your last 7-day mood trend. Cached 6 hours; refresh on demand.
  • "Why this score?" explanation — after every check-in, Gemini explains in plain language which signals drove your mood and energy numbers.
  • On-device burnout engine — pure-Kotlin weighted scoring over 14 days of mood + 7 days of energy, producing a 0-100 score with LOW / MODERATE / HIGH bands.
  • Trends + AI Weekly Digest — line + bar charts, insight pills, detected patterns, 3-day mood forecast — all rules-based and on-device.
  • Colour-coded emotion vocabulary — stressed=red, tired=amber, calm=blue, happy=green, hopeful=violet. History reads at a glance.
  • Smart nudges — when risk crosses 65, a 4-7-8 breathing exercise is suggested automatically.
  • Privacy by construction — audio is ephemeral and never persisted; only text crosses the network; no account, no cloud sync.
  • DayNight theming — mirrored light + dark colour tokens. Every card, chart and drawable adapts.

How the AI works

flowchart TD
    A([All data starts as user words — voice or typed])

    A --> V[VOICE PIPELINE<br/>Agora SDK → Cartesia STT<br/>ConvoAI Agent with Gemini brain<br/>on Render backend]
    A --> C[CHAT PIPELINE<br/>Multi-turn Gemini<br/>Keyword fallback on quota errors]
    A --> Q[QnA PIPELINE<br/>Deterministic 5-slider scoring<br/>mood and energy]

    V --> G{Gemini 2.0 Flash<br/>JSON: moodScore, energyLevel,<br/>dominantEmotion, stressIndicators, summary}
    C --> G
    Q --> G

    G -->|Gemini reachable| P[Structured JSON<br/>parsed and clamped to 1..10]
    G -->|Rate-limited or offline| L[Local keyword analyzer<br/>'stressed' → mood 3<br/>'amazing' → mood 8]

    P --> M[(MoodEntry persisted<br/>Room — one row per day)]
    L --> M

    M --> E[Burnout Engine<br/>pure Kotlin, on-device<br/>14-day weighted window]
    E --> R{{Burnout Risk 0-100<br/>LOW / MODERATE / HIGH}}

    R --> O[Aura Orb on Home<br/>color-shifting breathing orb]
    R --> K[AI Coach card<br/>Gemini-generated personalised advice<br/>cached 6 hours]
    R --> N[Smart nudges<br/>4-7-8 breathing, social prompt,<br/>rest reminder]

    classDef pipeline fill:#1f2a4a,stroke:#5EA8FF,color:#fff,stroke-width:2px
    classDef ai fill:#2d2150,stroke:#A78BFA,color:#fff,stroke-width:2px
    classDef store fill:#0F2C3A,stroke:#7DD3FC,color:#fff,stroke-width:2px
    classDef output fill:#1A3A50,stroke:#4ADE80,color:#fff,stroke-width:2px

    class V,C,Q pipeline
    class G,P,L,E ai
    class M store
    class R,O,K,N output
Loading

Reliability — why a live demo doesn't break

Free-tier AI quotas are unforgiving. We engineered around it.

Failure mode Defence
Google deprecates a model Auto-fallback chain: gemini-2.0-flashgemini-flash-latestgemini-1.5-flash-latestgemini-2.5-flash
429 rate-limit One transparent retry after 800 ms; 60-second rate-lock if it persists
AI Coach burning calls 6-hour in-memory cache + 10-second tap debounce — ≤ 4 calls/day per user
Chat hitting quota 10-minute scripted-mode lock with keyword-aware empathetic replies — feels like real chat, not a stock fallback
Transcript → analysis offline Local keyword analyser — "stressed" → mood 3, "amazing" → mood 8. Honest, never neutral by default.
Render backend cold-starts App pings /ping on launch + UptimeRobot keeps it warm
Self-harm mentions in chat/voice Hard-coded helpline routing (iCALL, Vandrevala) fires before any API call
Stale Room row on re-check-in deleteByDate(today) runs before insert — newest check-in always wins

Tech stack

Layer Choice
Language Kotlin (100%, no Java)
UI XML layouts + ViewBinding (no Jetpack Compose by design — native, fast, IDE-preview friendly)
Architecture Clean Architecturepresentation/domain/data/
Pattern MVVM with StateFlow<UiState<T>>
DI Hilt
Async Kotlin Coroutines + Flow + StateFlow
Persistence Room (3 tables) + DataStore (preferences)
Networking Retrofit + OkHttp + Gson
Charts MPAndroidChart
Background WorkManager (daily reminder + morning recompute)
Voice Agora SDK + Agora ConvoAI + Cartesia STT/TTS
LLM Gemini 2.0 Flash via REST
Backend Flask + gunicorn on Render (tools/agent_server.py)
Theming DayNight + custom token system (light + dark mirrored)

Screens

Screen What it does
Home Aura Orb, AI Coach card, emoji quick check-in, premium voice CTA, chat / QnA / breathing entries
Voice check-in Real spoken conversation via Agora ConvoAI; live transcript; auto-ends or you tap Finish
Chat with AuraPulse Typed multi-turn Gemini conversation; scripted fallback; tap Finish to analyse
Quick check-in 5-slider deterministic scoring, ~30 sec
Analysis result Mood / energy / colour-coded emotion / summary + "Why this score?" Gemini explanation
Trends Burnout gauge, insight pills, 14-day mood line, 7-day energy bars, AI Weekly Digest with forecast
History All past check-ins with colour-coded emotions; tap a row for the full detail
History detail Mood / energy / emotion / stress indicators / summary / "What you said" transcript
Breathing nudge 4-7-8 / Steady / Balance breathing exercise — animated circle
Onboarding Name → age group → primary stress source (one-time, personalises prompts)
Profile / Settings Theme toggle, name edit, "Erase my data" wipe-on-device

Privacy by design

Guarantee Enforcement
Audio never persisted Agora SDK streams in-memory only; no file written on device or backend
Only text crosses the network The transcript is the only thing Gemini receives — no audio, no identifiers
No account, no login, no sync All state lives in local Room + DataStore. No user table on any server.
Burnout score is local-only Computed by ComputeBurnoutRiskUseCase on-device — Gemini never sees it
Self-harm safety net is offline-first Keyword guard routes to iCALL / Vandrevala helplines before any API call
One-tap data wipe Settings → "Erase my data" drops the Room database

Getting started

Prerequisites

  • Android Studio Ladybug or newer (compileSdk 35)
  • A physical device or emulator on Android 7.0+ (API 24+)
  • Internet for the AI surfaces (Gemini key in local.properties)

Clone, configure, build

git clone https://github.com/Phoenix1808/AuraPulse.git
cd AuraPulse

copy local.properties.example local.properties
notepad local.properties           # fill in GEMINI_API_KEY at minimum

# build + install on a connected device
.\gradlew clean assembleDebug installDebug

local.properties keys

# REQUIRED — powers AI Coach, Chat, mood analysis, "Why this score?"
#   Get a free key at https://aistudio.google.com/apikey
GEMINI_API_KEY=ya29...

# OPTIONAL — needed only for the voice check-in surface
AGORA_APP_ID=...
AGORA_TEMP_TOKEN=...

# OPTIONAL — URL of the Flask backend (tools/agent_server.py) on Render
AGENT_SERVER_URL=https://your-render-instance.onrender.com

Secrets are read at build time and surfaced via BuildConfig — they never appear as plaintext strings in the APK.

Backend (optional — only for voice)

tools/agent_server.py is a small Flask app that mints fresh Agora RTC tokens per session and spawns the ConvoAI agent (Cartesia TTS + Gemini LLM). Deploy with the included render.yaml, or run locally:

cd tools
cp .env.example .env
pip install -r requirements.txt
python agent_server.py

Roadmap

Shipped

  • Voice check-in via Agora ConvoAI + Cartesia + Gemini
  • Typed Chat with AuraPulse (voice fallback, scripted-mode resilience)
  • Quick check-in QnA with transparent slider scoring
  • AI Coach card on Home (live Gemini, 6h cache, offline-friendly fallback)
  • On-device burnout engine + Aura Orb + risk bands
  • Trends — gauge, charts, insight pills, AI Weekly Digest
  • "Why this score?" Gemini explanation on result screen
  • Colour-coded dominant emotion in History / Detail / Result
  • DayNight theming, mirrored light + dark tokens
  • Self-harm safety net (iCALL, Vandrevala)
  • Streak tracking + milestone celebration

Planned

  • Voice-fallback banner inside the voice screen ("Voice not catching? → Chat")
  • Wear OS heart-rate as an additional signal
  • Localisation (Hindi, Tamil, Telugu, Bengali)
  • Family / group wellness mode (opt-in shared trends)

Developed by Divyansh Goyal

Built for the AI Mobile Hackathon, 2026.


AuraPulse is hackathon-stage software. Not yet on the Play Store; not a medical device.
If you're in crisis, please call iCALL: 9152987821 or Vandrevala Foundation: 1860-2662-345.

About

AuraPulse : Voice-first Android wellness companion that catches burnout before it catches you. Gemini + Agora ConvoAI + on-device prediction. No account, no cloud

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages