# tiagoalvescosta/treino architecture

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

- Interactive diagram: https://gitdiagram.com/tiagoalvescosta/treino
- Repository: https://github.com/tiagoalvescosta/treino

## Overview

This is a Flutter study app for interns, organized around a study route and four exercises/examples: a stateful calculator, CEP lookup, client management, and a reference architecture example. The README documents the intended implementation stages, but the Dart source was not sampled, so navigation and internal call relationships cannot be verified. The graph preserves those capabilities and the documented HTTP, store/page, and fake-API responsibilities without inferring wiring between modules.

Main entry points: [`ROTEIRO_ESTUDOS.md`](https://github.com/tiagoalvescosta/treino/blob/main/ROTEIRO_ESTUDOS.md) (Study roadmap), [`lib/app/pages/cliente/cliente_page.dart`](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/cliente/cliente_page.dart) (Client page), [`lib/app/pages/calculadora/calculadora_page.dart`](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/calculadora/calculadora_page.dart) (Calculator challenge), [`windows/runner/flutter_window.cpp`](https://github.com/tiagoalvescosta/treino/blob/main/windows/runner/flutter_window.cpp) (Windows Flutter host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_study_route["Study roadmap<br/>[ROTEIRO_ESTUDOS.md]"]
  node_app_entry["Flutter app entry<br/>[main.dart]"]
  node_routes["App routes<br/>[app_routes.dart]"]
  node_splash["Splash screen"]
  node_home["Home page<br/>[home_page.dart]"]
  node_windows_host["Windows Flutter host<br/>[flutter_window.cpp]"]
end

subgraph group_exercises["Study challenges"]
  node_calculator["Calculator challenge"]
  node_cep_page["CEP lookup page"]
  node_cep_service["CEP HTTP service"]
  node_cep_model["Address model"]
  node_client_page["Client page<br/>[cliente_page.dart]"]
  node_client_store["Client store"]
  node_client_service["Client service"]
  node_client_database[("Fake API")]
  node_client_model["Client model<br/>[cliente_model.dart]"]
end

subgraph group_architecture["Shared architecture"]
  node_example["Architecture example<br/>[exemplo_page.dart]"]
  node_example_store["Example store"]
  node_example_service["Example service"]
  node_shared_states["Shared states"]
  node_result_state["Result state<br/>[result_state.dart]"]
end

node_learner(("Intern learner"))

node_learner -->|"follows"| node_study_route
node_study_route -->|"starts with"| node_calculator
node_study_route -->|"next challenge"| node_cep_page
node_study_route -->|"then practices"| node_client_page
node_study_route -->|"studies reference"| node_example
node_calculator -->|"uses setState"| node_calculator
node_cep_page -->|"uses HTTP service"| node_cep_service
node_client_page -->|"pairs with store"| node_client_store
node_client_page -->|"uses fake API"| node_client_database
node_windows_host -->|"hosts Flutter view"| node_windows_host

click node_study_route "https://github.com/tiagoalvescosta/treino/blob/main/ROTEIRO_ESTUDOS.md"
click node_app_entry "https://github.com/tiagoalvescosta/treino/blob/main/lib/main.dart"
click node_routes "https://github.com/tiagoalvescosta/treino/blob/main/lib/app_routes.dart"
click node_splash "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/splash_screen/splash_screen_page.dart"
click node_home "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/home/home_page.dart"
click node_calculator "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/calculadora/calculadora_page.dart"
click node_cep_page "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/consultar_cep/consultar_cep_page.dart"
click node_cep_service "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/consultar_cep/services/consultar_cep_services.dart"
click node_cep_model "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/consultar_cep/models/endereco_model.dart"
click node_client_page "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/cliente/cliente_page.dart"
click node_client_store "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/cliente/stores/cliente_page_store.dart"
click node_client_service "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/cliente/services/cliente_services.dart"
click node_client_database "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/cliente/services/cliente_database.dart"
click node_client_model "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/cliente/models/cliente_model.dart"
click node_example "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/exemplo/exemplo_page.dart"
click node_example_store "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/exemplo/stores/exemplo_page_store.dart"
click node_example_service "https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/exemplo/services/exemplo_services.dart"
click node_shared_states "https://github.com/tiagoalvescosta/treino/blob/main/lib/utils/generic_states.dart"
click node_result_state "https://github.com/tiagoalvescosta/treino/blob/main/lib/utils/result_state.dart"
click node_windows_host "https://github.com/tiagoalvescosta/treino/blob/main/windows/runner/flutter_window.cpp"

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_study_route,node_app_entry,node_routes,node_splash,node_home,node_windows_host toneBlue
class node_calculator,node_cep_page,node_cep_service,node_cep_model,node_client_page,node_client_store,node_client_service,node_client_database,node_client_model toneAmber
class node_example,node_example_store,node_example_service,node_shared_states,node_result_state toneMint
class node_learner toneIndigo
```

## Components

### App shell

- [Study roadmap](https://github.com/tiagoalvescosta/treino/blob/main/ROTEIRO_ESTUDOS.md): `ROTEIRO_ESTUDOS.md`
- [Flutter app entry](https://github.com/tiagoalvescosta/treino/blob/main/lib/main.dart): `lib/main.dart`
- [App routes](https://github.com/tiagoalvescosta/treino/blob/main/lib/app_routes.dart): `lib/app_routes.dart`
- [Splash screen](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/splash_screen/splash_screen_page.dart): `lib/app/pages/splash_screen/splash_screen_page.dart`
- [Home page](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/home/home_page.dart): `lib/app/pages/home/home_page.dart`
- [Windows Flutter host](https://github.com/tiagoalvescosta/treino/blob/main/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`

### Study challenges

- [Calculator challenge](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/calculadora/calculadora_page.dart): `lib/app/pages/calculadora/calculadora_page.dart`
- [CEP lookup page](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/consultar_cep/consultar_cep_page.dart): `lib/app/pages/consultar_cep/consultar_cep_page.dart`
- [CEP HTTP service](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/consultar_cep/services/consultar_cep_services.dart): `lib/app/pages/consultar_cep/services/consultar_cep_services.dart`
- [Address model](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/consultar_cep/models/endereco_model.dart): `lib/app/pages/consultar_cep/models/endereco_model.dart`
- [Client page](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/cliente/cliente_page.dart): `lib/app/pages/cliente/cliente_page.dart`
- [Client store](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/cliente/stores/cliente_page_store.dart): `lib/app/pages/cliente/stores/cliente_page_store.dart`
- [Client service](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/cliente/services/cliente_services.dart): `lib/app/pages/cliente/services/cliente_services.dart`
- [Fake API](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/cliente/services/cliente_database.dart): `lib/app/pages/cliente/services/cliente_database.dart`
- [Client model](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/cliente/models/cliente_model.dart): `lib/app/pages/cliente/models/cliente_model.dart`

### Shared architecture

- [Architecture example](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/exemplo/exemplo_page.dart): `lib/app/pages/exemplo/exemplo_page.dart`
- [Example store](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/exemplo/stores/exemplo_page_store.dart): `lib/app/pages/exemplo/stores/exemplo_page_store.dart`
- [Example service](https://github.com/tiagoalvescosta/treino/blob/main/lib/app/pages/exemplo/services/exemplo_services.dart): `lib/app/pages/exemplo/services/exemplo_services.dart`
- [Shared states](https://github.com/tiagoalvescosta/treino/blob/main/lib/utils/generic_states.dart): `lib/utils/generic_states.dart`
- [Result state](https://github.com/tiagoalvescosta/treino/blob/main/lib/utils/result_state.dart): `lib/utils/result_state.dart`

### Other components

- **Intern learner**

## Connections

- Intern learner → Study roadmap: follows (evidence: `README.md`)
- Study roadmap → Calculator challenge: starts with (evidence: `README.md`)
- Study roadmap → CEP lookup page: next challenge (evidence: `README.md`)
- Study roadmap → Client page: then practices (evidence: `README.md`)
- Study roadmap → Architecture example: studies reference (evidence: `README.md`)
- Calculator challenge → Calculator challenge: uses setState (evidence: `README.md`)
- CEP lookup page → CEP HTTP service: uses HTTP service (evidence: `README.md`)
- Client page → Client store: pairs with store (evidence: `README.md`)
- Client page → Fake API: uses fake API (evidence: `README.md`)
- Windows Flutter host → Windows Flutter host: hosts Flutter view (evidence: `windows/runner/flutter_window.cpp`)
