Inspiration
Quitting smoking is rarely a lack of information, it’s a lack of support in the hardest moments. Cravings hit late at night, motivation fades after a few days, and “just one more” feels reasonable when nobody is there to push back.
We built BreathFresh because we wanted a companion that turns quitting into something visible and winnable: track how long you’ve been smoke-free, see your body recovering, log cravings, and talk to an AI coach that never encourages a slip. The goal wasn’t another generic wellness checklist, it was a product that feels present when willpower is lowest.
What it does
BreathFresh is a progressive web app for smoking cessation. After onboarding with smoking history, users get:
- Live progress — smoke-free time, cigarettes avoided, money saved, and life regained
- Organ health visualization — recovery views for lungs, heart, oxygen, and circulation
- Craving log & quit plan — track triggers and generate a personalized 7-day reduction plan
- BreathFresh AI — a AI-powered coach with FAQ-grounded answers for cravings, relapse recovery, and motivation
- Resources & consultations — curated content, alternatives, and specialist booking
- Admin tools — manage users, content, and specialists
How we built it
Frontend
We built the app with React, TypeScript, Vite, Tailwind/shadcn UI, React Query, and Supabase Auth. It ships as a PWA, so it can install on mobile with a native feel and support push notifications.
Backend and AI
A FastAPI service exposes chat and quit-plan endpoints. The chat pipeline works in three steps:
- Lightweight FAQ keyword retrieval for grounded context
- LLM completion with a strict stop-smoking system prompt
- Fallback responses when the model is unavailable
Personalized quit plans are returned as structured JSON: 7-day targets, craving windows, and interventions.
Health recovery math
User profiles and progress live in Supabase. Health recovery is computed from smoking intensity and days since quit.
Pack-years:
$$ \text{PackYears} = \left(\frac{\text{cigarettes/day}}{20}\right) \times \text{years smoked} $$
Smoking intensity (capped at 1):
$$ \text{Intensity} = \min\left(\frac{\text{PackYears}}{40},\, 1\right) $$
Estimated full-recovery horizon in days:
$$ \text{FullRecoveryDays} = 180 + \left(\frac{\min(\text{PackYears},\,40)}{40}\right) \times 1280 $$
Each health metric at day \( t \) recovers from a damaged baseline \( B \) toward 100:
$$ \text{Metric}(t) = B + (100 - B)\cdot\min\left(\frac{t}{\text{FullRecoveryDays}},\, 1\right) $$
Money saved is estimated from daily cigarette use and pack cost over smoke-free time.
Stack
| Layer | Tech |
|---|---|
| App | React, Vite, TypeScript, PWA |
| Auth / DB | Supabase |
| AI API | FastAPI + Groq |
| Visualization | Three.js organ viewers, Recharts |
| Deploy | Railway (API) + frontend hosting |
Challenges we faced
- Keeping the AI firmly anti-smoking — LLMs can sound overly “balanced.” We hardened the system prompt so questions like “should I try one?” always get a clear refusal plus coping steps, never permission.
- Heavy ML vs. deployability — We explored local RAG with embeddings/FAISS. For reliability and cost, we moved to Groq + keyword FAQ retrieval so the coach stays fast and hostable.
- Personalization without false precision — Recovery visuals and pack-year math need to feel meaningful without claiming clinical diagnosis. We framed metrics as motivational progress models, not medical advice.
- Full-product surface area — Auth, onboarding, chat history, plans, admin, and PWA install all had to work together. The hard part was polish and consistency, not a single feature.
- Windows ML tooling — Early Torch/transformers experiments were painful to set up; simplifying the inference path removed a major blocker.
What we learned
- Quitting support is a product design problem as much as an AI problem: timing, tone, and refusal matter.
- Grounding the coach with FAQ context improves usefulness without a full heavyweight RAG stack.
- Structured JSON quit plans are more actionable than free-form advice.
- Making recovery visible (money, organs, milestones) reinforces behavior better than text alone.
- Shipping a PWA + cloud API is a practical way to put health tools on phones quickly.
What’s next
- Richer craving analytics and smarter notification timing
- Stronger retrieval (hybrid search) while keeping latency low
- Deeper specialist workflows and localization
- Optional habit integrations for real-world trigger detection
BreathFresh is our bet that quitting gets easier when progress is measurable, recovery is visible, and support is available the moment a craving starts.
Built With
- fastapi
- framermotion
- postgresql
- pwa
- python
- railway
- react
- reactquery
- recharts
- shadcn/ui
- supabase
- tailwindcss
- three.js
- typescript
- vercel



Log in or sign up for Devpost to join the conversation.