# rafaelobrasil/pokedexangular architecture

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

- Interactive diagram: https://gitdiagram.com/rafaelobrasil/pokedexangular
- Repository: https://github.com/rafaelobrasil/pokedexangular

## Overview

This is a Pokémon Pokédex web app with an Angular frontend, a NestJS backend, and PostgreSQL/Prisma described as infrastructure. The user-facing flow is account registration, in-memory credential storage, login, then a Pokémon list fetched from PokeAPI and displayed as cards. The sampled backend currently exposes only a Hello World endpoint; no sampled code connects it to the frontend or database. The database is retained as a documented capability, but its runtime wiring is unverified.

Main entry points: [`frontend/src/app/app.routes.ts`](https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/app.routes.ts) (Page routes), [`frontend/src/app/componentes/login/login.ts`](https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/componentes/login/login.ts) (Login), [`frontend/src/app/componentes/lista-pokemon/lista-pokemon.ts`](https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/componentes/lista-pokemon/lista-pokemon.ts) (Pokémon list), [`frontend/src/app/componentes/cadastro/cadastro.ts`](https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/componentes/cadastro/cadastro.ts) (Registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Angular frontend"]
  node_app["Root app<br/>[app.ts]"]
  node_bootstrap["App bootstrap<br/>[main.ts]"]
  node_config["Router config<br/>[app.config.ts]"]
  node_routes["Page routes<br/>[app.routes.ts]"]
  node_register["Registration<br/>[cadastro.ts]"]
  node_login["Login<br/>[login.ts]"]
  node_user_state["User state<br/>[usuario.ts]"]
end

subgraph group_pokemon["Pokédex browsing"]
  node_pokemon_list["Pokémon list<br/>[lista-pokemon.ts]"]
  node_pokemon_card["Pokémon card<br/>[card-pokemon.ts]"]
end

subgraph group_backend["NestJS backend"]
  node_backend_entry["Nest entry<br/>[main.ts]"]
  node_backend_module["App module<br/>[app.module.ts]"]
  node_hello_controller["Hello controller<br/>[app.controller.ts]"]
  node_hello_service["Hello service<br/>[app.service.ts]"]
end

subgraph group_persistence["Database infrastructure"]
  node_prisma_schema["Prisma schema<br/>[schema.prisma]"]
  node_postgres[("PostgreSQL<br/>[docker-compose.yml]")]
end

node_visitor(("Visitor"))
node_pokeapi["PokeAPI"]

node_visitor -.->|"uses"| node_app
node_bootstrap -->|"bootstraps"| node_app
node_bootstrap -->|"configures"| node_config
node_config -->|"provides"| node_routes
node_routes -->|"routes to"| node_register
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_pokemon_list
node_register -->|"stores credentials"| node_user_state
node_register -->|"navigates to"| node_login
node_login -->|"checks credentials"| node_user_state
node_login -->|"navigates to"| node_pokemon_list
node_pokemon_list -->|"fetches Pokémon"| node_pokeapi
node_pokemon_list -->|"renders with"| node_pokemon_card
node_backend_entry -->|"starts"| node_backend_module
node_backend_module -->|"registers"| node_hello_controller
node_backend_module -->|"provides"| node_hello_service
node_hello_controller -->|"calls"| node_hello_service
node_prisma_schema -.->|"models data for"| node_postgres

click node_app "https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/app.ts"
click node_bootstrap "https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/main.ts"
click node_config "https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/app.config.ts"
click node_routes "https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/app.routes.ts"
click node_register "https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/componentes/cadastro/cadastro.ts"
click node_login "https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/componentes/login/login.ts"
click node_user_state "https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/services/usuario.ts"
click node_pokemon_list "https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/componentes/lista-pokemon/lista-pokemon.ts"
click node_pokemon_card "https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/componentes/card-pokemon/card-pokemon.ts"
click node_backend_entry "https://github.com/rafaelobrasil/pokedexangular/blob/main/backend/src/main.ts"
click node_backend_module "https://github.com/rafaelobrasil/pokedexangular/blob/main/backend/src/app.module.ts"
click node_hello_controller "https://github.com/rafaelobrasil/pokedexangular/blob/main/backend/src/app.controller.ts"
click node_hello_service "https://github.com/rafaelobrasil/pokedexangular/blob/main/backend/src/app.service.ts"
click node_prisma_schema "https://github.com/rafaelobrasil/pokedexangular/blob/main/backend/prisma/schema.prisma"
click node_postgres "https://github.com/rafaelobrasil/pokedexangular/blob/main/docker-compose.yml"

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_bootstrap,node_config,node_routes,node_register,node_login,node_user_state toneBlue
class node_pokemon_list,node_pokemon_card toneAmber
class node_backend_entry,node_backend_module,node_hello_controller,node_hello_service,node_pokeapi toneMint
class node_prisma_schema,node_postgres toneRose
class node_visitor toneIndigo
```

## Components

### Angular frontend

- [Root app](https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/app.ts): `frontend/src/app/app.ts`
- [App bootstrap](https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/main.ts): `frontend/src/main.ts`
- [Router config](https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/app.config.ts): `frontend/src/app/app.config.ts`
- [Page routes](https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/app.routes.ts): `frontend/src/app/app.routes.ts`
- [Registration](https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/componentes/cadastro/cadastro.ts): `frontend/src/app/componentes/cadastro/cadastro.ts`
- [Login](https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/componentes/login/login.ts): `frontend/src/app/componentes/login/login.ts`
- [User state](https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/services/usuario.ts): `frontend/src/app/services/usuario.ts`

### Pokédex browsing

- [Pokémon list](https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/componentes/lista-pokemon/lista-pokemon.ts): `frontend/src/app/componentes/lista-pokemon/lista-pokemon.ts`
- [Pokémon card](https://github.com/rafaelobrasil/pokedexangular/blob/main/frontend/src/app/componentes/card-pokemon/card-pokemon.ts): `frontend/src/app/componentes/card-pokemon/card-pokemon.ts`

### NestJS backend

- [Nest entry](https://github.com/rafaelobrasil/pokedexangular/blob/main/backend/src/main.ts): `backend/src/main.ts`
- [App module](https://github.com/rafaelobrasil/pokedexangular/blob/main/backend/src/app.module.ts): `backend/src/app.module.ts`
- [Hello controller](https://github.com/rafaelobrasil/pokedexangular/blob/main/backend/src/app.controller.ts): `backend/src/app.controller.ts`
- [Hello service](https://github.com/rafaelobrasil/pokedexangular/blob/main/backend/src/app.service.ts): `backend/src/app.service.ts`

### Database infrastructure

- [Prisma schema](https://github.com/rafaelobrasil/pokedexangular/blob/main/backend/prisma/schema.prisma): `backend/prisma/schema.prisma`
- [PostgreSQL](https://github.com/rafaelobrasil/pokedexangular/blob/main/docker-compose.yml): `docker-compose.yml`

### Other components

- **Visitor**
- **PokeAPI**

## Connections

- Visitor → Root app: uses (evidence: `README.md`)
- App bootstrap → Root app: bootstraps (evidence: `frontend/src/main.ts`)
- App bootstrap → Router config: configures (evidence: `frontend/src/main.ts`)
- Router config → Page routes: provides (evidence: `frontend/src/app/app.config.ts`)
- Page routes → Registration: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Page routes → Login: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Page routes → Pokémon list: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Registration → User state: stores credentials (evidence: `frontend/src/app/componentes/cadastro/cadastro.ts`)
- Registration → Login: navigates to (evidence: `frontend/src/app/componentes/cadastro/cadastro.ts`)
- Login → User state: checks credentials (evidence: `frontend/src/app/componentes/login/login.ts`)
- Login → Pokémon list: navigates to (evidence: `frontend/src/app/componentes/login/login.ts`)
- Pokémon list → PokeAPI: fetches Pokémon (evidence: `frontend/src/app/componentes/lista-pokemon/lista-pokemon.ts`)
- Pokémon list → Pokémon card: renders with (evidence: `frontend/src/app/componentes/lista-pokemon/lista-pokemon.ts`)
- Nest entry → App module: starts (evidence: `backend/src/main.ts`)
- App module → Hello controller: registers (evidence: `backend/src/app.module.ts`)
- App module → Hello service: provides (evidence: `backend/src/app.module.ts`)
- Hello controller → Hello service: calls (evidence: `backend/src/app.controller.ts`)
- Prisma schema → PostgreSQL: models data for
