# zerosatus/projecto-zero-satus architecture

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

- Interactive diagram: https://gitdiagram.com/zerosatus/projecto-zero-satus
- Repository: https://github.com/zerosatus/projecto-zero-satus

## Overview

Zero Satus is a student productivity application with desktop and mobile panels, login, study-management features, AI/document services, and an admin panel; the repository also contains a separate animated presentation site. The principal workflow is user sign-in, loading the panel and cached/cloud data, then using productivity features. Edges are limited to relationships visible in excerpts or documented in the README; many listed modules were not sampled, so their internal wiring is not inferred.

Main entry points: [`TELAS/mobile-telas/cache-manager.js`](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/mobile-telas/cache-manager.js) (Local cache and sync), [`js/main.js`](https://github.com/zerosatus/projecto-zero-satus/blob/main/js/main.js) (Presentation loader), [`TELAS/login/script.js`](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/login/script.js) (Login and sessions), [`TELAS/app.js`](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/app.js) (Desktop panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_panel["Student panels"]
  node_login["Login and sessions<br/>[script.js]"]
  node_desktop["Desktop panel<br/>[app.js]"]
  node_mobile["Mobile panel<br/>[app.js]"]
  node_focus["Focus mode<br/>[script.js]"]
  node_documents["Document management<br/>[documentos.js]"]
  node_calendar["Calendar and schedule<br/>[calendario.js]"]
  node_tasks["Tasks<br/>[tarefas.js]"]
  node_notes["Notes<br/>[anotacoes.js]"]
  node_dashboard["Dashboard<br/>[dashboard.js]"]
  node_pcnotify["PC notifications<br/>[notification-pc.js]"]
  node_tasknotify["Task notifications<br/>[task-notifier.js]"]
end

subgraph group_data["Data and services"]
  node_cache["Local cache and sync<br/>[cache-manager.js]"]
  node_desktopdb["Desktop data service"]
  node_mobiledb["Mobile data service"]
  node_supabaseclient["Mobile Supabase client<br/>[supabase-client.js]"]
  node_supabase[("Supabase")]
  node_ai["AI assistant service<br/>[ia-service.js]"]
  node_aihistory["AI conversation history<br/>[neon-service.js]"]
  node_turso[("Turso document store<br/>[turso-service.js]")]
end

subgraph group_admin["Administration"]
  node_adminapp["Admin panel<br/>[admin.js]"]
  node_adminauth["Admin authentication<br/>[auth.js]"]
  node_adminnotifications["Admin notifications<br/>[notifications.js]"]
end

subgraph group_presentation["Presentation site"]
  node_presentation["Presentation loader<br/>[main.js]"]
  node_chapters["Presentation chapters<br/>[foco.js]"]
  node_organize["Organization chapter<br/>[organizacao.js]"]
  node_engine["Animation engine<br/>[fx.js]"]
end

node_student(("Student"))

node_student -->|"signs in"| node_login
node_login -->|"loads cloud data"| node_cache
node_student -.->|"uses panel"| node_desktop
node_student -.->|"uses panel"| node_mobile
node_desktop -->|"reads cached data"| node_cache
node_mobile -->|"reads cached data"| node_cache
node_cache -->|"ensures database"| node_mobiledb
node_desktopdb -.->|"accesses data"| node_supabase
node_supabaseclient -.->|"connects"| node_supabase
node_ai -->|"calls AI function"| node_supabase
node_aihistory -->|"calls history proxy"| node_supabase
node_student -.->|"plans schedule"| node_calendar
node_student -.->|"manages tasks"| node_tasks
node_student -.->|"takes notes"| node_notes
node_student -.->|"administers"| node_adminapp
node_adminauth -->|"checks role"| node_supabase
node_presentation -->|"loads engine"| node_engine
node_presentation -->|"loads chapters"| node_chapters
node_presentation -->|"loads chapter"| node_organize

click node_login "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/login/script.js"
click node_desktop "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/app.js"
click node_mobile "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/mobile-telas/app.js"
click node_focus "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/mobile-telas/modo-foco/script.js"
click node_documents "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/mobile-telas/modules/documentos.js"
click node_calendar "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/calendario.js"
click node_tasks "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/tarefas.js"
click node_notes "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/anotacoes.js"
click node_dashboard "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/dashboard.js"
click node_cache "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/mobile-telas/cache-manager.js"
click node_desktopdb "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/database-service.js"
click node_mobiledb "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/mobile-telas/database-service.js"
click node_supabaseclient "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/mobile-telas/supabase-client.js"
click node_ai "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/ia-service.js"
click node_aihistory "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/neon-service.js"
click node_turso "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/turso-service.js"
click node_adminapp "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/admin/admin.js"
click node_adminauth "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/admin/modules/auth.js"
click node_adminnotifications "https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/admin/modules/notifications.js"
click node_presentation "https://github.com/zerosatus/projecto-zero-satus/blob/main/js/main.js"
click node_chapters "https://github.com/zerosatus/projecto-zero-satus/blob/main/js/chapters/foco.js"
click node_organize "https://github.com/zerosatus/projecto-zero-satus/blob/main/js/chapters/organizacao.js"
click node_engine "https://github.com/zerosatus/projecto-zero-satus/blob/main/js/engine/fx.js"
click node_pcnotify "https://github.com/zerosatus/projecto-zero-satus/blob/main/pc-pwa/notification-pc.js"
click node_tasknotify "https://github.com/zerosatus/projecto-zero-satus/blob/main/pc-pwa/task-notifier.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_login,node_desktop,node_mobile,node_focus,node_documents,node_calendar,node_tasks,node_notes,node_dashboard,node_pcnotify,node_tasknotify toneBlue
class node_cache,node_desktopdb,node_mobiledb,node_supabaseclient,node_supabase,node_ai,node_aihistory,node_turso toneAmber
class node_adminapp,node_adminauth,node_adminnotifications toneMint
class node_presentation,node_chapters,node_organize,node_engine toneRose
class node_student toneIndigo
```

## Components

### Student panels

- [Login and sessions](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/login/script.js): `TELAS/login/script.js`
- [Desktop panel](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/app.js): `TELAS/app.js`
- [Mobile panel](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/mobile-telas/app.js): `TELAS/mobile-telas/app.js`
- [Focus mode](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/mobile-telas/modo-foco/script.js): `TELAS/mobile-telas/modo-foco/script.js`
- [Document management](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/mobile-telas/modules/documentos.js): `TELAS/mobile-telas/modules/documentos.js`
- [Calendar and schedule](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/calendario.js): `TELAS/modules/calendario.js`
- [Tasks](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/tarefas.js): `TELAS/modules/tarefas.js`
- [Notes](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/anotacoes.js): `TELAS/modules/anotacoes.js`
- [Dashboard](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/dashboard.js): `TELAS/modules/dashboard.js`
- [PC notifications](https://github.com/zerosatus/projecto-zero-satus/blob/main/pc-pwa/notification-pc.js): `pc-pwa/notification-pc.js`
- [Task notifications](https://github.com/zerosatus/projecto-zero-satus/blob/main/pc-pwa/task-notifier.js): `pc-pwa/task-notifier.js`

### Data and services

- [Local cache and sync](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/mobile-telas/cache-manager.js): `TELAS/mobile-telas/cache-manager.js`
- [Desktop data service](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/database-service.js): `TELAS/database-service.js`
- [Mobile data service](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/mobile-telas/database-service.js): `TELAS/mobile-telas/database-service.js`
- [Mobile Supabase client](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/mobile-telas/supabase-client.js): `TELAS/mobile-telas/supabase-client.js`
- **Supabase**
- [AI assistant service](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/ia-service.js): `TELAS/modules/ia-service.js`
- [AI conversation history](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/neon-service.js): `TELAS/modules/neon-service.js`
- [Turso document store](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/modules/turso-service.js): `TELAS/modules/turso-service.js`

### Administration

- [Admin panel](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/admin/admin.js): `TELAS/admin/admin.js`
- [Admin authentication](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/admin/modules/auth.js): `TELAS/admin/modules/auth.js`
- [Admin notifications](https://github.com/zerosatus/projecto-zero-satus/blob/main/TELAS/admin/modules/notifications.js): `TELAS/admin/modules/notifications.js`

### Presentation site

- [Presentation loader](https://github.com/zerosatus/projecto-zero-satus/blob/main/js/main.js): `js/main.js`
- [Presentation chapters](https://github.com/zerosatus/projecto-zero-satus/blob/main/js/chapters/foco.js): `js/chapters/foco.js`
- [Organization chapter](https://github.com/zerosatus/projecto-zero-satus/blob/main/js/chapters/organizacao.js): `js/chapters/organizacao.js`
- [Animation engine](https://github.com/zerosatus/projecto-zero-satus/blob/main/js/engine/fx.js): `js/engine/fx.js`

### Other components

- **Student**

## Connections

- Student → Login and sessions: signs in (evidence: `TELAS/login/script.js`)
- Login and sessions → Local cache and sync: loads cloud data (evidence: `TELAS/login/script.js`)
- Student → Desktop panel: uses panel (evidence: `README.md`)
- Student → Mobile panel: uses panel (evidence: `README.md`)
- Desktop panel → Local cache and sync: reads cached data (evidence: `TELAS/app.js`)
- Mobile panel → Local cache and sync: reads cached data (evidence: `TELAS/mobile-telas/app.js`)
- Local cache and sync → Mobile data service: ensures database (evidence: `TELAS/mobile-telas/cache-manager.js`)
- Desktop data service → Supabase: accesses data
- Mobile Supabase client → Supabase: connects
- AI assistant service → Supabase: calls AI function (evidence: `TELAS/modules/ia-service.js`)
- AI conversation history → Supabase: calls history proxy (evidence: `TELAS/modules/neon-service.js`)
- Student → Calendar and schedule: plans schedule (evidence: `README.md`)
- Student → Tasks: manages tasks (evidence: `README.md`)
- Student → Notes: takes notes (evidence: `README.md`)
- Student → Admin panel: administers
- Admin authentication → Supabase: checks role (evidence: `TELAS/admin/modules/auth.js`)
- Presentation loader → Animation engine: loads engine (evidence: `js/main.js`)
- Presentation loader → Presentation chapters: loads chapters (evidence: `js/main.js`)
- Presentation loader → Organization chapter: loads chapter (evidence: `js/main.js`)
