# jasonhukom/bible-plan architecture

> Architecture diagram of the GitHub repository jasonhukom/bible-plan, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jasonhukom/bible-plan
- Repository: https://github.com/jasonhukom/bible-plan

## Overview

Bible Plan is a React app for building and following customizable Scripture-reading schedules, reading Bible chapters, and saving verses. The main workflow is anonymous sign-in, plan generation and persistence, calendar-based chapter tracking, then reading chapters and saving verses; users can also upgrade their account and adjust profile or display settings. The graph reflects the sampled routing and calls plus README-described capabilities; some page-level persistence and interaction details are unsampled, so those links are left unasserted.

Main entry points: [`src/App.jsx`](https://github.com/jasonhukom/bible-plan/blob/main/src/App.jsx) (Route dispatcher), [`src/context/AuthContext.jsx`](https://github.com/jasonhukom/bible-plan/blob/main/src/context/AuthContext.jsx) (Authentication state), [`src/lib/dataApi.js`](https://github.com/jasonhukom/bible-plan/blob/main/src/lib/dataApi.js) (User data access), [`src/pages/PlanPage.jsx`](https://github.com/jasonhukom/bible-plan/blob/main/src/pages/PlanPage.jsx) (Plan calendar)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_routes["Route dispatcher<br/>[App.jsx]"]
  node_layout["App layout<br/>[Layout.jsx]"]
  node_sidebar["Navigation and plan controls<br/>[Sidebar.jsx]"]
end

subgraph group_planning["Reading plans"]
  node_calendarview["Calendar view state"]
  node_calendargrid["Month grid<br/>[calendarGrid.js]"]
  node_planpage["Plan calendar<br/>[PlanPage.jsx]"]
  node_onboarding["Plan onboarding"]
  node_planstate["Plan state and actions<br/>[PlanContext.jsx]"]
  node_generator["Schedule generator<br/>[planGenerator.js]"]
  node_books["Book classification<br/>[bibleBooks.js]"]
  node_mini["Mini calendar<br/>[MiniCalendar.jsx]"]
end

subgraph group_scripture["Bible and saves"]
  node_biblepage["Bible reader<br/>[BiblePage.jsx]"]
  node_bibleclient["Bible API client<br/>[helloao.js]"]
  node_savespage["Saved verses view<br/>[SavesPage.jsx]"]
end

subgraph group_account["Accounts and preferences"]
  node_profile["Profile management<br/>[ProfilePage.jsx]"]
  node_settings["Settings<br/>[SettingsPage.jsx]"]
  node_login["Sign-in modal<br/>[LoginModal.jsx]"]
  node_auth["Authentication state<br/>[AuthContext.jsx]"]
  node_theme["Theme preferences<br/>[ThemeContext.jsx]"]
  node_dataapi["User data access<br/>[dataApi.js]"]
  node_supabaseclient["Supabase client<br/>[supabaseClient.js]"]
end

node_reader(("Reader"))
node_supabase[("Supabase auth and database")]

node_reader -->|"opens"| node_routes
node_routes -->|"wraps routes"| node_layout
node_routes -->|"routes to"| node_planpage
node_routes -->|"routes to"| node_biblepage
node_routes -->|"routes to"| node_savespage
node_routes -->|"routes to"| node_profile
node_routes -->|"routes to"| node_settings
node_layout -->|"renders"| node_sidebar
node_sidebar -->|"renders"| node_mini
node_sidebar -->|"configures"| node_planstate
node_sidebar -->|"opens"| node_login
node_planpage -->|"uses"| node_calendarview
node_planpage -->|"builds grid"| node_calendargrid
node_mini -->|"builds grid"| node_calendargrid
node_planpage -->|"reads and updates"| node_planstate
node_planpage -->|"shows"| node_onboarding
node_planstate -->|"reads user"| node_auth
node_planstate -->|"generates schedule"| node_generator
node_planstate -->|"loads and saves"| node_dataapi
node_generator -->|"gets book data"| node_bibleclient
node_generator -->|"classifies books"| node_books
node_biblepage -->|"fetches Scripture"| node_bibleclient
node_biblepage -.->|"saves verses"| node_dataapi
node_savespage -.->|"loads saved verses"| node_dataapi
node_profile -->|"uses account"| node_auth
node_profile -->|"opens"| node_login
node_settings -->|"uses account"| node_auth
node_settings -->|"updates preferences"| node_theme
node_auth -->|"uses client"| node_supabaseclient
node_theme -->|"reads user"| node_auth
node_theme -->|"loads and saves theme"| node_dataapi
node_dataapi -->|"uses client"| node_supabaseclient
node_auth -->|"authenticates"| node_supabase
node_dataapi -->|"reads and writes"| node_supabase
node_bibleclient -->|"fetches Bible text"| node_reader

click node_routes "https://github.com/jasonhukom/bible-plan/blob/main/src/App.jsx"
click node_layout "https://github.com/jasonhukom/bible-plan/blob/main/src/components/Layout.jsx"
click node_sidebar "https://github.com/jasonhukom/bible-plan/blob/main/src/components/Sidebar.jsx"
click node_calendarview "https://github.com/jasonhukom/bible-plan/blob/main/src/context/CalendarViewContext.jsx"
click node_calendargrid "https://github.com/jasonhukom/bible-plan/blob/main/src/lib/calendarGrid.js"
click node_planpage "https://github.com/jasonhukom/bible-plan/blob/main/src/pages/PlanPage.jsx"
click node_onboarding "https://github.com/jasonhukom/bible-plan/blob/main/src/components/OnboardingModal.jsx"
click node_planstate "https://github.com/jasonhukom/bible-plan/blob/main/src/context/PlanContext.jsx"
click node_generator "https://github.com/jasonhukom/bible-plan/blob/main/src/lib/planGenerator.js"
click node_books "https://github.com/jasonhukom/bible-plan/blob/main/src/lib/bibleBooks.js"
click node_mini "https://github.com/jasonhukom/bible-plan/blob/main/src/components/MiniCalendar.jsx"
click node_biblepage "https://github.com/jasonhukom/bible-plan/blob/main/src/pages/BiblePage.jsx"
click node_bibleclient "https://github.com/jasonhukom/bible-plan/blob/main/src/lib/helloao.js"
click node_savespage "https://github.com/jasonhukom/bible-plan/blob/main/src/pages/SavesPage.jsx"
click node_profile "https://github.com/jasonhukom/bible-plan/blob/main/src/pages/ProfilePage.jsx"
click node_settings "https://github.com/jasonhukom/bible-plan/blob/main/src/pages/SettingsPage.jsx"
click node_login "https://github.com/jasonhukom/bible-plan/blob/main/src/components/LoginModal.jsx"
click node_auth "https://github.com/jasonhukom/bible-plan/blob/main/src/context/AuthContext.jsx"
click node_theme "https://github.com/jasonhukom/bible-plan/blob/main/src/context/ThemeContext.jsx"
click node_dataapi "https://github.com/jasonhukom/bible-plan/blob/main/src/lib/dataApi.js"
click node_supabaseclient "https://github.com/jasonhukom/bible-plan/blob/main/src/lib/supabaseClient.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_routes,node_layout,node_sidebar toneBlue
class node_calendarview,node_calendargrid,node_planpage,node_onboarding,node_planstate,node_generator,node_books,node_mini,node_supabase toneAmber
class node_biblepage,node_bibleclient,node_savespage toneMint
class node_profile,node_settings,node_login,node_auth,node_theme,node_dataapi,node_supabaseclient toneRose
class node_reader toneIndigo
```

## Components

### App and navigation

- [Route dispatcher](https://github.com/jasonhukom/bible-plan/blob/main/src/App.jsx): `src/App.jsx`
- [App layout](https://github.com/jasonhukom/bible-plan/blob/main/src/components/Layout.jsx): `src/components/Layout.jsx`
- [Navigation and plan controls](https://github.com/jasonhukom/bible-plan/blob/main/src/components/Sidebar.jsx): `src/components/Sidebar.jsx`

### Reading plans

- [Calendar view state](https://github.com/jasonhukom/bible-plan/blob/main/src/context/CalendarViewContext.jsx): `src/context/CalendarViewContext.jsx`
- [Month grid](https://github.com/jasonhukom/bible-plan/blob/main/src/lib/calendarGrid.js): `src/lib/calendarGrid.js`
- [Plan calendar](https://github.com/jasonhukom/bible-plan/blob/main/src/pages/PlanPage.jsx): `src/pages/PlanPage.jsx`
- [Plan onboarding](https://github.com/jasonhukom/bible-plan/blob/main/src/components/OnboardingModal.jsx): `src/components/OnboardingModal.jsx`
- [Plan state and actions](https://github.com/jasonhukom/bible-plan/blob/main/src/context/PlanContext.jsx): `src/context/PlanContext.jsx`
- [Schedule generator](https://github.com/jasonhukom/bible-plan/blob/main/src/lib/planGenerator.js): `src/lib/planGenerator.js`
- [Book classification](https://github.com/jasonhukom/bible-plan/blob/main/src/lib/bibleBooks.js): `src/lib/bibleBooks.js`
- [Mini calendar](https://github.com/jasonhukom/bible-plan/blob/main/src/components/MiniCalendar.jsx): `src/components/MiniCalendar.jsx`

### Bible and saves

- [Bible reader](https://github.com/jasonhukom/bible-plan/blob/main/src/pages/BiblePage.jsx): `src/pages/BiblePage.jsx`
- [Bible API client](https://github.com/jasonhukom/bible-plan/blob/main/src/lib/helloao.js): `src/lib/helloao.js`
- [Saved verses view](https://github.com/jasonhukom/bible-plan/blob/main/src/pages/SavesPage.jsx): `src/pages/SavesPage.jsx`

### Accounts and preferences

- [Profile management](https://github.com/jasonhukom/bible-plan/blob/main/src/pages/ProfilePage.jsx): `src/pages/ProfilePage.jsx`
- [Settings](https://github.com/jasonhukom/bible-plan/blob/main/src/pages/SettingsPage.jsx): `src/pages/SettingsPage.jsx`
- [Sign-in modal](https://github.com/jasonhukom/bible-plan/blob/main/src/components/LoginModal.jsx): `src/components/LoginModal.jsx`
- [Authentication state](https://github.com/jasonhukom/bible-plan/blob/main/src/context/AuthContext.jsx): `src/context/AuthContext.jsx`
- [Theme preferences](https://github.com/jasonhukom/bible-plan/blob/main/src/context/ThemeContext.jsx): `src/context/ThemeContext.jsx`
- [User data access](https://github.com/jasonhukom/bible-plan/blob/main/src/lib/dataApi.js): `src/lib/dataApi.js`
- [Supabase client](https://github.com/jasonhukom/bible-plan/blob/main/src/lib/supabaseClient.js): `src/lib/supabaseClient.js`

### Other components

- **Reader**
- **Supabase auth and database**

## Connections

- Reader → Route dispatcher: opens (evidence: `README.md`)
- Route dispatcher → App layout: wraps routes (evidence: `src/App.jsx`)
- Route dispatcher → Plan calendar: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Bible reader: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Saved verses view: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Profile management: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Settings: routes to (evidence: `src/App.jsx`)
- App layout → Navigation and plan controls: renders (evidence: `src/components/Layout.jsx`)
- Navigation and plan controls → Mini calendar: renders (evidence: `src/components/Sidebar.jsx`)
- Navigation and plan controls → Plan state and actions: configures (evidence: `src/components/Sidebar.jsx`)
- Navigation and plan controls → Sign-in modal: opens (evidence: `src/components/Sidebar.jsx`)
- Plan calendar → Calendar view state: uses (evidence: `src/pages/PlanPage.jsx`)
- Plan calendar → Month grid: builds grid (evidence: `src/pages/PlanPage.jsx`)
- Mini calendar → Month grid: builds grid (evidence: `src/components/MiniCalendar.jsx`)
- Plan calendar → Plan state and actions: reads and updates (evidence: `src/pages/PlanPage.jsx`)
- Plan calendar → Plan onboarding: shows (evidence: `src/pages/PlanPage.jsx`)
- Plan state and actions → Authentication state: reads user (evidence: `src/context/PlanContext.jsx`)
- Plan state and actions → Schedule generator: generates schedule (evidence: `src/context/PlanContext.jsx`)
- Plan state and actions → User data access: loads and saves (evidence: `src/context/PlanContext.jsx`)
- Schedule generator → Bible API client: gets book data (evidence: `src/lib/planGenerator.js`)
- Schedule generator → Book classification: classifies books (evidence: `src/lib/planGenerator.js`)
- Bible reader → Bible API client: fetches Scripture (evidence: `README.md`)
- Bible reader → User data access: saves verses (evidence: `src/pages/BiblePage.jsx`)
- Saved verses view → User data access: loads saved verses (evidence: `src/pages/SavesPage.jsx`)
- Profile management → Authentication state: uses account (evidence: `src/pages/ProfilePage.jsx`)
- Profile management → Sign-in modal: opens (evidence: `src/pages/ProfilePage.jsx`)
- Settings → Authentication state: uses account (evidence: `src/pages/SettingsPage.jsx`)
- Settings → Theme preferences: updates preferences (evidence: `src/pages/SettingsPage.jsx`)
- Authentication state → Supabase client: uses client (evidence: `src/context/AuthContext.jsx`)
- Theme preferences → Authentication state: reads user (evidence: `src/context/ThemeContext.jsx`)
- Theme preferences → User data access: loads and saves theme (evidence: `src/context/ThemeContext.jsx`)
- User data access → Supabase client: uses client (evidence: `src/lib/dataApi.js`)
- Authentication state → Supabase auth and database: authenticates (evidence: `src/context/AuthContext.jsx`)
- User data access → Supabase auth and database: reads and writes (evidence: `src/lib/dataApi.js`)
- Bible API client → Reader: fetches Bible text (evidence: `README.md`)
