# matheusnsp/pulpito architecture

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

- Interactive diagram: https://gitdiagram.com/matheusnsp/pulpito
- Repository: https://github.com/matheusnsp/pulpito

## Overview

Pulpito is an installable web app for preparing messages and studies, preaching them, and projecting synchronized slides. The main workflow is to organize messages, edit topics and study blocks, optionally create slides or print a handout, then preach or teach with timing and live audience responses. Separate capabilities include Bible reading, an events calendar, reusable questions, and phone-to-projector connection. The graph combines documented capabilities with sampled routing and call evidence; unsampled feature internals are represented only at their existing page-directory paths.

Main entry points: [`src/App.tsx`](https://github.com/matheusnsp/pulpito/blob/main/src/App.tsx) (App routing), [`src/pages/EditorMensagem.tsx`](https://github.com/matheusnsp/pulpito/blob/main/src/pages/EditorMensagem.tsx) (Message editor), [`src/lib/aoVivo.ts`](https://github.com/matheusnsp/pulpito/blob/main/src/lib/aoVivo.ts) (Live response service), [`src/pages/Pregar.tsx`](https://github.com/matheusnsp/pulpito/blob/main/src/pages/Pregar.tsx) (Preaching mode)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and account"]
  node_app["App routing<br/>[App.tsx]"]
  node_auth["Authentication<br/>[auth.tsx]"]
  node_supabase[("Supabase backend<br/>[supabase.ts]")]
end

subgraph group_prepare["Prepare content"]
  node_library["Message library<br/>[Mensagens.tsx]"]
  node_messages["Message operations<br/>[mensagens.ts]"]
  node_editor["Message editor<br/>[EditorMensagem.tsx]"]
  node_blocks["Study blocks<br/>[blocos.ts]"]
  node_types["Message and slide data<br/>[tipos.ts]"]
  node_slides["Slide editor<br/>[EditorSlides.tsx]"]
  node_slideviews["Slide rendering<br/>[SlideVisual.tsx]"]
  node_handout["Printable handout<br/>[folhaAluno.ts]"]
end

subgraph group_present["Present and engage"]
  node_preach["Preaching mode<br/>[Pregar.tsx]"]
  node_live["Live response service<br/>[aoVivo.ts]"]
  node_liveview["Live classroom panel<br/>[AulaAoVivo.tsx]"]
  node_respond["Participant responses<br/>[Responder.tsx]"]
  node_answers["Study responses"]
  node_projector["Projector display<br/>[Projetar.tsx]"]
  node_connect["Phone connection<br/>[Conectar.tsx]"]
end

subgraph group_resources["Study and schedule"]
  node_bible["Offline Bible<br/>[biblia.ts]"]
  node_biblepage["Bible reader<br/>[Biblia.tsx]"]
  node_agenda["Calendar<br/>[Agenda.tsx]"]
  node_questions["Question bank<br/>[Perguntas.tsx]"]
end

node_author(("Message author"))

node_author -->|"uses"| node_app
node_app -->|"checks session"| node_auth
node_app -->|"routes"| node_library
node_app -->|"routes"| node_editor
node_app -->|"routes"| node_slides
node_app -->|"routes"| node_preach
node_app -->|"routes"| node_projector
node_app -->|"routes"| node_connect
node_app -->|"routes"| node_respond
node_app -->|"routes"| node_biblepage
node_app -->|"routes"| node_agenda
node_app -->|"routes"| node_questions
node_library -->|"duplicates"| node_messages
node_editor -->|"edits messages"| node_messages
node_editor -->|"edits blocks"| node_blocks
node_editor -->|"creates handout"| node_handout
node_editor -->|"previews verses"| node_bible
node_slides -->|"renders slides"| node_slideviews
node_slides -->|"uses slide data"| node_types
node_preach -->|"manages session"| node_live
node_preach -->|"loads verses"| node_bible
node_preach -->|"shows panel"| node_liveview
node_liveview -->|"displays responses"| node_live
node_respond -.->|"submits answers"| node_live
node_live -->|"reads and broadcasts"| node_supabase
node_live -.->|"stores results"| node_answers
node_connect -->|"connects by code"| node_projector
node_biblepage -->|"reads passages"| node_bible
node_agenda -->|"loads events"| node_supabase
node_auth -->|"tracks session"| node_supabase
node_messages -.->|"persists messages"| node_supabase

click node_app "https://github.com/matheusnsp/pulpito/blob/main/src/App.tsx"
click node_auth "https://github.com/matheusnsp/pulpito/blob/main/src/lib/auth.tsx"
click node_supabase "https://github.com/matheusnsp/pulpito/blob/main/src/lib/supabase.ts"
click node_library "https://github.com/matheusnsp/pulpito/blob/main/src/pages/Mensagens.tsx"
click node_messages "https://github.com/matheusnsp/pulpito/blob/main/src/lib/mensagens.ts"
click node_editor "https://github.com/matheusnsp/pulpito/blob/main/src/pages/EditorMensagem.tsx"
click node_blocks "https://github.com/matheusnsp/pulpito/blob/main/src/lib/blocos.ts"
click node_types "https://github.com/matheusnsp/pulpito/blob/main/src/lib/tipos.ts"
click node_slides "https://github.com/matheusnsp/pulpito/blob/main/src/pages/EditorSlides.tsx"
click node_slideviews "https://github.com/matheusnsp/pulpito/blob/main/src/components/SlideVisual.tsx"
click node_handout "https://github.com/matheusnsp/pulpito/blob/main/src/lib/folhaAluno.ts"
click node_preach "https://github.com/matheusnsp/pulpito/blob/main/src/pages/Pregar.tsx"
click node_live "https://github.com/matheusnsp/pulpito/blob/main/src/lib/aoVivo.ts"
click node_liveview "https://github.com/matheusnsp/pulpito/blob/main/src/components/AulaAoVivo.tsx"
click node_respond "https://github.com/matheusnsp/pulpito/blob/main/src/pages/Responder.tsx"
click node_answers "https://github.com/matheusnsp/pulpito/blob/main/src/pages/RespostasEstudo.tsx"
click node_projector "https://github.com/matheusnsp/pulpito/blob/main/src/pages/Projetar.tsx"
click node_connect "https://github.com/matheusnsp/pulpito/blob/main/src/pages/Conectar.tsx"
click node_bible "https://github.com/matheusnsp/pulpito/blob/main/src/lib/biblia.ts"
click node_biblepage "https://github.com/matheusnsp/pulpito/blob/main/src/pages/Biblia.tsx"
click node_agenda "https://github.com/matheusnsp/pulpito/blob/main/src/pages/Agenda.tsx"
click node_questions "https://github.com/matheusnsp/pulpito/blob/main/src/pages/Perguntas.tsx"

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_app,node_auth,node_supabase toneBlue
class node_library,node_messages,node_editor,node_blocks,node_types,node_slides,node_slideviews,node_handout toneAmber
class node_preach,node_live,node_liveview,node_respond,node_answers,node_projector,node_connect toneMint
class node_bible,node_biblepage,node_agenda,node_questions toneRose
class node_author toneIndigo
```

## Components

### App and account

- [App routing](https://github.com/matheusnsp/pulpito/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication](https://github.com/matheusnsp/pulpito/blob/main/src/lib/auth.tsx): `src/lib/auth.tsx`
- [Supabase backend](https://github.com/matheusnsp/pulpito/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### Prepare content

- [Message library](https://github.com/matheusnsp/pulpito/blob/main/src/pages/Mensagens.tsx): `src/pages/Mensagens.tsx`
- [Message operations](https://github.com/matheusnsp/pulpito/blob/main/src/lib/mensagens.ts): `src/lib/mensagens.ts`
- [Message editor](https://github.com/matheusnsp/pulpito/blob/main/src/pages/EditorMensagem.tsx): `src/pages/EditorMensagem.tsx`
- [Study blocks](https://github.com/matheusnsp/pulpito/blob/main/src/lib/blocos.ts): `src/lib/blocos.ts`
- [Message and slide data](https://github.com/matheusnsp/pulpito/blob/main/src/lib/tipos.ts): `src/lib/tipos.ts`
- [Slide editor](https://github.com/matheusnsp/pulpito/blob/main/src/pages/EditorSlides.tsx): `src/pages/EditorSlides.tsx`
- [Slide rendering](https://github.com/matheusnsp/pulpito/blob/main/src/components/SlideVisual.tsx): `src/components/SlideVisual.tsx`
- [Printable handout](https://github.com/matheusnsp/pulpito/blob/main/src/lib/folhaAluno.ts): `src/lib/folhaAluno.ts`

### Present and engage

- [Preaching mode](https://github.com/matheusnsp/pulpito/blob/main/src/pages/Pregar.tsx): `src/pages/Pregar.tsx`
- [Live response service](https://github.com/matheusnsp/pulpito/blob/main/src/lib/aoVivo.ts): `src/lib/aoVivo.ts`
- [Live classroom panel](https://github.com/matheusnsp/pulpito/blob/main/src/components/AulaAoVivo.tsx): `src/components/AulaAoVivo.tsx`
- [Participant responses](https://github.com/matheusnsp/pulpito/blob/main/src/pages/Responder.tsx): `src/pages/Responder.tsx`
- [Study responses](https://github.com/matheusnsp/pulpito/blob/main/src/pages/RespostasEstudo.tsx): `src/pages/RespostasEstudo.tsx`
- [Projector display](https://github.com/matheusnsp/pulpito/blob/main/src/pages/Projetar.tsx): `src/pages/Projetar.tsx`
- [Phone connection](https://github.com/matheusnsp/pulpito/blob/main/src/pages/Conectar.tsx): `src/pages/Conectar.tsx`

### Study and schedule

- [Offline Bible](https://github.com/matheusnsp/pulpito/blob/main/src/lib/biblia.ts): `src/lib/biblia.ts`
- [Bible reader](https://github.com/matheusnsp/pulpito/blob/main/src/pages/Biblia.tsx): `src/pages/Biblia.tsx`
- [Calendar](https://github.com/matheusnsp/pulpito/blob/main/src/pages/Agenda.tsx): `src/pages/Agenda.tsx`
- [Question bank](https://github.com/matheusnsp/pulpito/blob/main/src/pages/Perguntas.tsx): `src/pages/Perguntas.tsx`

### Other components

- **Message author**

## Connections

- Message author → App routing: uses
- App routing → Authentication: checks session (evidence: `src/App.tsx`)
- App routing → Message library: routes (evidence: `src/App.tsx`)
- App routing → Message editor: routes (evidence: `src/App.tsx`)
- App routing → Slide editor: routes (evidence: `src/App.tsx`)
- App routing → Preaching mode: routes (evidence: `src/App.tsx`)
- App routing → Projector display: routes (evidence: `src/App.tsx`)
- App routing → Phone connection: routes (evidence: `src/App.tsx`)
- App routing → Participant responses: routes (evidence: `src/App.tsx`)
- App routing → Bible reader: routes (evidence: `src/App.tsx`)
- App routing → Calendar: routes (evidence: `src/App.tsx`)
- App routing → Question bank: routes (evidence: `src/App.tsx`)
- Message library → Message operations: duplicates (evidence: `src/pages/Mensagens.tsx`)
- Message editor → Message operations: edits messages (evidence: `src/pages/EditorMensagem.tsx`)
- Message editor → Study blocks: edits blocks (evidence: `src/pages/EditorMensagem.tsx`)
- Message editor → Printable handout: creates handout (evidence: `src/pages/EditorMensagem.tsx`)
- Message editor → Offline Bible: previews verses (evidence: `src/pages/EditorMensagem.tsx`)
- Slide editor → Slide rendering: renders slides (evidence: `src/pages/EditorSlides.tsx`)
- Slide editor → Message and slide data: uses slide data (evidence: `src/pages/EditorSlides.tsx`)
- Preaching mode → Live response service: manages session (evidence: `src/pages/Pregar.tsx`)
- Preaching mode → Offline Bible: loads verses (evidence: `src/pages/Pregar.tsx`)
- Preaching mode → Live classroom panel: shows panel (evidence: `src/pages/Pregar.tsx`)
- Live classroom panel → Live response service: displays responses (evidence: `src/components/AulaAoVivo.tsx`)
- Participant responses → Live response service: submits answers
- Live response service → Supabase backend: reads and broadcasts (evidence: `src/lib/aoVivo.ts`)
- Live response service → Study responses: stores results
- Phone connection → Projector display: connects by code
- Bible reader → Offline Bible: reads passages (evidence: `src/pages/Biblia.tsx`)
- Calendar → Supabase backend: loads events (evidence: `src/pages/Agenda.tsx`)
- Authentication → Supabase backend: tracks session (evidence: `src/lib/auth.tsx`)
- Message operations → Supabase backend: persists messages (evidence: `src/lib/mensagens.ts`)
