# danilopedrazzi/projetoindividual architecture

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

- Interactive diagram: https://gitdiagram.com/danilopedrazzi/projetoindividual
- Repository: https://github.com/danilopedrazzi/projetoindividual

## Overview

Celeste is a fan site for submitting and comparing Celeste speedruns. The principal workflow is: a player uses the web pages, authenticates or registers, submits a categorized run, and receives leaderboard or dashboard data. The backend routes requests through controllers into domain models and MySQL. The sampled code directly confirms authentication, profile operations, run listing/submission, and dashboard orchestration; some frontend calls and unsampled route/controller wiring are represented conservatively from documented capabilities and repository structure.

Main entry points: [`app.js`](https://github.com/danilopedrazzi/projetoindividual/blob/main/app.js) (Express Server), [`BackEnd/database/config.js`](https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/database/config.js) (MySQL Adapter), [`FrontEnd/index.html`](https://github.com/danilopedrazzi/projetoindividual/blob/main/FrontEnd/index.html) (Site Pages), [`FrontEnd/login.html`](https://github.com/danilopedrazzi/projetoindividual/blob/main/FrontEnd/login.html) (Auth Profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web Experience"]
  node_home["Site Pages<br/>[index.html]"]
  node_auth["Auth Profile<br/>[login.html]"]
  node_run_submit["Run Submission"]
  node_leaderboard["Leaderboard<br/>[leaderboard.html]"]
  node_dashboard_ui["Progress Dashboard<br/>[dashboard.html]"]
end

subgraph group_api["HTTP API"]
  node_app["Express Server<br/>[app.js]"]
  node_index_routes["Root Routes<br/>[index.js]"]
  node_user_routes["User Routes<br/>[usuarios.js]"]
  node_speedrun_routes["Speedrun Routes<br/>[speedruns.js]"]
  node_dashboard_routes["Dashboard Routes<br/>[dashboard.js]"]
end

subgraph group_domain["Domain Operations"]
  node_user_controller["User Controller"]
  node_speedrun_controller["Speedrun Controller"]
  node_dashboard_controller["Dashboard Controller"]
  node_user_model["User Model<br/>[usuarioModel.js]"]
  node_speedrun_model["Speedrun Model<br/>[speedrunModel.js]"]
  node_dashboard_model["Dashboard Model<br/>[dashboardModel.js]"]
end

subgraph group_persistence["Data Persistence"]
  node_db_adapter["MySQL Adapter<br/>[config.js]"]
  node_mysql[("MySQL Database<br/>[Tables.sql]")]
end

node_player(("Speedrunner"))

node_player -->|"visits"| node_home
node_player -->|"authenticates"| node_auth
node_player -->|"submits runs"| node_run_submit
node_player -->|"compares times"| node_leaderboard
node_player -->|"tracks progress"| node_dashboard_ui
node_home -->|"loads pages"| node_app
node_auth -->|"sends credentials"| node_app
node_run_submit -->|"sends run"| node_app
node_leaderboard -->|"requests runs"| node_app
node_dashboard_ui -->|"requests metrics"| node_app
node_app -->|"mounts root"| node_index_routes
node_app -->|"mounts users"| node_user_routes
node_app -->|"mounts speedruns"| node_speedrun_routes
node_app -->|"mounts dashboard"| node_dashboard_routes
node_user_routes -->|"dispatches users"| node_user_controller
node_user_controller -->|"calls queries"| node_user_model
node_speedrun_controller -->|"calls queries"| node_speedrun_model
node_dashboard_controller -->|"calls metrics"| node_dashboard_model
node_user_model -->|"executes SQL"| node_db_adapter
node_speedrun_model -->|"executes SQL"| node_db_adapter
node_db_adapter -->|"reads writes"| node_mysql

click node_home "https://github.com/danilopedrazzi/projetoindividual/blob/main/FrontEnd/index.html"
click node_auth "https://github.com/danilopedrazzi/projetoindividual/blob/main/FrontEnd/login.html"
click node_run_submit "https://github.com/danilopedrazzi/projetoindividual/blob/main/FrontEnd/cadastroSpeedrun.html"
click node_leaderboard "https://github.com/danilopedrazzi/projetoindividual/blob/main/FrontEnd/leaderboard.html"
click node_dashboard_ui "https://github.com/danilopedrazzi/projetoindividual/blob/main/FrontEnd/dashboard.html"
click node_app "https://github.com/danilopedrazzi/projetoindividual/blob/main/app.js"
click node_index_routes "https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/routes/index.js"
click node_user_routes "https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/routes/usuarios.js"
click node_speedrun_routes "https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/routes/speedruns.js"
click node_dashboard_routes "https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/routes/dashboard.js"
click node_user_controller "https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/controllers/usuarioController.js"
click node_speedrun_controller "https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/controllers/speedrunController.js"
click node_dashboard_controller "https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/controllers/dashboardController.js"
click node_user_model "https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/models/usuarioModel.js"
click node_speedrun_model "https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/models/speedrunModel.js"
click node_dashboard_model "https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/models/dashboardModel.js"
click node_db_adapter "https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/database/config.js"
click node_mysql "https://github.com/danilopedrazzi/projetoindividual/blob/main/DataBase/Tables.sql"

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_home,node_auth,node_run_submit,node_leaderboard,node_dashboard_ui toneBlue
class node_app,node_index_routes,node_user_routes,node_speedrun_routes,node_dashboard_routes toneAmber
class node_user_controller,node_speedrun_controller,node_dashboard_controller,node_user_model,node_speedrun_model,node_dashboard_model toneMint
class node_db_adapter,node_mysql toneRose
class node_player toneIndigo
```

## Components

### Web Experience

- [Site Pages](https://github.com/danilopedrazzi/projetoindividual/blob/main/FrontEnd/index.html): `FrontEnd/index.html`
- [Auth Profile](https://github.com/danilopedrazzi/projetoindividual/blob/main/FrontEnd/login.html): `FrontEnd/login.html`
- [Run Submission](https://github.com/danilopedrazzi/projetoindividual/blob/main/FrontEnd/cadastroSpeedrun.html): `FrontEnd/cadastroSpeedrun.html`
- [Leaderboard](https://github.com/danilopedrazzi/projetoindividual/blob/main/FrontEnd/leaderboard.html): `FrontEnd/leaderboard.html`
- [Progress Dashboard](https://github.com/danilopedrazzi/projetoindividual/blob/main/FrontEnd/dashboard.html): `FrontEnd/dashboard.html`

### HTTP API

- [Express Server](https://github.com/danilopedrazzi/projetoindividual/blob/main/app.js): `app.js`
- [Root Routes](https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/routes/index.js): `BackEnd/routes/index.js`
- [User Routes](https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/routes/usuarios.js): `BackEnd/routes/usuarios.js`
- [Speedrun Routes](https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/routes/speedruns.js): `BackEnd/routes/speedruns.js`
- [Dashboard Routes](https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/routes/dashboard.js): `BackEnd/routes/dashboard.js`

### Domain Operations

- [User Controller](https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/controllers/usuarioController.js): `BackEnd/controllers/usuarioController.js`
- [Speedrun Controller](https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/controllers/speedrunController.js): `BackEnd/controllers/speedrunController.js`
- [Dashboard Controller](https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/controllers/dashboardController.js): `BackEnd/controllers/dashboardController.js`
- [User Model](https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/models/usuarioModel.js): `BackEnd/models/usuarioModel.js`
- [Speedrun Model](https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/models/speedrunModel.js): `BackEnd/models/speedrunModel.js`
- [Dashboard Model](https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/models/dashboardModel.js): `BackEnd/models/dashboardModel.js`

### Data Persistence

- [MySQL Adapter](https://github.com/danilopedrazzi/projetoindividual/blob/main/BackEnd/database/config.js): `BackEnd/database/config.js`
- [MySQL Database](https://github.com/danilopedrazzi/projetoindividual/blob/main/DataBase/Tables.sql): `DataBase/Tables.sql`

### Other components

- **Speedrunner**

## Connections

- Speedrunner → Site Pages: visits
- Speedrunner → Auth Profile: authenticates
- Speedrunner → Run Submission: submits runs
- Speedrunner → Leaderboard: compares times
- Speedrunner → Progress Dashboard: tracks progress
- Site Pages → Express Server: loads pages
- Auth Profile → Express Server: sends credentials
- Run Submission → Express Server: sends run
- Leaderboard → Express Server: requests runs
- Progress Dashboard → Express Server: requests metrics
- Express Server → Root Routes: mounts root
- Express Server → User Routes: mounts users
- Express Server → Speedrun Routes: mounts speedruns
- Express Server → Dashboard Routes: mounts dashboard
- User Routes → User Controller: dispatches users
- User Controller → User Model: calls queries
- Speedrun Controller → Speedrun Model: calls queries
- Dashboard Controller → Dashboard Model: calls metrics
- User Model → MySQL Adapter: executes SQL
- Speedrun Model → MySQL Adapter: executes SQL
- MySQL Adapter → MySQL Database: reads writes
