ReRoot
A behavioral science-driven tobacco cessation app built with SwiftUI.
BY: try {quit} catch {retreat}
Inspiration
While 70% of smokers express a desire to quit each year, the actual success rate remains between 7% and 9%. ReRoot was developed to address this gap by prioritizing clinical honesty over gamification. Moving away from generic content and meditation games, the platform utilizes behavioral science, deep personalization, and context-aware crisis support to create an environment where users feel secure enough to report their progress truthfully.
What it does
ReRoot functions as an adaptive companion that adjusts to the user's daily experience.
- Adaptive Check-ins: Each day begins with a clinical assessment of triggers, cravings, and emotional state.
- Micro-Therapy: The application dynamically generates a five-minute session selected from 25 interactive activities, such as urge surfing and sensory grounding, tailored to the user's immediate needs.
- Context-Aware AI: An anonymous chat interface powered by Claude Haiku 4.5 utilizes the user's triggers and transcribed voice memos to provide relevant, informed support.
- Safety Net: In high-risk moments, ReRoot identifies the nearest addiction treatment centers and offers one-tap access to crisis hotlines.
- Progress Visualization: Recovery milestones are represented by a growing tree and a real-time dashboard tracking smoke-free duration.
How we built it
The project was completed during an intensive 12-hour development sprint using Cursor and Claude Opus 4.6. The final codebase consists of over 18,000 lines of Swift across 56 source files, following a modular architecture of Models, Managers, Services, and Views. The development process involved over 200 precisely engineered prompts to maintain high code velocity and structural integrity.
| Component | Technology |
|---|---|
| Architecture | XcodeGen and Clean Architecture |
| Intelligence | Anthropic Messages API (Streaming) |
| Biometrics | HealthKit for stress detection |
| Location | MapKit and CoreLocation |
| Audio | Apple Speech Framework for on-device transcription |
| Security | iOS Keychain and JSONEncoder |
Privacy Architecture: A zero-trace model ensures that voice memos are transcribed locally and AI conversations are never stored, maintaining total user anonymity.
Challenges we ran into
Unexpected technical constraints, such as mandatory system updates to iOS 26.4, required pivoting the development schedule. This time was reallocated to deep-dive research, which ultimately reinforced the scientific foundation of the application.
From a technical standpoint, the adaptive pipeline was the most significant challenge. Managing state across more than 10 stages was necessary to ensure that screen sequences shifted seamlessly based on craving intensity and user mood.
Accomplishments that we're proud of
- 25 interactive therapeutic activities developed with custom visuals and native animations.
- Evidence-based reporting system utilizing behavioral science and privacy badges to encourage user honesty.
- Integrated crisis support featuring turn-by-turn directions to professional treatment facilities.
- Zero-trust privacy model that keeps all sensitive data and speech transcription on the device.
- High-fidelity native performance achieved exclusively through Apple frameworks.
What we learned
Effective product design in this space must be secondary to behavioral science. Research into Motivational Interviewing and Just-In-Time Adaptive Interventions demonstrated that non-judgmental follow-ups are significantly more effective than guilt-driven streaks. Furthermore, privacy is not just a feature but a prerequisite for honesty; users are only truthful about lapses when they are certain their data is ephemeral.
What's next for ReRoot
- Apple Watch Companion: Real-time craving alerts based on heart rate variability.
- Predictive ML: On-device models to identify high-risk triggers before a lapse occurs.
- Dynamic Island Integration: Persistent tracking of smoke-free time and rapid access to help centers.
- Peer Support Circles: Anonymous group accountability for users on similar recovery timelines.
Built With
- anthropicapi
- swift
Log in or sign up for Devpost to join the conversation.