# pachecothiagoo/agenda-pessoal architecture

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

- Interactive diagram: https://gitdiagram.com/pachecothiagoo/agenda-pessoal
- Repository: https://github.com/pachecothiagoo/agenda-pessoal

## Overview

Raiz is a Portuguese personal agenda web app. A signed-in user creates or quickly dictates an appointment; the app parses dates, saves and watches the user’s Firestore events, then renders calendar views and filters. Local reminders run while the page is visible; optional scheduled push reminders work separately through a Cloud Function and registered devices. The graph reflects the sampled runtime modules and README capabilities; some UI wiring and optional push activation paths are documented but not shown in the sampled app excerpt.

Main entry points: [`js/app.js`](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/app.js) (App controller), [`js/events.js`](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/events.js) (Event operations), [`js/firebase.js`](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/firebase.js) (Firebase client), [`js/notifications.js`](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/notifications.js) (Push registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Agenda interface"]
  node_page["Agenda page<br/>[index.html]"]
  node_app["App controller<br/>[app.js]"]
  node_calendar["Calendar views<br/>[calendar.js]"]
  node_dateparse["Date utilities<br/>[dates.js]"]
end

subgraph group_data["Events and Firebase"]
  node_auth["Firebase Auth"]
  node_firebase["Firebase client<br/>[firebase.js]"]
  node_config["Firebase config<br/>[firebase-config.js]"]
  node_events["Event operations<br/>[events.js]"]
  node_firestore[("Cloud Firestore")]
  node_rules["Data access rules<br/>[firestore.rules]"]
end

subgraph group_alerts["Reminder delivery"]
  node_local["Local reminders<br/>[local-reminders.js]"]
  node_pushsetup["Push registration<br/>[notifications.js]"]
  node_worker["Push display<br/>[service-worker.js]"]
end

subgraph group_server["Push backend"]
  node_scheduler["Reminder scheduler<br/>[index.js]"]
end

node_user(("Agenda user"))
node_pushservice["Web Push service"]
node_speech["Browser speech API"]

node_user -->|"uses"| node_page
node_page -->|"hosts"| node_app
node_app -->|"authenticates"| node_auth
node_app -->|"manages events"| node_events
node_app -->|"renders views"| node_calendar
node_app -->|"parses entries"| node_dateparse
node_calendar -->|"formats dates"| node_dateparse
node_app -->|"updates reminders"| node_local
node_firebase -->|"loads config"| node_config
node_firebase -->|"initializes"| node_auth
node_firebase -->|"initializes"| node_firestore
node_events -->|"uses database"| node_firebase
node_events -->|"validates dates"| node_dateparse
node_events -->|"reads and writes"| node_firestore
node_firestore -->|"enforces access"| node_rules
node_app -.->|"transcribes input"| node_speech
node_pushsetup -->|"reads push key"| node_config
node_pushsetup -->|"stores devices"| node_firestore
node_pushsetup -->|"registers"| node_worker
node_scheduler -->|"queries reminders"| node_firestore
node_scheduler -->|"sends notifications"| node_pushservice
node_pushservice -.->|"delivers push"| node_worker

click node_page "https://github.com/pachecothiagoo/agenda-pessoal/blob/main/index.html"
click node_app "https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/app.js"
click node_calendar "https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/calendar.js"
click node_dateparse "https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/dates.js"
click node_firebase "https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/firebase.js"
click node_config "https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/firebase-config.js"
click node_events "https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/events.js"
click node_rules "https://github.com/pachecothiagoo/agenda-pessoal/blob/main/firestore.rules"
click node_local "https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/local-reminders.js"
click node_pushsetup "https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/notifications.js"
click node_worker "https://github.com/pachecothiagoo/agenda-pessoal/blob/main/service-worker.js"
click node_scheduler "https://github.com/pachecothiagoo/agenda-pessoal/blob/main/functions/index.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_page,node_app,node_calendar,node_dateparse,node_user,node_speech toneBlue
class node_auth,node_firebase,node_config,node_events,node_firestore,node_rules toneAmber
class node_local,node_pushsetup,node_worker toneMint
class node_scheduler toneRose
class node_pushservice toneIndigo
```

## Components

### Agenda interface

- [Agenda page](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/index.html): `index.html`
- [App controller](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/app.js): `js/app.js`
- [Calendar views](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/calendar.js): `js/calendar.js`
- [Date utilities](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/dates.js): `js/dates.js`

### Events and Firebase

- **Firebase Auth**
- [Firebase client](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/firebase.js): `js/firebase.js`
- [Firebase config](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/firebase-config.js): `js/firebase-config.js`
- [Event operations](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/events.js): `js/events.js`
- **Cloud Firestore**
- [Data access rules](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/firestore.rules): `firestore.rules`

### Reminder delivery

- [Local reminders](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/local-reminders.js): `js/local-reminders.js`
- [Push registration](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/js/notifications.js): `js/notifications.js`
- [Push display](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/service-worker.js): `service-worker.js`

### Push backend

- [Reminder scheduler](https://github.com/pachecothiagoo/agenda-pessoal/blob/main/functions/index.js): `functions/index.js`

### Other components

- **Agenda user**
- **Web Push service**
- **Browser speech API**

## Connections

- Agenda user → Agenda page: uses (evidence: `README.md`)
- Agenda page → App controller: hosts (evidence: `README.md`)
- App controller → Firebase Auth: authenticates (evidence: `js/app.js`)
- App controller → Event operations: manages events (evidence: `js/app.js`)
- App controller → Calendar views: renders views (evidence: `js/app.js`)
- App controller → Date utilities: parses entries (evidence: `js/app.js`)
- Calendar views → Date utilities: formats dates (evidence: `js/calendar.js`)
- App controller → Local reminders: updates reminders (evidence: `js/app.js`)
- Firebase client → Firebase config: loads config (evidence: `js/firebase.js`)
- Firebase client → Firebase Auth: initializes (evidence: `js/firebase.js`)
- Firebase client → Cloud Firestore: initializes (evidence: `js/firebase.js`)
- Event operations → Firebase client: uses database (evidence: `js/events.js`)
- Event operations → Date utilities: validates dates (evidence: `js/events.js`)
- Event operations → Cloud Firestore: reads and writes (evidence: `js/events.js`)
- Cloud Firestore → Data access rules: enforces access (evidence: `README.md`)
- App controller → Browser speech API: transcribes input (evidence: `README.md`)
- Push registration → Firebase config: reads push key (evidence: `js/notifications.js`)
- Push registration → Cloud Firestore: stores devices (evidence: `js/notifications.js`)
- Push registration → Push display: registers (evidence: `js/notifications.js`)
- Reminder scheduler → Cloud Firestore: queries reminders (evidence: `functions/index.js`)
- Reminder scheduler → Web Push service: sends notifications (evidence: `functions/index.js`)
- Web Push service → Push display: delivers push (evidence: `README.md`)
