# ssillva1413/projeto-hmaa architecture

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

- Interactive diagram: https://gitdiagram.com/ssillva1413/projeto-hmaa
- Repository: https://github.com/ssillva1413/projeto-hmaa
- Video tour (about a minute): https://gitdiagram.com/ssillva1413/projeto-hmaa/video

## Overview

This repository implements a public website for Hospital e Maternidade Agenor Araújo, alongside a small Express API for two submissions. Visitors browse hospital information, services, news and transparency materials; they can send an ombudsman manifestation or submit a résumé. The routes and sampled form handlers establish those flows. Other listed pages and downloadable materials are represented as documented by the tree, but their implementation and wiring were not sampled.

Main entry points: [`src/routes.jsx`](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/routes.jsx) (Page routes), [`server.js`](https://github.com/ssillva1413/projeto-hmaa/blob/main/server.js) (Express API), [`src/App.jsx`](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/App.jsx) (React app), [`src/pages/PageBase/index.jsx`](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/PageBase/index.jsx) (Shared page shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Website shell"]
  node_app["React app<br/>[App.jsx]"]
  node_routes["Page routes<br/>[routes.jsx]"]
  node_pagebase["Shared page shell<br/>[index.jsx]"]
  node_header["Site navigation<br/>[index.jsx]"]
end

subgraph group_content["Public information"]
  node_home["Home<br/>[index.jsx]"]
  node_hospitalinfo["Hospital information"]
  node_clinic["Clinic and card<br/>[index.jsx]"]
  node_news["News<br/>[index.jsx]"]
  node_newsdetail["News details<br/>[index.jsx]"]
  node_transparency["Transparency portal<br/>[index.jsx]"]
  node_publicdocs["Public documents"]
end

subgraph group_submissions["Form submissions"]
  node_ombudsman["Ombudsman form<br/>[index.jsx]"]
  node_careers["Careers form<br/>[index.jsx]"]
end

subgraph group_backend["Submission backend"]
  node_api["Express API<br/>[server.js]"]
  node_manifestationdb[("Manifestation storage<br/>[db.js]")]
  node_upload["Résumé upload<br/>[server.js]"]
end

node_visitor(("Visitor"))
node_captcha["Google reCAPTCHA"]
node_mailer["Gmail mail service"]

node_visitor -->|"opens site"| node_app
node_app -->|"renders"| node_routes
node_routes -->|"wraps pages"| node_pagebase
node_pagebase -->|"shows navigation"| node_header
node_routes -->|"dispatches"| node_home
node_routes -->|"dispatches"| node_hospitalinfo
node_routes -->|"dispatches"| node_clinic
node_routes -->|"dispatches"| node_news
node_routes -->|"dispatches"| node_newsdetail
node_routes -->|"dispatches"| node_transparency
node_transparency -->|"links materials"| node_publicdocs
node_routes -->|"dispatches"| node_ombudsman
node_routes -->|"dispatches"| node_careers
node_ombudsman -->|"posts manifestation"| node_api
node_api -->|"saves record"| node_manifestationdb
node_careers -->|"uploads résumé"| node_api
node_api -->|"verifies token"| node_captcha
node_api -->|"stores temporarily"| node_upload
node_api -->|"sends résumé"| node_mailer

click node_app "https://github.com/ssillva1413/projeto-hmaa/blob/main/src/App.jsx"
click node_routes "https://github.com/ssillva1413/projeto-hmaa/blob/main/src/routes.jsx"
click node_pagebase "https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/PageBase/index.jsx"
click node_header "https://github.com/ssillva1413/projeto-hmaa/blob/main/src/components/Header/index.jsx"
click node_home "https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/Home/index.jsx"
click node_hospitalinfo "https://github.com/ssillva1413/projeto-hmaa/tree/main/src/pages"
click node_clinic "https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/Cartao/index.jsx"
click node_news "https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/Noticias/index.jsx"
click node_newsdetail "https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/NoticiasDetalhes/index.jsx"
click node_transparency "https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/Projeto/index.jsx"
click node_publicdocs "https://github.com/ssillva1413/projeto-hmaa/tree/main/public"
click node_ombudsman "https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/Ouvidoria/index.jsx"
click node_careers "https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/TrabalheConosco/index.jsx"
click node_api "https://github.com/ssillva1413/projeto-hmaa/blob/main/server.js"
click node_manifestationdb "https://github.com/ssillva1413/projeto-hmaa/blob/main/db.js"
click node_upload "https://github.com/ssillva1413/projeto-hmaa/blob/main/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_app,node_routes,node_pagebase,node_header toneBlue
class node_home,node_hospitalinfo,node_clinic,node_news,node_newsdetail,node_transparency,node_publicdocs toneAmber
class node_ombudsman,node_careers toneMint
class node_api,node_manifestationdb,node_upload toneRose
class node_visitor,node_captcha,node_mailer toneIndigo
```

## Components

### Website shell

- [React app](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/App.jsx): `src/App.jsx`
- [Page routes](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/routes.jsx): `src/routes.jsx`
- [Shared page shell](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/PageBase/index.jsx): `src/pages/PageBase/index.jsx`
- [Site navigation](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/components/Header/index.jsx): `src/components/Header/index.jsx`

### Public information

- [Home](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/Home/index.jsx): `src/pages/Home/index.jsx`
- [Hospital information](https://github.com/ssillva1413/projeto-hmaa/tree/main/src/pages): `src/pages`
- [Clinic and card](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/Cartao/index.jsx): `src/pages/Cartao/index.jsx`
- [News](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/Noticias/index.jsx): `src/pages/Noticias/index.jsx`
- [News details](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/NoticiasDetalhes/index.jsx): `src/pages/NoticiasDetalhes/index.jsx`
- [Transparency portal](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/Projeto/index.jsx): `src/pages/Projeto/index.jsx`
- [Public documents](https://github.com/ssillva1413/projeto-hmaa/tree/main/public): `public`

### Form submissions

- [Ombudsman form](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/Ouvidoria/index.jsx): `src/pages/Ouvidoria/index.jsx`
- [Careers form](https://github.com/ssillva1413/projeto-hmaa/blob/main/src/pages/TrabalheConosco/index.jsx): `src/pages/TrabalheConosco/index.jsx`

### Submission backend

- [Express API](https://github.com/ssillva1413/projeto-hmaa/blob/main/server.js): `server.js`
- [Manifestation storage](https://github.com/ssillva1413/projeto-hmaa/blob/main/db.js): `db.js`
- [Résumé upload](https://github.com/ssillva1413/projeto-hmaa/blob/main/server.js): `server.js`

### Other components

- **Visitor**
- **Google reCAPTCHA**
- **Gmail mail service**

## Connections

- Visitor → React app: opens site
- React app → Page routes: renders
- Page routes → Shared page shell: wraps pages
- Shared page shell → Site navigation: shows navigation
- Page routes → Home: dispatches
- Page routes → Hospital information: dispatches
- Page routes → Clinic and card: dispatches
- Page routes → News: dispatches
- Page routes → News details: dispatches
- Page routes → Transparency portal: dispatches
- Transparency portal → Public documents: links materials
- Page routes → Ombudsman form: dispatches
- Page routes → Careers form: dispatches
- Ombudsman form → Express API: posts manifestation
- Express API → Manifestation storage: saves record
- Careers form → Express API: uploads résumé
- Express API → Google reCAPTCHA: verifies token
- Express API → Résumé upload: stores temporarily
- Express API → Gmail mail service: sends résumé
