# davilazzaroto/gamehub-angular architecture

> Architecture diagram of the GitHub repository davilazzaroto/gamehub-angular, 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/davilazzaroto/gamehub-angular
- Repository: https://github.com/davilazzaroto/gamehub-angular

## Overview

GameHub is an Angular game catalog. A visitor enters through the app shell and navigates to the home, catalog, detail, registration, or about pages; catalog searches and detail lookups read the in-memory game service, while registration validates and adds a game before navigating back to the catalog. The graph includes the documented page capabilities, shared card, and domain model. Edges are limited to relationships shown in source excerpts or the README; unsampled page templates and service behavior are not inferred beyond those references.

Main entry points: [`src/app/app.routes.ts`](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/app.routes.ts) (Page routes), [`src/app/services/jogo.ts`](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/services/jogo.ts) (Game service), [`src/app/pages/jogos/jogos.ts`](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/pages/jogos/jogos.ts) (Game catalog), [`src/main.ts`](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/main.ts) (App bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App and navigation"]
  node_bootstrap["App bootstrap<br/>[main.ts]"]
  node_config["Router config<br/>[app.config.ts]"]
  node_routes["Page routes<br/>[app.routes.ts]"]
  node_shell["App shell<br/>[app.ts]"]
  node_menu["Navigation menu<br/>[menu.ts]"]
end

subgraph group_pages["Catalog pages"]
  node_home["Home highlights<br/>[home.ts]"]
  node_catalog["Game catalog<br/>[jogos.ts]"]
  node_details["Game details<br/>[jogo-detalhes.ts]"]
  node_registration["Game registration<br/>[cadastrar-jogo.ts]"]
  node_about["About page<br/>[sobre.ts]"]
end

subgraph group_shared["Shared UI and domain"]
  node_card["Game card<br/>[jogo-card.ts]"]
  node_game["Game model<br/>[jogo.ts]"]
end

subgraph group_data["Game data"]
  node_service["Game service<br/>[jogo.ts]"]
  node_memory[("In-memory games<br/>[jogo.ts]")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens app"| node_bootstrap
node_bootstrap -->|"bootstraps"| node_shell
node_bootstrap -->|"configures"| node_config
node_config -->|"provides routes"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_catalog
node_routes -->|"routes to"| node_details
node_routes -->|"routes to"| node_registration
node_routes -->|"routes to"| node_about
node_shell -->|"renders"| node_menu
node_home -->|"reads highlights"| node_service
node_catalog -->|"searches games"| node_service
node_catalog -->|"uses cards"| node_card
node_details -->|"looks up game"| node_service
node_registration -->|"adds game"| node_service
node_registration -->|"navigates after save"| node_catalog
node_service -->|"reads and writes"| node_memory
node_service -->|"uses type"| node_game
node_card -->|"accepts game"| node_game

click node_bootstrap "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/main.ts"
click node_config "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/app.config.ts"
click node_routes "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/app.routes.ts"
click node_shell "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/app.ts"
click node_menu "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/components/menu/menu.ts"
click node_home "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/pages/home/home.ts"
click node_catalog "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/pages/jogos/jogos.ts"
click node_details "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/pages/jogo-detalhes/jogo-detalhes.ts"
click node_registration "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/pages/cadastrar-jogo/cadastrar-jogo.ts"
click node_about "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/pages/sobre/sobre.ts"
click node_card "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/components/jogo-card/jogo-card.ts"
click node_game "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/models/jogo.ts"
click node_service "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/services/jogo.ts"
click node_memory "https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/services/jogo.ts"

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_bootstrap,node_config,node_routes,node_shell,node_menu toneBlue
class node_home,node_catalog,node_details,node_registration,node_about toneAmber
class node_card,node_game toneMint
class node_service,node_memory toneRose
class node_visitor toneIndigo
```

## Components

### App and navigation

- [App bootstrap](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/main.ts): `src/main.ts`
- [Router config](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/app.config.ts): `src/app/app.config.ts`
- [Page routes](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [App shell](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/app.ts): `src/app/app.ts`
- [Navigation menu](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/components/menu/menu.ts): `src/app/components/menu/menu.ts`

### Catalog pages

- [Home highlights](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/pages/home/home.ts): `src/app/pages/home/home.ts`
- [Game catalog](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/pages/jogos/jogos.ts): `src/app/pages/jogos/jogos.ts`
- [Game details](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/pages/jogo-detalhes/jogo-detalhes.ts): `src/app/pages/jogo-detalhes/jogo-detalhes.ts`
- [Game registration](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/pages/cadastrar-jogo/cadastrar-jogo.ts): `src/app/pages/cadastrar-jogo/cadastrar-jogo.ts`
- [About page](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/pages/sobre/sobre.ts): `src/app/pages/sobre/sobre.ts`

### Shared UI and domain

- [Game card](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/components/jogo-card/jogo-card.ts): `src/app/components/jogo-card/jogo-card.ts`
- [Game model](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/models/jogo.ts): `src/app/models/jogo.ts`

### Game data

- [Game service](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/services/jogo.ts): `src/app/services/jogo.ts`
- [In-memory games](https://github.com/davilazzaroto/gamehub-angular/blob/main/src/app/services/jogo.ts): `src/app/services/jogo.ts`

### Other components

- **Visitor**

## Connections

- Visitor → App bootstrap: opens app (evidence: `README.md`)
- App bootstrap → App shell: bootstraps (evidence: `src/main.ts`)
- App bootstrap → Router config: configures (evidence: `src/main.ts`)
- Router config → Page routes: provides routes (evidence: `src/app/app.config.ts`)
- Page routes → Home highlights: routes to (evidence: `src/app/app.routes.ts`)
- Page routes → Game catalog: routes to (evidence: `src/app/app.routes.ts`)
- Page routes → Game details: routes to (evidence: `src/app/app.routes.ts`)
- Page routes → Game registration: routes to (evidence: `src/app/app.routes.ts`)
- Page routes → About page: routes to (evidence: `src/app/app.routes.ts`)
- App shell → Navigation menu: renders (evidence: `src/app/app.ts`)
- Home highlights → Game service: reads highlights (evidence: `src/app/pages/home/home.ts`)
- Game catalog → Game service: searches games (evidence: `src/app/pages/jogos/jogos.ts`)
- Game catalog → Game card: uses cards (evidence: `src/app/pages/jogos/jogos.ts`)
- Game details → Game service: looks up game (evidence: `src/app/pages/jogo-detalhes/jogo-detalhes.ts`)
- Game registration → Game service: adds game (evidence: `src/app/pages/cadastrar-jogo/cadastrar-jogo.ts`)
- Game registration → Game catalog: navigates after save (evidence: `src/app/pages/cadastrar-jogo/cadastrar-jogo.ts`)
- Game service → In-memory games: reads and writes (evidence: `src/app/services/jogo.ts`)
- Game service → Game model: uses type (evidence: `src/app/services/jogo.ts`)
- Game card → Game model: accepts game (evidence: `src/app/components/jogo-card/jogo-card.ts`)
