# lojinhadosautistas/web architecture

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

- Interactive diagram: https://gitdiagram.com/lojinhadosautistas/web
- Repository: https://github.com/lojinhadosautistas/web

## Overview

1. This repository is a mostly static, multi-page web platform rather than a single app. The architecture is organized as many HTML entry points grouped by domain, with local CSS/JS assets providing behavior and styling.

2. The top-level “rede” area is the main product surface for the Autistas.net ecosystem. It contains the central hub, login pages, documents, calendar, conceptual structure pages, maps/mind-maps, and the core “oraculo”, “atlas”, “prisma”, “ram”, and “memo” experiences.

3. Shared cross-cutting code lives in reusable front-end files such as `rede/js/*`, `rede/components/*`, and top-level `assets/js` / `assets/css`. These appear to provide common layout, header/sidebar composition, global styles, auth handling, role logic, and page-level behavior reused across many pages.

4. Authentication and access control are an important boundary. The presence of `rede/js/firebase.js`, `auth-login.js`, `auth-hub.js`, and `roles.js` indicates that some pages gate content based on login state and user roles, with Firebase as the external identity/data service.

5. Content is heavily document- and media-driven. PDFs, HTML fragments, audio files, images, and manifests are stored alongside the pages, especially under `rede/acervo`, `rede/atlas`, `rede/atipicos`, `rede/fabularium`, and `rede/oraculo`. The app is clearly meant to curate and present knowledge artifacts, not just interactive UI.

6. The `rede/acervo` subtree acts like a content repository/knowledge archive. It includes a manifest, fragment HTML partials, includes scripts, packaged HTML bundles, and many PDF “dossiê” / “relatório” files, suggesting a modular publication layer that can be assembled into different views.

7. The `oraculo` subsystem is a specialized analytical/simulation area. It has many versioned dashboard, simulator, and atlas pages plus a suite of numbered `biblioteca*.js` files, indicating a reusable library layer powering multiple visualizations or workflows.

8. The `atlas` and `livraria` areas are separate content products with their own CSS/JS and media. `atlas` includes multiple versioned variants and companion audio/docs, while `livraria` provides book-oriented pages and supporting styles, implying distinct user journeys within the same platform.

9. There is a small server-side boundary in `rede/backend` with a Node-style `package.json` and `server.js`. This is likely the only backend service in the repo and probably supports serving or API needs for the otherwise static front-end platform.

10. Several subtrees are clearly adjacent product lines or branded microsites, not just feature folders: `rede-dev/terrabrasil`, `rede-dev/icaro`, `rede/atipicos`, `rede/fabularium`, `rede/oraculo`, and `jogos` / `eventos`. Each has its own HTML entry points and, in some cases, dedicated CSS/JS/media, so the diagram should show them as semi-independent modules sharing a common design/identity layer.

11. Versioning is mostly file-level rather than package-level. The many `v1/v2/v3` HTML pages, “old” CSS files, and alternate copies of the same screens show iterative evolution and parallel variants rather than a strict component framework.

12. Deployment appears to be static hosting oriented, reinforced by `CNAME` at the root. That means most runtime behavior is client-side, with content and navigation assembled from local files and a few external services or backend endpoints where needed.

Main entry points: [`rede/documentos.html`](https://github.com/lojinhadosautistas/web/blob/main/rede/documentos.html) (Core pages), [`assets/css`](https://github.com/lojinhadosautistas/web/tree/main/assets/css) (Global CSS), [`rede/hub.html`](https://github.com/lojinhadosautistas/web/blob/main/rede/hub.html) (Rede hub), [`rede/js`](https://github.com/lojinhadosautistas/web/tree/main/rede/js) (Auth layer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_shared["Shared shell"]
  node_node_assets_js["Global JS<br/>shared scripts"]
  node_node_assets_css["Global CSS<br/>shared styles"]
  node_node_components["Components<br/>layout partials"]
  node_node_auth["Auth layer<br/>firebase auth"]
end

subgraph group_group_rede_main["REDE core"]
  node_node_rede_hub(("Rede hub<br/>main portal<br/>[hub.html]"))
  node_node_rede_login["Login pages<br/>access gates<br/>[login.html]"]
  node_node_rede_shell["Core pages<br/>product pages<br/>[documentos.html]"]
  node_node_rede_maps["Maps layer<br/>navigation views<br/>[mapa.html]"]
  node_node_rede_prisma["Prisma<br/>analysis view<br/>[prisma.html]"]
  node_node_rede_ram["RAM views<br/>workflow pages<br/>[ram-global.html]"]
  node_node_rede_oraculo["Oraculo<br/>analytical suite"]
end

subgraph group_group_rede_content["Content archives"]
  node_node_acervo[("Acervo<br/>knowledge archive")]
  node_node_atlas[("Atlas<br/>content product")]
  node_node_atipicos[("Atipicos<br/>media collection")]
  node_node_fabularium[("Fabularium<br/>audio series")]
end

subgraph group_group_products["Adjacent products"]
  node_node_livraria["Livraria<br/>book pages<br/>[livraria.html]"]
  node_node_jogos["Jogos<br/>playground<br/>[jogos.html]"]
  node_node_eventos["Eventos<br/>event pages<br/>[entrepassos.html]"]
  node_node_terrabrasil["Terrabrasil<br/>microsite<br/>[index.html]"]
  node_node_icaro["Icaro<br/>microsite<br/>[icaro.html]"]
end

subgraph group_group_backend["Backend"]
  node_node_backend["Backend API<br/>node server<br/>[server.js]"]
end

node_node_assets_js -->|"page behavior"| node_node_rede_hub
node_node_assets_css -->|"theme"| node_node_rede_hub
node_node_components -->|"layout"| node_node_rede_shell
node_node_auth -->|"gate access"| node_node_rede_login
node_node_auth -->|"role-aware"| node_node_rede_hub
node_node_auth -->|"permissions"| node_node_rede_shell
node_node_rede_hub -->|"navigate"| node_node_rede_shell
node_node_rede_shell -->|"concept map"| node_node_rede_maps
node_node_rede_shell -->|"specialized view"| node_node_rede_prisma
node_node_rede_shell -->|"workflow"| node_node_rede_ram
node_node_rede_shell -->|"analysis"| node_node_rede_oraculo
node_node_acervo -->|"feeds content"| node_node_rede_shell
node_node_acervo -->|"shared style"| node_node_assets_css
node_node_atlas -->|"publishes"| node_node_rede_shell
node_node_atipicos -->|"cross-links"| node_node_rede_shell
node_node_fabularium -->|"cross-links"| node_node_rede_shell
node_node_livraria -->|"content journey"| node_node_rede_shell
node_node_jogos -->|"interactive content"| node_node_rede_shell
node_node_eventos -->|"events"| node_node_rede_shell
node_node_terrabrasil -->|"site assets"| node_node_assets_css
node_node_icaro -->|"site assets"| node_node_assets_css
node_node_backend -.->|"serves/supports"| node_node_rede_shell

click node_node_assets_js "https://github.com/lojinhadosautistas/web/tree/main/assets/js"
click node_node_assets_css "https://github.com/lojinhadosautistas/web/tree/main/assets/css"
click node_node_components "https://github.com/lojinhadosautistas/web/tree/main/rede/components"
click node_node_auth "https://github.com/lojinhadosautistas/web/tree/main/rede/js"
click node_node_rede_hub "https://github.com/lojinhadosautistas/web/blob/main/rede/hub.html"
click node_node_rede_login "https://github.com/lojinhadosautistas/web/blob/main/rede/login.html"
click node_node_rede_shell "https://github.com/lojinhadosautistas/web/blob/main/rede/documentos.html"
click node_node_rede_maps "https://github.com/lojinhadosautistas/web/blob/main/rede/mapa.html"
click node_node_rede_prisma "https://github.com/lojinhadosautistas/web/blob/main/rede/prisma.html"
click node_node_rede_ram "https://github.com/lojinhadosautistas/web/blob/main/rede/ram-global.html"
click node_node_rede_oraculo "https://github.com/lojinhadosautistas/web/blob/main/rede/oraculo/oraculo-dashboard.html"
click node_node_acervo "https://github.com/lojinhadosautistas/web/tree/main/rede/acervo"
click node_node_atlas "https://github.com/lojinhadosautistas/web/tree/main/rede/atlas"
click node_node_atipicos "https://github.com/lojinhadosautistas/web/tree/main/rede/atipicos"
click node_node_fabularium "https://github.com/lojinhadosautistas/web/tree/main/rede/fabularium"
click node_node_livraria "https://github.com/lojinhadosautistas/web/blob/main/livraria/livraria.html"
click node_node_jogos "https://github.com/lojinhadosautistas/web/blob/main/jogos/jogos.html"
click node_node_eventos "https://github.com/lojinhadosautistas/web/blob/main/eventos/entrepassos.html"
click node_node_terrabrasil "https://github.com/lojinhadosautistas/web/blob/main/rede-dev/terrabrasil/index.html"
click node_node_icaro "https://github.com/lojinhadosautistas/web/blob/main/rede-dev/icaro/icaro.html"
click node_node_backend "https://github.com/lojinhadosautistas/web/blob/main/rede/backend/server.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_node_assets_js,node_node_assets_css,node_node_components,node_node_auth toneBlue
class node_node_rede_hub,node_node_rede_login,node_node_rede_shell,node_node_rede_maps,node_node_rede_prisma,node_node_rede_ram,node_node_rede_oraculo toneAmber
class node_node_acervo,node_node_atlas,node_node_atipicos,node_node_fabularium toneMint
class node_node_livraria,node_node_jogos,node_node_eventos,node_node_terrabrasil,node_node_icaro toneRose
class node_node_backend toneIndigo
```

## Components

### Shared shell

Common front-end assets and reusable UI/auth code shared across many pages.

- [Global JS](https://github.com/lojinhadosautistas/web/tree/main/assets/js): shared scripts · Top-level JavaScript reused across hub/login/page behaviors. · `assets/js`
- [Global CSS](https://github.com/lojinhadosautistas/web/tree/main/assets/css): shared styles · Top-level styles and legacy variants for the platform shell. · `assets/css`
- [Components](https://github.com/lojinhadosautistas/web/tree/main/rede/components): layout partials · Reusable header, sidebar, and assembly helpers. · `rede/components`
- [Auth layer](https://github.com/lojinhadosautistas/web/tree/main/rede/js): firebase auth · Login, hub auth, Firebase wiring, and role checks. · `rede/js`

### REDE core

Main product surface for navigation, documents, maps, calendar, and account-gated pages.

- [Rede hub](https://github.com/lojinhadosautistas/web/blob/main/rede/hub.html): main portal · Primary landing and navigation surface for the REDE ecosystem. · `rede/hub.html`
- [Login pages](https://github.com/lojinhadosautistas/web/blob/main/rede/login.html): access gates · Entry points for authenticated access and special login flows. · `rede/login.html`
- [Core pages](https://github.com/lojinhadosautistas/web/blob/main/rede/documentos.html): product pages · Main REDE pages for documents, structure, maps, calendar, memo, and related hubs. · `rede/documentos.html`
- [Maps layer](https://github.com/lojinhadosautistas/web/blob/main/rede/mapa.html): navigation views · Map and mind-map entry points that organize the platform conceptually. · `rede/mapa.html`
- [Prisma](https://github.com/lojinhadosautistas/web/blob/main/rede/prisma.html): analysis view · Focused REDE area for situational prism workflows and related variants. · `rede/prisma.html`
- [RAM views](https://github.com/lojinhadosautistas/web/blob/main/rede/ram-global.html): workflow pages · RAM-specific pages and variants tied to the REDE core experience. · `rede/ram-global.html`
- [Oraculo](https://github.com/lojinhadosautistas/web/blob/main/rede/oraculo/oraculo-dashboard.html): analytical suite · Versioned dashboards, simulations, chat, and reports for the Oraculo subsystem. · `rede/oraculo/oraculo-dashboard.html`

### Content archives

Document- and media-heavy collections used by REDE experiences.

- [Acervo](https://github.com/lojinhadosautistas/web/tree/main/rede/acervo): knowledge archive · Manifest-driven archive with fragments, packaged views, and PDFs. · `rede/acervo`
- [Atlas](https://github.com/lojinhadosautistas/web/tree/main/rede/atlas): content product · Atlas cognitive pages with multiple versions, media, and supporting docs. · `rede/atlas`
- [Atipicos](https://github.com/lojinhadosautistas/web/tree/main/rede/atipicos): media collection · Music-and-image driven content area with audio tracks and lyric support. · `rede/atipicos`
- [Fabularium](https://github.com/lojinhadosautistas/web/tree/main/rede/fabularium): audio series · Story and audio-oriented content collection. · `rede/fabularium`

### Adjacent products

Semi-independent microsites and specialized experiences that share the visual language.

- [Livraria](https://github.com/lojinhadosautistas/web/blob/main/livraria/livraria.html): book pages · Book-centric pages and supporting styles for reading journeys. · `livraria/livraria.html`
- [Jogos](https://github.com/lojinhadosautistas/web/blob/main/jogos/jogos.html): playground · Collection of game-like pages and exercises. · `jogos/jogos.html`
- [Eventos](https://github.com/lojinhadosautistas/web/blob/main/eventos/entrepassos.html): event pages · Standalone event pages and microsite content. · `eventos/entrepassos.html`
- [Terrabrasil](https://github.com/lojinhadosautistas/web/blob/main/rede-dev/terrabrasil/index.html): microsite · Separate branded site with its own front-end stack and assets. · `rede-dev/terrabrasil/index.html`
- [Icaro](https://github.com/lojinhadosautistas/web/blob/main/rede-dev/icaro/icaro.html): microsite · Adjacent product line with many versioned landing and dashboard pages. · `rede-dev/icaro/icaro.html`

### Backend

Small server-side boundary supporting the otherwise static platform.

- [Backend API](https://github.com/lojinhadosautistas/web/blob/main/rede/backend/server.js): node server · Small Node-based server boundary for serving or supporting the platform. · `rede/backend/server.js`

## Connections

- Global JS → Rede hub: page behavior · Global JavaScript powers hub interactions and shared client behavior.
- Global CSS → Rede hub: theme · Shared styles define the common platform look and feel.
- Components → Core pages: layout · Reusable header/sidebar composition appears across core pages.
- Auth layer → Login pages: gate access · Authentication scripts handle login and special access flows.
- Auth layer → Rede hub: role-aware · Hub logic depends on login state and user roles.
- Auth layer → Core pages: permissions · Core pages use auth and role checks where content is gated.
- Rede hub → Core pages: navigate · The hub routes users into the main REDE pages.
- Core pages → Maps layer: concept map · Core pages connect to map and mind-map views for orientation.
- Core pages → Prisma: specialized view · Prisma is part of the core REDE product surface.
- Core pages → RAM views: workflow · RAM pages are another core workflow branch within REDE.
- Core pages → Oraculo: analysis · Oraculo provides the analytical and simulation side of REDE.
- Acervo → Core pages: feeds content · Archive artifacts are consumed by document and core pages.
- Acervo → Global CSS: shared style · Archive fragments use shared presentation styles.
- Atlas → Core pages: publishes · Atlas is a distinct content area linked from the REDE core.
- Atipicos → Core pages: cross-links · Atipicos acts as a neighboring branded content line.
- Fabularium → Core pages: cross-links · Fabularium is another content-heavy branch adjacent to the core.
- Livraria → Core pages: content journey · Livraria provides a separate book-oriented journey within the platform.
- Jogos → Core pages: interactive content · Games are a companion experience to the main REDE surface.
- Eventos → Core pages: events · Event pages extend the platform with standalone event microsites.
- Terrabrasil → Global CSS: site assets · Terrabrasil has its own front-end stack but shares the static-hosting pattern.
- Icaro → Global CSS: site assets · Icaro is a separate branded product line with versioned pages.
- Backend API → Core pages: serves/supports · Backend service likely supports serving and integration needs for the static front end.
