# fergader1/parcial-2- architecture

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

- Interactive diagram: https://gitdiagram.com/fergader1/parcial-2-
- Repository: https://github.com/fergader1/parcial-2-

## Overview

Nanatsu Wiki is an Ionic/Angular character reference app. Users enter a tabbed interface, browse and filter a character catalog, and can access character details; separate tabs show saved favorites and app settings. The catalog reads bundled JSON through a caching service, while favorites are persisted and exposed reactively. The route and service relationships below are supported by excerpts; the detail page’s internal behavior is not mapped because its implementation excerpt was not provided.

Main entry points: [`src/app/tabs/tabs.routes.ts`](https://github.com/fergader1/parcial-2-/blob/main/src/app/tabs/tabs.routes.ts) (Tab routes), [`src/app/core/services/favorites.service.ts`](https://github.com/fergader1/parcial-2-/blob/main/src/app/core/services/favorites.service.ts) (Favorites service), [`src/app/app.routes.ts`](https://github.com/fergader1/parcial-2-/blob/main/src/app/app.routes.ts) (App routes), [`src/app/tab1/tab1.page.ts`](https://github.com/fergader1/parcial-2-/blob/main/src/app/tab1/tab1.page.ts) (Catalog browsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["App shell<br/>[app.component.ts]"]
  node_routes["App routes<br/>[app.routes.ts]"]
  node_tabs_routes["Tab routes<br/>[tabs.routes.ts]"]
  node_tabs["Tabs shell<br/>[tabs.page.ts]"]
end

subgraph group_characters["Character catalog"]
  node_catalog["Catalog browsing<br/>[tab1.page.ts]"]
  node_character_service["Character service"]
  node_character_data["Character data<br/>[data.json]"]
  node_character_model["Character model<br/>[character.ts]"]
  node_detail["Character detail<br/>[detail.page.ts]"]
end

subgraph group_favorites["Favorites"]
  node_favorites_page["Favorites list<br/>[tab2.page.ts]"]
  node_favorites_service["Favorites service"]
  node_preferences[("Device preferences")]
end

subgraph group_settings["App settings"]
  node_settings["Settings<br/>[tab3.page.ts]"]
end

node_user(("User"))

node_user -->|"opens"| node_app
node_app -->|"hosts"| node_routes
node_routes -->|"loads tabs"| node_tabs_routes
node_routes -->|"routes to detail"| node_detail
node_tabs_routes -->|"shows shell"| node_tabs
node_tabs_routes -->|"loads catalog"| node_catalog
node_tabs_routes -->|"loads favorites"| node_favorites_page
node_tabs_routes -->|"loads settings"| node_settings
node_catalog -->|"requests characters"| node_character_service
node_character_service -->|"fetches JSON"| node_character_data
node_catalog -->|"uses types"| node_character_model
node_character_service -->|"uses types"| node_character_model
node_favorites_page -->|"reads and removes"| node_favorites_service
node_settings -->|"clears favorites"| node_favorites_service
node_favorites_service -->|"persists favorites"| node_preferences
node_favorites_service -->|"uses types"| node_character_model

click node_app "https://github.com/fergader1/parcial-2-/blob/main/src/app/app.component.ts"
click node_routes "https://github.com/fergader1/parcial-2-/blob/main/src/app/app.routes.ts"
click node_tabs_routes "https://github.com/fergader1/parcial-2-/blob/main/src/app/tabs/tabs.routes.ts"
click node_tabs "https://github.com/fergader1/parcial-2-/blob/main/src/app/tabs/tabs.page.ts"
click node_catalog "https://github.com/fergader1/parcial-2-/blob/main/src/app/tab1/tab1.page.ts"
click node_character_service "https://github.com/fergader1/parcial-2-/blob/main/src/app/core/services/characters.service.ts"
click node_character_data "https://github.com/fergader1/parcial-2-/blob/main/src/assets/data/data.json"
click node_character_model "https://github.com/fergader1/parcial-2-/blob/main/src/app/core/interfaces/character.ts"
click node_detail "https://github.com/fergader1/parcial-2-/blob/main/src/app/pages/detail/detail.page.ts"
click node_favorites_page "https://github.com/fergader1/parcial-2-/blob/main/src/app/tab2/tab2.page.ts"
click node_favorites_service "https://github.com/fergader1/parcial-2-/blob/main/src/app/core/services/favorites.service.ts"
click node_settings "https://github.com/fergader1/parcial-2-/blob/main/src/app/tab3/tab3.page.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_app,node_routes,node_tabs_routes,node_tabs,node_user toneBlue
class node_catalog,node_character_service,node_character_data,node_character_model,node_detail toneAmber
class node_favorites_page,node_favorites_service,node_preferences toneMint
class node_settings toneRose
```

## Components

### App navigation

- [App shell](https://github.com/fergader1/parcial-2-/blob/main/src/app/app.component.ts): `src/app/app.component.ts`
- [App routes](https://github.com/fergader1/parcial-2-/blob/main/src/app/app.routes.ts): `src/app/app.routes.ts`
- [Tab routes](https://github.com/fergader1/parcial-2-/blob/main/src/app/tabs/tabs.routes.ts): `src/app/tabs/tabs.routes.ts`
- [Tabs shell](https://github.com/fergader1/parcial-2-/blob/main/src/app/tabs/tabs.page.ts): `src/app/tabs/tabs.page.ts`

### Character catalog

- [Catalog browsing](https://github.com/fergader1/parcial-2-/blob/main/src/app/tab1/tab1.page.ts): `src/app/tab1/tab1.page.ts`
- [Character service](https://github.com/fergader1/parcial-2-/blob/main/src/app/core/services/characters.service.ts): `src/app/core/services/characters.service.ts`
- [Character data](https://github.com/fergader1/parcial-2-/blob/main/src/assets/data/data.json): `src/assets/data/data.json`
- [Character model](https://github.com/fergader1/parcial-2-/blob/main/src/app/core/interfaces/character.ts): `src/app/core/interfaces/character.ts`
- [Character detail](https://github.com/fergader1/parcial-2-/blob/main/src/app/pages/detail/detail.page.ts): `src/app/pages/detail/detail.page.ts`

### Favorites

- [Favorites list](https://github.com/fergader1/parcial-2-/blob/main/src/app/tab2/tab2.page.ts): `src/app/tab2/tab2.page.ts`
- [Favorites service](https://github.com/fergader1/parcial-2-/blob/main/src/app/core/services/favorites.service.ts): `src/app/core/services/favorites.service.ts`
- **Device preferences**

### App settings

- [Settings](https://github.com/fergader1/parcial-2-/blob/main/src/app/tab3/tab3.page.ts): `src/app/tab3/tab3.page.ts`

### Other components

- **User**

## Connections

- User → App shell: opens
- App shell → App routes: hosts (evidence: `src/main.ts`)
- App routes → Tab routes: loads tabs (evidence: `src/app/app.routes.ts`)
- App routes → Character detail: routes to detail (evidence: `src/app/app.routes.ts`)
- Tab routes → Tabs shell: shows shell (evidence: `src/app/tabs/tabs.routes.ts`)
- Tab routes → Catalog browsing: loads catalog (evidence: `src/app/tabs/tabs.routes.ts`)
- Tab routes → Favorites list: loads favorites (evidence: `src/app/tabs/tabs.routes.ts`)
- Tab routes → Settings: loads settings (evidence: `src/app/tabs/tabs.routes.ts`)
- Catalog browsing → Character service: requests characters (evidence: `src/app/tab1/tab1.page.ts`)
- Character service → Character data: fetches JSON (evidence: `src/app/core/services/characters.service.ts`)
- Catalog browsing → Character model: uses types (evidence: `src/app/tab1/tab1.page.ts`)
- Character service → Character model: uses types (evidence: `src/app/core/services/characters.service.ts`)
- Favorites list → Favorites service: reads and removes (evidence: `src/app/tab2/tab2.page.ts`)
- Settings → Favorites service: clears favorites (evidence: `src/app/tab3/tab3.page.ts`)
- Favorites service → Device preferences: persists favorites (evidence: `src/app/core/services/favorites.service.ts`)
- Favorites service → Character model: uses types (evidence: `src/app/core/services/favorites.service.ts`)
