# 4skinskywalker/syllogimous-v4 architecture

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

- Interactive diagram: https://gitdiagram.com/4skinskywalker/syllogimous-v4
- Repository: https://github.com/4skinskywalker/syllogimous-v4

## Overview

##### Project type and purpose
- This is a purely client‑side Single‑Page Application (SPA) built with Angular (v14+).
- It serves as an interactive logic puzzle/game (“Syllogimous”) with tutorials, game pages, statistics, and settings.
- It’s compiled into static assets (`docs/`) and hosted (e.g., GitHub Pages).

##### File structure
- Top‑level: Angular CLI config (`angular.json`), TypeScript config, `package.json`.
- `docs/`: production build output (HTML, JS bundles, CSS, assets).
- `src/`: main Angular source
- `src/app/app.module.ts` (root module)
- `src/app/shared/shared.module.ts` (reusable UI components, directives, pipes)
- `src/app/syllogimous/syllogimous.module.ts` (feature module implementing core game logic and pages)
- Services:
– Global (e.g., `toast.service.ts` in `app/services/`)
– Game‑specific (`syllogimous.service.ts`, `stats.service.ts` in `syllogimous/services/`)
- Components: grouped under `shared/components/` and `syllogimous/pages/…`
- Utilities: under `src/app/utils/` and `src/app/syllogimous/utils/`
- Assets, environment configs, and entry points (`main.ts`, `index.html`).

##### README
- Confirms SPA usage; no external API dependencies.
- Focus is on standalone gameplay, settings, and analytics (client‑side).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Layers and Entities
    Browser["Browser (User Agent)"]:::external
    subgraph "Presentation Layer"
        direction TB
        subgraph "Root Module"
            direction TB
            AppComponent["AppComponent"]:::ui
            AppModule["AppModule"]:::ui
        end
        subgraph "SharedModule"
            direction TB
            SharedModule["SharedModule"]:::ui
            BackButtonComponent["BackButtonComponent"]:::ui
            ChartComponent["ChartComponent"]:::ui
            CopyPasterComponent["CopyPasterComponent"]:::ui
            DynamicFormComponent["DynamicFormComponent"]:::ui
            HolyGrailComponent["HolyGrailComponent"]:::ui
            ToastsContainerComponent["ToastsContainerComponent"]:::ui
        end
        subgraph "SyllogimousModule"
            direction TB
            SyllogimousComponent["SyllogimousComponent"]:::ui
        end
    end

    subgraph "Application Logic Layer"
        direction TB
        subgraph "Global Services"
            ToastService["ToastService"]:::service
        end
        subgraph "Game Services"
            SyllogimousService["SyllogimousService"]:::service
            StatsService["StatsService"]:::service
            ProgressAndPerformanceService["ProgressAndPerformanceService"]:::service
            StatsExportService["StatsExportService"]:::service
        end
    end

    subgraph "Data Layer"
        LocalStorage["LocalStorage"]:::data
    end

    subgraph "Build & Deployment Pipeline"
        direction TB
        CLI["Angular CLI"]:::tool
        Webpack["Webpack"]:::tool
        Docs["docs/ (bundles)"]:::tool
        CLI --> Webpack --> Docs
    end

    StaticHost["Static Hosting (GitHub Pages)"]:::host

    %% Connections
    Browser -->|"loads"| AppComponent
    AppComponent -->|"bootstrap"| AppModule
    AppModule -->|"imports"| SharedModule
    AppModule -->|"imports"| SyllogimousModule
    SyllogimousModule -->|"contains"| SyllogimousComponent

    %% UI to Services
    AppComponent -->|"notify()"| ToastService
    BackButtonComponent -->|"emitClick()"| ToastService
    SyllogimousComponent -->|"getQuestions()"| SyllogimousService
    SyllogimousComponent -->|"saveStats()"| StatsService
    SyllogimousComponent -->|"trackProgress()"| ProgressAndPerformanceService
    SyllogimousComponent -->|"export()"| StatsExportService

    %% Services to Data
    ToastService -->|"storeToast()"| LocalStorage
    StatsService -->|"saveStats()"| LocalStorage
    ProgressAndPerformanceService -->|"persistProgress()"| LocalStorage
    SyllogimousService -->|"loadQuestions()"| LocalStorage

    %% Deployment flow
    Docs -->|"serves"| StaticHost

    %% Click Events
    click AppModule "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/app.module.ts"
    click SharedModule "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/shared/shared.module.ts"
    click SyllogimousModule "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/syllogimous/syllogimous.module.ts"
    click AppComponent "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/app.component.ts"
    click SyllogimousComponent "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/syllogimous/syllogimous.component.ts"
    click ToastService "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/services/toast.service.ts"
    click SyllogimousService "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/syllogimous/services/syllogimous.service.ts"
    click StatsService "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/syllogimous/services/stats.service.ts"
    click ProgressAndPerformanceService "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/syllogimous/services/progress-and-performance.service.ts"
    click StatsExportService "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/syllogimous/services/stats-export.service.ts"
    click BackButtonComponent "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/shared/components/back-button/back-button.component.ts"
    click ChartComponent "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/shared/components/chart.component.ts"
    click CopyPasterComponent "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/shared/components/copy-paster/copy-paster.component.ts"
    click DynamicFormComponent "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/shared/components/dynamic-form/dynamic-form.component.ts"
    click HolyGrailComponent "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/shared/components/holy-grail/holy-grail.component.ts"
    click ToastsContainerComponent "https://github.com/4skinskywalker/syllogimous-v4/blob/main/src/app/shared/components/toasts-container/toasts-container.component.ts"

    %% Styles
    classDef ui fill:#cce5ff,stroke:#004085,color:#004085
    classDef service fill:#d4edda,stroke:#155724,color:#155724
    classDef data fill:#fff3cd,stroke:#856404,color:#856404
    classDef tool fill:#e2e3e5,stroke:#6c757d,color:#6c757d
    classDef host fill:#ffe5b4,stroke:#cc8400,color:#cc8400
    classDef external fill:#f0f0f0,stroke:#888,color:#888
```
