# raguilera82/poke-app architecture

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

- Interactive diagram: https://gitdiagram.com/raguilera82/poke-app
- Repository: https://github.com/raguilera82/poke-app

## Overview

##### Main Components
- Applications:
- Angular App (in packages/angular-app)
- React App (in packages/react-app)
- Vue App (in packages/vue-app)
- Shared UI Components:
- ui-lib (in packages/ui-lib) – used to provide reusable interface elements.
- Core Utilities (Business Logic and Data Management):
- core-lib-ts (modern TypeScript version)
- core-lib (legacy JavaScript version, noted as deprecated)
- Testing Infrastructure:
- e2e-tests (end-to-end tests with Playwright)
- That there are configuration files (e.g., package.json, vite.config, angular.json) that indicate each app’s build and run setup, affirming separation between front-end implementations.

##### Depicting Relationships and Data Flow
- Of the three apps (Angular, React, and Vue) to the Shared UI library, indicating that they import common UI components.
- Link core-lib-ts (and optionally core-lib) to the applications, showing that business logic, state management, and utilities (such as caching or error handling) are provided by these libraries to the apps.
- Optionally, if there are any external external API calls or Pokémon data services, note those as external services. However, based on the information this repository primarily concentrates on UI and business logic rather than backend API integrations.

##### Architectural Patterns and Design Principles
- Monorepo Structure: Emphasize that the repository uses a workspace-style management (with shared package.json configurations) to manage multiple projects.
- Separation of Concerns: The different apps (Angular, React, Vue) have their dedicated directories with standard frontend structures (src, public, config files) while sharing core utilities and UI libraries.
- Reusability: Shared components (ui-lib) and utilities (core-lib-ts) are decoupled from the individual app implementations, supporting code reuse across frameworks.
- Testing: The e2e-tests package centralizes automated tests for all applications, ensuring consistent behavior via Playwright.

##### Final Reminders to the Principal Software Engineer
- That each component is clearly labeled with its framework or purpose.
- Identifiers for configuration details if needed (e.g., showing where build files like angular.json, vite.config.ts, tsconfig.json are located) to indicate the specifics of how each application is managed.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Poke App Monorepo"
        %% Applications Subgraph
        subgraph "Applications"
            AngularApp["Angular App\n(port 9100, Angular, TypeScript)"]
            ReactApp["React App\n(port 9101, React, TypeScript)"]
            VueApp["Vue App\n(port 9102, Vue, TypeScript)"]
        end

        %% Shared Libraries Subgraph
        subgraph "Shared Libraries"
            UILib["UI Library\n(Shared UI components built with Lit)"]
            CoreModern["Core Utilities (Modern)\n(TypeScript business logic, state management)"]
            CoreLegacy["Core Utilities (Legacy)\n(Deprecated legacy implementation)"]
        end

        %% Testing Infrastructure Subgraph
        subgraph "Testing Infrastructure"
            E2ETests["E2E Tests\n(Playwright)"]
        end
    end

    %% Relationships: Applications to Shared Libraries
    AngularApp -->|"imports"| UILib
    ReactApp  -->|"imports"| UILib
    VueApp    -->|"imports"| UILib

    AngularApp -->|"dependsOn"| CoreModern
    ReactApp  -->|"dependsOn"| CoreModern
    VueApp    -->|"dependsOn"| CoreModern

    AngularApp -.->|"legacy"| CoreLegacy
    ReactApp  -.->|"legacy"| CoreLegacy
    VueApp    -.->|"legacy"| CoreLegacy

    %% Relationships: E2E Tests to Applications
    E2ETests -->|"tests"| AngularApp
    E2ETests -->|"tests"| ReactApp
    E2ETests -->|"tests"| VueApp

    %% Style Definitions
    classDef appStyle fill:#AED6F1,stroke:#1F618D,stroke-width:2px;
    classDef libStyle fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef testStyle fill:#D5F5E3,stroke:#28B463,stroke-width:2px;

    class AngularApp,ReactApp,VueApp appStyle;
    class UILib,CoreModern,CoreLegacy libStyle;
    class E2ETests testStyle;

    %% Click Events
    click AngularApp "https://github.com/raguilera82/poke-app/tree/main/packages/angular-app"
    click ReactApp "https://github.com/raguilera82/poke-app/tree/main/packages/react-app"
    click VueApp "https://github.com/raguilera82/poke-app/tree/main/packages/vue-app"
    click UILib "https://github.com/raguilera82/poke-app/tree/main/packages/ui-lib"
    click CoreModern "https://github.com/raguilera82/poke-app/tree/main/packages/core-lib-ts"
    click CoreLegacy "https://github.com/raguilera82/poke-app/tree/main/packages/core-lib"
    click E2ETests "https://github.com/raguilera82/poke-app/tree/main/packages/e2e-tests"
```
