# gizelle-alcantara/planejador-de-aulas- architecture

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

- Interactive diagram: https://gitdiagram.com/gizelle-alcantara/planejador-de-aulas-
- Repository: https://github.com/gizelle-alcantara/planejador-de-aulas-

## Overview

Planejador SENAI is a web application for coordinating class schedules, environments, reservations, and related administrative work. Users reach the shared API through the local server or hosted functions; the central handler processes requests and uses domain modules for scheduling, bookings, keys, imports, notifications, and reporting. The README documents additional capabilities including calendar exports, Excel preview, backups, recovery, search, and mobile access. Several of these modules are indexed but unsampled, so their nodes are included while unsupported implementation links are omitted.

Main entry points: [`lib/core.js`](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/core.js) (Request handler), [`lib/schedule.js`](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/schedule.js) (Class schedules), [`lib/calendar-export.js`](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/calendar-export.js) (Class calendar export), [`server.js`](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/server.js) (Local server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entrypoints"]
  node_local_server["Local server<br/>[server.js]"]
  node_hosted_api["Hosted API<br/>[api.js]"]
  node_vercel_api["Vercel API<br/>[index.js]"]
  node_daily_job["Daily job<br/>[cron.js]"]
  node_handler["Request handler<br/>[core.js]"]
end

subgraph group_domain["Planning domains"]
  node_schedule["Class schedules<br/>[schedule.js]"]
  node_planning["Planning rules<br/>[planning.js]"]
  node_environments["Environment registry<br/>[environments.js]"]
  node_reservations["Reservations<br/>[reservations.js]"]
  node_key_control["Key control<br/>[key-control.js]"]
  node_environment_import["Environment import"]
end

subgraph group_outputs["Exports and support"]
  node_calendar_export["Class calendar export<br/>[calendar-export.js]"]
  node_teacher_export["Teacher calendar export"]
  node_ics["Calendar subscriptions<br/>[ics.js]"]
  node_excel_preview["Excel preview<br/>[excel-preview.js]"]
  node_management_report["Management reports"]
  node_notifications["Notifications<br/>[notify.js]"]
  node_search["Search<br/>[search.js]"]
  node_daily_display["Daily program display<br/>[daily-display.js]"]
end

subgraph group_state["Persistence"]
  node_database[("Application database<br/>[local-database.js]")]
end

node_user(("Web user"))

node_user -->|"sends requests"| node_local_server
node_local_server -->|"routes API"| node_handler
node_hosted_api -->|"forwards requests"| node_handler
node_vercel_api -->|"forwards requests"| node_handler
node_daily_job -->|"runs daily task"| node_handler
node_handler -->|"uses"| node_key_control
node_handler -->|"uses"| node_environment_import
node_handler -->|"uses"| node_daily_display
node_handler -->|"uses"| node_planning
node_handler -->|"uses"| node_management_report
node_handler -->|"uses"| node_schedule
node_handler -->|"uses"| node_excel_preview
node_handler -->|"uses"| node_calendar_export
node_handler -->|"uses"| node_teacher_export
node_handler -->|"uses"| node_ics
node_environments -->|"projects lessons"| node_schedule
node_ics -->|"reads schedule blocks"| node_schedule
node_calendar_export -->|"reads schedule blocks"| node_schedule
node_calendar_export -.->|"preview workflow"| node_excel_preview
node_handler -.->|"persists application data"| node_database

click node_local_server "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/server.js"
click node_hosted_api "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/netlify/functions/api.js"
click node_vercel_api "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/api/index.js"
click node_daily_job "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/netlify/functions/cron.js"
click node_handler "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/core.js"
click node_schedule "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/schedule.js"
click node_planning "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/planning.js"
click node_environments "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/environments.js"
click node_reservations "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/reservations.js"
click node_key_control "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/key-control.js"
click node_environment_import "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/environment-import.js"
click node_calendar_export "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/calendar-export.js"
click node_teacher_export "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/teacher-calendar-export.js"
click node_ics "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/ics.js"
click node_excel_preview "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/excel-preview.js"
click node_management_report "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/management-report.js"
click node_notifications "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/notify.js"
click node_search "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/search.js"
click node_daily_display "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/daily-display.js"
click node_database "https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/local-database.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_local_server,node_hosted_api,node_vercel_api,node_daily_job,node_handler,node_user toneBlue
class node_schedule,node_planning,node_environments,node_reservations,node_key_control,node_environment_import toneAmber
class node_calendar_export,node_teacher_export,node_ics,node_excel_preview,node_management_report,node_notifications,node_search,node_daily_display toneMint
class node_database toneRose
```

## Components

### Entrypoints

- [Local server](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/server.js): `server.js`
- [Hosted API](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/netlify/functions/api.js): `netlify/functions/api.js`
- [Vercel API](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/api/index.js): `api/index.js`
- [Daily job](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/netlify/functions/cron.js): `netlify/functions/cron.js`
- [Request handler](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/core.js): `lib/core.js`

### Planning domains

- [Class schedules](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/schedule.js): `lib/schedule.js`
- [Planning rules](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/planning.js): `lib/planning.js`
- [Environment registry](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/environments.js): `lib/environments.js`
- [Reservations](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/reservations.js): `lib/reservations.js`
- [Key control](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/key-control.js): `lib/key-control.js`
- [Environment import](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/environment-import.js): `lib/environment-import.js`

### Exports and support

- [Class calendar export](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/calendar-export.js): `lib/calendar-export.js`
- [Teacher calendar export](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/teacher-calendar-export.js): `lib/teacher-calendar-export.js`
- [Calendar subscriptions](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/ics.js): `lib/ics.js`
- [Excel preview](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/excel-preview.js): `lib/excel-preview.js`
- [Management reports](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/management-report.js): `lib/management-report.js`
- [Notifications](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/notify.js): `lib/notify.js`
- [Search](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/search.js): `lib/search.js`
- [Daily program display](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/daily-display.js): `lib/daily-display.js`

### Persistence

- [Application database](https://github.com/gizelle-alcantara/planejador-de-aulas-/blob/main/lib/local-database.js): `lib/local-database.js`

### Other components

- **Web user**

## Connections

- Web user → Local server: sends requests (evidence: `server.js`)
- Local server → Request handler: routes API (evidence: `server.js`)
- Hosted API → Request handler: forwards requests (evidence: `netlify/functions/api.js`)
- Vercel API → Request handler: forwards requests (evidence: `api/index.js`)
- Daily job → Request handler: runs daily task (evidence: `netlify/functions/cron.js`)
- Request handler → Key control: uses (evidence: `lib/core.js`)
- Request handler → Environment import: uses (evidence: `lib/core.js`)
- Request handler → Daily program display: uses (evidence: `lib/core.js`)
- Request handler → Planning rules: uses (evidence: `lib/core.js`)
- Request handler → Management reports: uses (evidence: `lib/core.js`)
- Request handler → Class schedules: uses (evidence: `lib/core.js`)
- Request handler → Excel preview: uses (evidence: `lib/core.js`)
- Request handler → Class calendar export: uses (evidence: `lib/core.js`)
- Request handler → Teacher calendar export: uses (evidence: `lib/core.js`)
- Request handler → Calendar subscriptions: uses (evidence: `lib/core.js`)
- Environment registry → Class schedules: projects lessons (evidence: `lib/environments.js`)
- Calendar subscriptions → Class schedules: reads schedule blocks (evidence: `lib/ics.js`)
- Class calendar export → Class schedules: reads schedule blocks (evidence: `lib/calendar-export.js`)
- Class calendar export → Excel preview: preview workflow
- Request handler → Application database: persists application data (evidence: `lib/core.js`)
