Christian Daily Bread Therapy - CDB Therapy

Inspiration

We built CDB Therapy because we saw people in hard moments turn to two things: a therapist and their Bible. But no app brought them together.

Friends told us: "My therapy app gives me coping skills but doesn't understand my faith." And "My Bible app gives me verses but doesn't understand my anxiety at 2 AM."

On top of that, every therapy app needed an account, internet, and sent your most private thoughts to a server. We wanted the opposite: Christian Daily Bread Therapy — private by architecture, available like bread every day, even in airplane mode.

CDB = Christian Daily Bread. A companion that doesn't replace your therapist or pastor, but sustains you between sessions.

What it does

CDB Therapy is a React Native app that works 100% offline, with a few APIs that make it smarter when online.

1. Private Journaling: No login. No cloud. Your journals are stored in encrypted SQLite on your phone.

2. AI Christian Therapist: Chat that feels empathetic, CBT-informed, and faith-aware. Offline = local supportive responses. Online = personalized AI responses using your journal context.

3. Daily Bread Care Plan: For every entry, you get:

  • A clinical skill (grounding, breathing, thought reframing)
  • A relevant Bible verse with context
  • A short prayer prompt

Example: You write "I can't sleep, I'm overthinking" -> App returns a 3-min box-breathing exercise + Philippians 4:6-7 + a prayer for peace.

4. Mood Insights: Tracks mood, detects cognitive distortions, and visualizes trends locally. No data ever leaves the device for charts.

5. Offline Safety: If crisis keywords are detected, it instantly shows your pre-filled safety plan and local hotlines — with zero internet needed.

How we built it

Frontend: React Native (Expo) + TypeScript We focused on a calm, frontend-leaning experience: soft colors, bottom sheets, 60fps animations with Reanimated, haptics for breathing exercises, and full dark/light mode. Zustand + MMKV for fast local state.

Offline-First Core (No Backend):

  • Storage: expo-sqlite for journals, mood logs. Encrypted at rest.
  • On-Device Intelligence: No OpenAI calls needed for core detection. We compute a local Rumination Score:

$$ R_t = \lambda \cdot R_{t-1} + (1 - \lambda) \cdot \text{sim}(E_t, E_{t-1}) $$

Where $E_t$ is a TF-IDF embedding of the current entry created on-device, $\text{sim}$ is cosine similarity to the last entry, and $\lambda = 0.7$ is decay. If $R_t > 0.75$, we detect a thought loop and surface a reframing skill.

Few APIs to Support AI + Bible:

We kept backend tiny — 3 serverless APIs that enhance the offline core:

a) POST /api/therapist/chat - AI Therapist API When online, takes anonymized mood tags + vector (not raw text) and returns empathetic, CBT-grounded response. Streams response for instant feel.

b) GET /api/bible/verse?mood=anxiety - Bible API Semantic search over 300+ verses using pgvector. $$ \text{relevance} = \cos(E_{user_feeling}, E_{verse}) $$ So "I feel alone at night" != "anxious about work". Offline fallback: Top 100 verses bundled in app.

c) POST /api/care/plan - Care Plan API Orchestrator. Runs Mood + Bible in parallel and returns unified response: skill + verse + prayer.

We built this with Cursor AI — scaffolding React Native components and API routes with Zod validation in minutes, so we could focus on product feel.

Challenges we ran into

1. AI without internet: How to feel intelligent offline? We couldn't rely on GPT-4. We built a local lexicon of 200+ cognitive distortion markers ("always", "never", "I'm a failure") and a rule-based engine. It’s instant, private, and works in airplane mode.

2. Dual Safety - Clinical + Spiritual: We built two guardrails. Crisis detection bypasses all APIs and shows offline hotlines. For Bible, we never generate verses — we only retrieve from a verified library with translation + context to avoid misquoting.

3. SQLite performance in React Native: Writing 1000+ journals without blocking UI was hard. We moved all DB work to background transactions and optimized FlatLists.

4. Latency kills empathy: Calling 2 APIs sequentially felt slow. We made Care API run Mood + Bible in parallel and stream the therapist text first.

Accomplishments that we're proud of

  • True privacy shipped: No login, no tracking, 100% offline journaling. Users say they write more honestly because of it.
  • Real React Native product: Not a hackathon prototype — smooth, accessible, haptic-enabled, works offline.
  • Blended faith + therapy respectfully: Mapped 12 emotions to both CBT skills and curated verses (e.g., Anxiety -> Grounding + Isaiah 41:10).
  • Hybrid architecture that works: Proved you can have AI personalization with just 3 tiny APIs enhancing an offline-first core.
  • From idea to TestFlight in weeks: Using Cursor AI for product-focused development.

What we learned

We learned that for a therapy app, frontend performance is care.

A dropped frame or requiring internet when someone is anxious is not a technical bug — it’s a trust-breaking moment. Building offline-first taught us that constraints create better products. No backend forced us to understand CBT deeply instead of just prompting an LLM.

We also learned that privacy is a feature. By storing nothing on a server, we earned trust that no privacy policy could.

Most importantly: the best AI is invisible. Users don't see embeddings or $R_t$ scores — they just feel heard, helped, and spiritually nourished.

What's next for Christian Daily Bread Therapy - CDB Therapy

1. Fully Offline LLM: Integrate Phi-3 Mini via llama.rn so AI therapist works 100% offline. 2. Audio Daily Bread: Calm AI voice for verses and guided prayers for nighttime anxiety. 3. Devotionals & More Translations: 7-day plans for Anxiety, Grief, Loneliness in NIV, KJV, and Yoruba. 4. Share with Care: Optional encrypted export of insights (not raw journals) to share with therapist/pastor. 5. Watch & Widget: "I need bread" home-screen widget + haptic breathing on Apple Watch.

Our mission: Daily bread for your soul, available even with no signal.

Built With

Share this project:

Updates

Submission history