# unb-mds/2026-2-glossariounb architecture

> Architecture diagram of the GitHub repository unb-mds/2026-2-glossariounb, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/unb-mds/2026-2-glossariounb
- Repository: https://github.com/unb-mds/2026-2-glossariounb

## Overview

Glossário UnB is a static, collaborative glossary delivered as a browser PWA. A visitor searches or browses terms, optionally filters by type or campus, and opens a term for its definition, example, source and, where available, location. The app loads and validates the JSON catalog before rendering; the service worker supports offline use. The README also identifies a separate project-presentation site. The sampled source shows the main app, domain rules, validation and caching; some page and map wiring is documented only indirectly, so uncertain links are dashed.

Main entry points: [`frontend/js/app.js`](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/app.js) (Glossary app), [`frontend/sw.js`](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/sw.js) (Offline service worker), [`frontend/js/termos.js`](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/termos.js) (Search and filter rules), [`frontend/index.html`](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/index.html) (Glossary home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Glossary experience"]
  node_app["Glossary app<br/>[app.js]"]
  node_search["Term search<br/>[app.js]"]
  node_browse["Filtered browsing<br/>[app.js]"]
  node_detail["Term details<br/>[app.js]"]
  node_map["Location map<br/>[app.js]"]
  node_home["Glossary home<br/>[index.html]"]
  node_allterms["All terms page<br/>[todas-siglas.html]"]
  node_termpage["Term page<br/>[termo.html]"]
end

subgraph group_domain["Term domain"]
  node_domain["Search and filter rules<br/>[termos.js]"]
  node_validation["Term schema validation<br/>[validacao-termo.js]"]
  node_catalog["Glossary catalog<br/>[termos.json]"]
end

subgraph group_delivery["PWA delivery"]
  node_serviceworker["Offline service worker<br/>[sw.js]"]
  node_manifest["PWA manifest<br/>[manifest.json]"]
  node_styles["Glossary styling<br/>[styles.css]"]
end

subgraph group_project["Project presentation"]
  node_sobre["Project presentation<br/>[index.html]"]
end

node_visitor(("Glossary visitor"))
node_maplibrary["Leaflet map library"]
node_maptiles["OpenStreetMap tiles"]

node_visitor -.->|"opens"| node_home
node_visitor -.->|"browses"| node_allterms
node_visitor -.->|"opens"| node_termpage
node_visitor -.->|"views"| node_sobre
node_app -.->|"fetches"| node_catalog
node_app -->|"calls"| node_domain
node_app -->|"validates with"| node_validation
node_app -->|"initializes"| node_search
node_app -->|"initializes"| node_browse
node_app -->|"initializes"| node_detail
node_search -->|"searches with"| node_domain
node_browse -->|"filters with"| node_domain
node_detail -->|"finds term with"| node_domain
node_detail -->|"renders"| node_map
node_app -->|"registers"| node_serviceworker
node_serviceworker -->|"caches"| node_catalog
node_serviceworker -->|"pre-caches"| node_home
node_serviceworker -->|"pre-caches"| node_allterms
node_serviceworker -->|"pre-caches"| node_termpage
node_serviceworker -->|"pre-caches"| node_styles
node_map -.->|"uses"| node_maplibrary
node_map -.->|"requests tiles"| node_maptiles

click node_app "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/app.js"
click node_search "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/app.js"
click node_browse "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/app.js"
click node_detail "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/app.js"
click node_map "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/app.js"
click node_home "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/index.html"
click node_allterms "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/todas-siglas.html"
click node_termpage "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/termo.html"
click node_domain "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/termos.js"
click node_validation "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/validacao-termo.js"
click node_catalog "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/data/termos.json"
click node_serviceworker "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/sw.js"
click node_manifest "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/manifest.json"
click node_styles "https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/styles.css"
click node_sobre "https://github.com/unb-mds/2026-2-glossariounb/blob/main/sobre/index.html"

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_search,node_browse,node_detail,node_map,node_home,node_allterms,node_termpage toneBlue
class node_domain,node_validation,node_catalog toneAmber
class node_serviceworker,node_manifest,node_styles toneMint
class node_sobre toneRose
class node_visitor,node_maplibrary,node_maptiles toneIndigo
```

## Components

### Glossary experience

- [Glossary app](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [Term search](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [Filtered browsing](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [Term details](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [Location map](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/app.js): `frontend/js/app.js`
- [Glossary home](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/index.html): `frontend/index.html`
- [All terms page](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/todas-siglas.html): `frontend/todas-siglas.html`
- [Term page](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/termo.html): `frontend/termo.html`

### Term domain

- [Search and filter rules](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/termos.js): `frontend/js/termos.js`
- [Term schema validation](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/js/validacao-termo.js): `frontend/js/validacao-termo.js`
- [Glossary catalog](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/data/termos.json): `frontend/data/termos.json`

### PWA delivery

- [Offline service worker](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/sw.js): `frontend/sw.js`
- [PWA manifest](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/manifest.json): `frontend/manifest.json`
- [Glossary styling](https://github.com/unb-mds/2026-2-glossariounb/blob/main/frontend/styles.css): `frontend/styles.css`

### Project presentation

- [Project presentation](https://github.com/unb-mds/2026-2-glossariounb/blob/main/sobre/index.html): `sobre/index.html`

### Other components

- **Glossary visitor**
- **Leaflet map library**
- **OpenStreetMap tiles**

## Connections

- Glossary visitor → Glossary home: opens (evidence: `README.md`)
- Glossary visitor → All terms page: browses (evidence: `README.md`)
- Glossary visitor → Term page: opens (evidence: `README.md`)
- Glossary visitor → Project presentation: views (evidence: `README.md`)
- Glossary app → Glossary catalog: fetches
- Glossary app → Search and filter rules: calls (evidence: `frontend/js/app.js`)
- Glossary app → Term schema validation: validates with (evidence: `frontend/js/app.js`)
- Glossary app → Term search: initializes (evidence: `frontend/js/app.js`)
- Glossary app → Filtered browsing: initializes (evidence: `frontend/js/app.js`)
- Glossary app → Term details: initializes (evidence: `frontend/js/app.js`)
- Term search → Search and filter rules: searches with (evidence: `frontend/js/app.js`)
- Filtered browsing → Search and filter rules: filters with (evidence: `frontend/js/app.js`)
- Term details → Search and filter rules: finds term with (evidence: `frontend/js/app.js`)
- Term details → Location map: renders (evidence: `frontend/js/app.js`)
- Glossary app → Offline service worker: registers (evidence: `frontend/js/app.js`)
- Offline service worker → Glossary catalog: caches (evidence: `frontend/sw.js`)
- Offline service worker → Glossary home: pre-caches (evidence: `frontend/sw.js`)
- Offline service worker → All terms page: pre-caches (evidence: `frontend/sw.js`)
- Offline service worker → Term page: pre-caches (evidence: `frontend/sw.js`)
- Offline service worker → Glossary styling: pre-caches (evidence: `frontend/sw.js`)
- Location map → Leaflet map library: uses
- Location map → OpenStreetMap tiles: requests tiles
