# jamp1416/pokedex architecture

> Architecture diagram of the GitHub repository jamp1416/pokedex, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jamp1416/pokedex
- Repository: https://github.com/jamp1416/pokedex

## Overview

##### Project type and purpose
- This is a workshop repository (“ac4dem1a”) containing two front‑end labs under `sistemas‑distribuidos`:
- ‑race‑lab – a purely static HTML/CSS/JS site with assets.
- poke‑dex‑lab – an Angular single‑page application that calls a GraphQL endpoint.
- There is no custom backend code; both are deployed as static web apps via GitHub Actions to Azure Static Web Apps.

##### File structure
- Top level:
- `.github/workflows/*.yml` – CI/CD pipelines triggered on push.
- `sistemas-distribuidos/list-race-lab` – static site folder with `index.html`, CSS, JS, images.
- `sistemas-distribuidos/poke-dex-lab/source/pokedex-angular` – full Angular project (standard Angular CLI layout: `src/app`, `assets`, `environments`, plus build/config files).
- Patterns & config:
- Angular modules: `core`, `data`, `shared`, `views` – typical layered SPA architecture.
- GraphQL module and `.graphql` queries – indicates use of an external GraphQL API.
- GitHub workflows named “azure-static-web-apps‑…” – static‑hosting CI/CD.

##### README
- Minimal high‑level description: “Workshops of different technologies.”

##### Elements
- Repo → CI/CD → Azure
- Browser → Azure → Browser
- Browser (poke‑dex) ↔ External API
- Blue for code/repos/pipelines
- Green for hosting/CDN
- Orange for runtime components (browser, external API)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Development & CI/CD
    subgraph "Development & CI/CD"
        Repo["GitHub Repository"]:::code
        CI["CI/CD Pipelines"]:::code
        Repo -->|"push"| CI
    end
    click Repo "https://github.com/jamp1416/pokedex/tree/master//"
    click CI "https://github.com/jamp1416/pokedex/blob/master//.github/workflows/*.yml"

    %% Static Site Code
    subgraph "list-race-lab Code"
        LRFolder["Project Folder"]:::code
        LRIndex["index.html"]:::code
        LRAssets["Assets (CSS/JS/Images)"]:::code
        Repo --> LRFolder
        LRFolder --> LRIndex
        LRFolder --> LRAssets
    end
    click LRFolder "https://github.com/jamp1416/pokedex/tree/master//sistemas-distribuidos/list-race-lab/"
    click LRIndex "https://github.com/jamp1416/pokedex/blob/master//sistemas-distribuidos/list-race-lab/index.html"
    click LRAssets "https://github.com/jamp1416/pokedex/tree/master//sistemas-distribuidos/list-race-lab/assets/"

    %% Angular SPA Code
    subgraph "poke-dex-lab Code"
        ARC["angular.json"]:::code
        MainTs["main.ts"]:::code
        IndexPoke["index.html"]:::code
        Repo --> ARC
        ARC --> MainTs
        ARC --> IndexPoke

        subgraph "App Modules"
            Core["Core Module"]:::module
            Data["Data Module"]:::module
            Shared["Shared Module"]:::module
            Views["Views Modules"]:::module
            Data --> GraphQLFiles[".graphql Queries"]:::module
        end
    end
    click ARC "https://github.com/jamp1416/pokedex/blob/master//sistemas-distribuidos/poke-dex-lab/source/pokedex-angular/angular.json"
    click MainTs "https://github.com/jamp1416/pokedex/blob/master//sistemas-distribuidos/poke-dex-lab/source/pokedex-angular/src/main.ts"
    click IndexPoke "https://github.com/jamp1416/pokedex/blob/master//sistemas-distribuidos/poke-dex-lab/source/pokedex-angular/src/index.html"
    click Core "https://github.com/jamp1416/pokedex/tree/master//sistemas-distribuidos/poke-dex-lab/source/pokedex-angular/src/app/core/"
    click Data "https://github.com/jamp1416/pokedex/tree/master//sistemas-distribuidos/poke-dex-lab/source/pokedex-angular/src/app/data/"
    click Shared "https://github.com/jamp1416/pokedex/tree/master//sistemas-distribuidos/poke-dex-lab/source/pokedex-angular/src/app/shared/"
    click Views "https://github.com/jamp1416/pokedex/tree/master//sistemas-distribuidos/poke-dex-lab/source/pokedex-angular/src/app/views/"
    click GraphQLFiles "https://github.com/jamp1416/pokedex/tree/master//sistemas-distribuidos/poke-dex-lab/source/pokedex-angular/src/app/data/graphql/"

    %% Deployments
    subgraph "Deployments"
        AzureList["Azure Static Web App (list-race)"]:::hosting
        AzurePoke["Azure Static Web App (poke-dex)"]:::hosting
        CI -->|"deploy list-race"| AzureList
        CI -->|"deploy poke-dex"| AzurePoke
    end

    %% CDN
    subgraph "CDN"
        CDNList["CDN (list-race)"]:::hosting
        CDNPoke["CDN (poke-dex)"]:::hosting
        AzureList --> CDNList
        AzurePoke --> CDNPoke
    end

    %% Runtime
    Browser["Browser (User)"]:::runtime
    ExternalAPI["External GraphQL API"]:::runtime

    CDNList -->|"serves static site"| Browser
    CDNPoke -->|"serves SPA assets"| Browser
    Browser -->|"GraphQL request"| ExternalAPI

    classDef code fill:#D0E1FF,stroke:#3B7DD8,color:#0B3D91,stroke-width:1px;
    classDef hosting fill:#E6F4EA,stroke:#28A745,color:#19692C,stroke-width:1px;
    classDef runtime fill:#FFF4E6,stroke:#FF9900,color:#D46A00,stroke-width:1px;
    classDef module fill:#F3E5FF,stroke:#9C27B0,color:#6A0080,stroke-width:1px;
```
