PulseBrew is a smart, offline-first, AI-driven coffee companion app that monitors user health signals and provides intelligent caffeine reminders.
Architecture: Flutter (Android) + FastAPI (Railway) + Supabase (Sync) + SQFlite (Offline).
Backend: https://pulsebrew-production.up.railway.app/
- 📊 Health Data Integration
- Reads heart rate via
healthpackage (with Mock fallback for emulators).
- Reads heart rate via
- 🧠 Deterministic AI
- Uses
CaffeineDecayModel(Exponential decay, 5h half-life) to predict plasma levels.
- Uses
- 📶 Offline-First
- Works 100% offline using
sqflite. - Syncs to Supabase when online via
SyncRepository.
- Works 100% offline using
- ⚡ FastAPI Backend
- Validates logic and provides backup recommendations.
- Mobile: Flutter 3.x, Provider, Sqflite, Supabase Flutter.
- Backend: FastAPI, Python 3.10+, Pydantic.
- Database: Supabase (PostgreSQL), SQLite (Local).
- Infrastructure: Railway (Free Tier).
pulsebrew/
├── backend/ # FastAPI Backend
│ ├── main.py
│ ├── logic.py # AI Logic
│ ├── models.py # Pydantic Models
│ └── schema.sql # Database Schema
├── pulsebrew_app/ # Flutter App
│ ├── lib/
│ │ ├── services/ # LocalDB, Sync, Biometrics
│ │ ├── logic/ # AI Logic (Dart)
│ │ └── ...
│ ├── android/
│ └── pubspec.yaml
└── README.md
cd backend
pip install -r requirements.txt
uvicorn main:app --reloadcd pulsebrew_app
flutter pub get
flutter runMIT License
Mohith Anjan
Refactored by Antigravity