# rohitkf/rim-church-app architecture

> Architecture diagram of the GitHub repository rohitkf/rim-church-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rohitkf/rim-church-app
- Repository: https://github.com/rohitkf/rim-church-app

## Overview

Church Operations Platform supports church staff coordinating services, departments, volunteers, and operational records through a React web app, with an optional AI assistant for text and voice requests. The main workflow is sign in, choose a team or service task, then read or update shared records; Supabase backs manual UI actions and enforces access through RLS. Service planning proceeds from templates and service dates to running-order sessions, assignments, and exports. The README documents broader capabilities whose individual page wiring was not sampled; those are represented at feature-page level. Backend and planner links reflect the excerpts and README; unsampled implementation details are not inferred.

Main entry points: [`frontend/src/App.tsx`](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/App.tsx) (Routes and shell), [`frontend/src/pages/ServicePlannerPage.tsx`](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/ServicePlannerPage.tsx) (Service planner), [`frontend/src/pages/ServicePlannerIndexPage.tsx`](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/ServicePlannerIndexPage.tsx) (Service listing), [`backend/app/routers/assistant.py`](https://github.com/rohitkf/rim-church-app/blob/main/backend/app/routers/assistant.py) (Assistant endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Web application"]
  node_entry["App entry<br/>[main.tsx]"]
  node_routes["Routes and shell<br/>[App.tsx]"]
  node_auth["Authentication<br/>[AuthContext.tsx]"]
end

subgraph group_operations["Church operations"]
  node_dashboard["Dashboard<br/>[DashboardPage.tsx]"]
  node_departments["Departments"]
  node_volunteers["Volunteers<br/>[VolunteersPage.tsx]"]
  node_events["Events and attendance<br/>[EventsPage.tsx]"]
  node_service_index["Service listing"]
  node_service_planner["Service planner"]
  node_templates["Service templates"]
  node_checklists["Checklists"]
  node_availability["Availability"]
  node_rota["Team rota<br/>[TeamRotaPage.tsx]"]
end

subgraph group_coordination["Coordination and records"]
  node_inventory["Inventory<br/>[InventoryPage.tsx]"]
  node_messages["Message board"]
  node_team_chat["Team chat<br/>[TeamChatPage.tsx]"]
  node_debriefs["Debriefs<br/>[DebriefsPage.tsx]"]
end

subgraph group_assistant["AI assistant"]
  node_assistant_panel["Assistant panel"]
  node_assistant_api["Assistant API client<br/>[assistantApi.ts]"]
  node_assistant_routes["Assistant endpoints<br/>[assistant.py]"]
  node_agent["Tool-calling agent<br/>[agent.py]"]
  node_tools["Tool executors<br/>[executors.py]"]
  node_transcription["Voice transcription<br/>[transcribe.py]"]
end

subgraph group_platform["Data and integrations"]
  node_supabase[("Supabase")]
  node_claude["Claude API"]
  node_whisper["Whisper model"]
end

node_staff(("Church staff"))

node_staff -->|"opens app"| node_entry
node_entry -->|"mounts"| node_routes
node_routes -->|"provides auth"| node_auth
node_routes -->|"routes"| node_dashboard
node_routes -->|"routes"| node_departments
node_routes -->|"routes"| node_volunteers
node_routes -->|"routes"| node_events
node_routes -->|"routes"| node_service_index
node_routes -->|"routes"| node_service_planner
node_routes -->|"routes"| node_templates
node_routes -->|"routes"| node_checklists
node_routes -->|"routes"| node_availability
node_routes -->|"routes"| node_rota
node_routes -->|"routes"| node_inventory
node_routes -->|"routes"| node_messages
node_routes -->|"routes"| node_team_chat
node_routes -->|"routes"| node_debriefs
node_service_index -->|"opens service"| node_service_planner
node_service_planner -->|"loads templates"| node_templates
node_staff -.->|"requests help"| node_assistant_panel
node_assistant_panel -.->|"sends request"| node_assistant_api
node_assistant_api -.->|"calls API"| node_assistant_routes
node_assistant_routes -.->|"runs agent"| node_agent
node_agent -.->|"sends tool prompts"| node_claude
node_agent -.->|"dispatches tools"| node_tools
node_assistant_routes -.->|"transcribes audio"| node_transcription
node_transcription -.->|"runs inference"| node_whisper
node_tools -.->|"reads and writes"| node_supabase
node_dashboard -->|"reads records"| node_supabase
node_departments -->|"reads and writes"| node_supabase
node_volunteers -->|"reads and writes"| node_supabase
node_events -->|"reads and writes"| node_supabase
node_service_index -->|"reads and writes"| node_supabase
node_service_planner -->|"reads and writes"| node_supabase
node_templates -->|"reads and writes"| node_supabase
node_checklists -->|"reads and writes"| node_supabase
node_availability -->|"reads and writes"| node_supabase
node_rota -->|"reads and writes"| node_supabase
node_inventory -->|"reads and writes"| node_supabase
node_messages -->|"reads and writes"| node_supabase
node_team_chat -->|"reads and writes"| node_supabase
node_debriefs -->|"reads and writes"| node_supabase
node_auth -->|"authenticates"| node_supabase

click node_entry "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/main.tsx"
click node_routes "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/App.tsx"
click node_auth "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/auth/AuthContext.tsx"
click node_dashboard "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/DashboardPage.tsx"
click node_departments "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/DepartmentsPage.tsx"
click node_volunteers "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/VolunteersPage.tsx"
click node_events "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/EventsPage.tsx"
click node_service_index "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/ServicePlannerIndexPage.tsx"
click node_service_planner "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/ServicePlannerPage.tsx"
click node_templates "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/ServiceTemplatesPage.tsx"
click node_checklists "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/DepartmentPrepPage.tsx"
click node_availability "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/AvailabilityPage.tsx"
click node_rota "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/TeamRotaPage.tsx"
click node_inventory "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/InventoryPage.tsx"
click node_messages "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/MessageBoardPage.tsx"
click node_team_chat "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/TeamChatPage.tsx"
click node_debriefs "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/DebriefsPage.tsx"
click node_assistant_panel "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/components/AiAssistantPanel.tsx"
click node_assistant_api "https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/lib/assistantApi.ts"
click node_assistant_routes "https://github.com/rohitkf/rim-church-app/blob/main/backend/app/routers/assistant.py"
click node_agent "https://github.com/rohitkf/rim-church-app/blob/main/backend/app/agent.py"
click node_tools "https://github.com/rohitkf/rim-church-app/blob/main/backend/app/tools/executors.py"
click node_transcription "https://github.com/rohitkf/rim-church-app/blob/main/backend/app/transcribe.py"

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_entry,node_routes,node_auth toneBlue
class node_dashboard,node_departments,node_volunteers,node_events,node_service_index,node_service_planner,node_templates,node_checklists,node_availability,node_rota toneAmber
class node_inventory,node_messages,node_team_chat,node_debriefs toneMint
class node_assistant_panel,node_assistant_api,node_assistant_routes,node_agent,node_tools,node_transcription toneRose
class node_supabase,node_claude,node_whisper,node_staff toneIndigo
```

## Components

### Web application

- [App entry](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/main.tsx): `frontend/src/main.tsx`
- [Routes and shell](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Authentication](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/auth/AuthContext.tsx): `frontend/src/auth/AuthContext.tsx`

### Church operations

- [Dashboard](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/DashboardPage.tsx): `frontend/src/pages/DashboardPage.tsx`
- [Departments](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/DepartmentsPage.tsx): `frontend/src/pages/DepartmentsPage.tsx`
- [Volunteers](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/VolunteersPage.tsx): `frontend/src/pages/VolunteersPage.tsx`
- [Events and attendance](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/EventsPage.tsx): `frontend/src/pages/EventsPage.tsx`
- [Service listing](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/ServicePlannerIndexPage.tsx): `frontend/src/pages/ServicePlannerIndexPage.tsx`
- [Service planner](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/ServicePlannerPage.tsx): `frontend/src/pages/ServicePlannerPage.tsx`
- [Service templates](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/ServiceTemplatesPage.tsx): `frontend/src/pages/ServiceTemplatesPage.tsx`
- [Checklists](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/DepartmentPrepPage.tsx): `frontend/src/pages/DepartmentPrepPage.tsx`
- [Availability](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/AvailabilityPage.tsx): `frontend/src/pages/AvailabilityPage.tsx`
- [Team rota](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/TeamRotaPage.tsx): `frontend/src/pages/TeamRotaPage.tsx`

### Coordination and records

- [Inventory](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/InventoryPage.tsx): `frontend/src/pages/InventoryPage.tsx`
- [Message board](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/MessageBoardPage.tsx): `frontend/src/pages/MessageBoardPage.tsx`
- [Team chat](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/TeamChatPage.tsx): `frontend/src/pages/TeamChatPage.tsx`
- [Debriefs](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/pages/DebriefsPage.tsx): `frontend/src/pages/DebriefsPage.tsx`

### AI assistant

- [Assistant panel](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/components/AiAssistantPanel.tsx): `frontend/src/components/AiAssistantPanel.tsx`
- [Assistant API client](https://github.com/rohitkf/rim-church-app/blob/main/frontend/src/lib/assistantApi.ts): `frontend/src/lib/assistantApi.ts`
- [Assistant endpoints](https://github.com/rohitkf/rim-church-app/blob/main/backend/app/routers/assistant.py): `backend/app/routers/assistant.py`
- [Tool-calling agent](https://github.com/rohitkf/rim-church-app/blob/main/backend/app/agent.py): `backend/app/agent.py`
- [Tool executors](https://github.com/rohitkf/rim-church-app/blob/main/backend/app/tools/executors.py): `backend/app/tools/executors.py`
- [Voice transcription](https://github.com/rohitkf/rim-church-app/blob/main/backend/app/transcribe.py): `backend/app/transcribe.py`

### Data and integrations

- **Supabase**
- **Claude API**
- **Whisper model**

### Other components

- **Church staff**

## Connections

- Church staff → App entry: opens app
- App entry → Routes and shell: mounts
- Routes and shell → Authentication: provides auth
- Routes and shell → Dashboard: routes
- Routes and shell → Departments: routes
- Routes and shell → Volunteers: routes
- Routes and shell → Events and attendance: routes
- Routes and shell → Service listing: routes
- Routes and shell → Service planner: routes
- Routes and shell → Service templates: routes
- Routes and shell → Checklists: routes
- Routes and shell → Availability: routes
- Routes and shell → Team rota: routes
- Routes and shell → Inventory: routes
- Routes and shell → Message board: routes
- Routes and shell → Team chat: routes
- Routes and shell → Debriefs: routes
- Service listing → Service planner: opens service
- Service planner → Service templates: loads templates
- Church staff → Assistant panel: requests help
- Assistant panel → Assistant API client: sends request
- Assistant API client → Assistant endpoints: calls API
- Assistant endpoints → Tool-calling agent: runs agent
- Tool-calling agent → Claude API: sends tool prompts
- Tool-calling agent → Tool executors: dispatches tools
- Assistant endpoints → Voice transcription: transcribes audio
- Voice transcription → Whisper model: runs inference
- Tool executors → Supabase: reads and writes
- Dashboard → Supabase: reads records
- Departments → Supabase: reads and writes
- Volunteers → Supabase: reads and writes
- Events and attendance → Supabase: reads and writes
- Service listing → Supabase: reads and writes
- Service planner → Supabase: reads and writes
- Service templates → Supabase: reads and writes
- Checklists → Supabase: reads and writes
- Availability → Supabase: reads and writes
- Team rota → Supabase: reads and writes
- Inventory → Supabase: reads and writes
- Message board → Supabase: reads and writes
- Team chat → Supabase: reads and writes
- Debriefs → Supabase: reads and writes
- Authentication → Supabase: authenticates
