# la-chatte-2-0/code-amienois architecture

> Architecture diagram of the GitHub repository la-chatte-2-0/code-amienois, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/la-chatte-2-0/code-amienois
- Repository: https://github.com/la-chatte-2-0/code-amienois

## Overview

##### Project type and purpose
- This is a client‐side single‐page application (SPA) built with Vue 3, TypeScript, and Vite.
- It has no custom backend code; it’s deployed as a static web app (Azure Static Web Apps via GitHub Actions).
- Purpose: present a rich, multi‐page interactive site with images, audio, and dynamically rendered content (articles, folklores, checklists, etc.).

##### File structure
- Top‐level files & dirs:
- index.html – SPA entry point
- public/ – static assets (images, sound, robots.txt)
- src/ – application source code
– main.ts – app bootstrap
– router/ – Vue Router configuration
– layout/ (MainLayout.vue) – global shell
– pages/ – route‐level views (Bacchus.vue, CheckList.vue, …)
– components/ – reusable Vue components (shared/, articles/, folklores/)
– core/ – business‐logic modules (checklist.ts, page.ts, historique_croix.ts)
– sass/ – SCSS base files
- Configuration files: tsconfig.json, vite.config.ts, staticwebapp.config.json, CI workflows (.github/workflows/*.yml).

##### Key README insights
- It’s based on the official “Vue 3 + TypeScript + Vite” starter template.
- Emphasizes `<script setup>` SFCs, `vue-tsc` for type‐checking.

a. Main components:
1. Developer/CI Pipeline
– Local dev (VS Code + Vite dev server)
– GitHub Actions (build/test)
– Azure Static Web Apps deployment
2. Hosting/CDN Layer
– Azure Static Web Apps (edge network, blob storage)
3. Client (Browser)
– index.html + bundled JS/CSS served from CDN
– Vue 3 runtime + Vue Router + TypeScript runtime checks
4. Application subcomponents (inside the browser):
– Router – handles navigation to pages
– Layout – global wrappers (MainLayout.vue)
– Pages – screen‐level views (CheckList.vue, Codex.vue, etc.)
– Feature Components – articles, folklores modules under src/components
– Core modules – business logic (checklist.ts, historique_croix.ts, page.ts)
– Assets – images, audio served from public/

b. Relationships & interactions:
- Developer pushes to GitHub → GitHub Actions builds (Vite, vue-tsc) → artifacts deployed to Azure Static Web Apps → CDN caches assets.
- Browser requests index.html → bootstraps Vue app → Router loads page components → page components import shared & feature components and core modules → components fetch static assets (images, audio) via HTTP.

c. Architectural patterns & principles:
- SPA / client‐side routing pattern.
- Component‐based UI (Vue SFCs, Composition API).
- Separation of concerns: pages vs. shared components vs. core logic.
- CI/CD pipeline for automated build and deployment.

d. Technologies, frameworks & libraries:
- Vue 3 Composition API (`<script setup>`)
- Vue Router (src/router)
- TypeScript
- Vite (dev server + build tool)
- SASS for styling
- Azure Static Web Apps / GitHub Actions for hosting

##### Elements
- Dev → GitHub → CI/CD → Azure
- Browser → Azure (index.html, JS, CSS, assets)
- Within Browser: Router → Pages → Components → Core modules
- Components → public assets (images, audio)
- Blue for developer/CI/CD stages
- Green for hosting/CDN
- Orange for client‐side runtime
- Gray for static assets

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer & CI/CD Pipeline
    subgraph "Developer & CI/CD Pipeline"
        direction TB
        DevMachine["Developer Machine\n(VS Code + Vite Dev Server)"]:::dev
        GitHub["GitHub Repository"]:::dev
        GitHubActions["GitHub Actions Workflows"]:::dev
        StaticWebConfig["staticwebapp.config.json"]:::dev
        TSConfig["tsconfig.json / tsconfig.node.json"]:::dev
        ViteConfig["vite.config.ts"]:::dev
    end

    DevMachine -->|push code| GitHub
    GitHub -->|trigger build| GitHubActions
    GitHubActions -->|use config| StaticWebConfig
    GitHubActions -->|use config| TSConfig
    GitHubActions -->|use config| ViteConfig

    %% Hosting & CDN Layer
    subgraph "Hosting & CDN Layer"
        direction TB
        AzureSWAP["Azure Static Web Apps\n(Edge Network & Blob Storage)"]:::cdn
    end

    GitHubActions -->|deploy static assets| AzureSWAP

    %% Browser Client Runtime
    subgraph "Browser Client Runtime"
        direction TB
        BrowserApp["Vue App\n(src/main.ts, src/App.vue)"]:::client
        Router["Router\n(src/router/index.ts)"]:::client
        Layout["MainLayout\n(src/layout/MainLayout.vue)"]:::client
        subgraph "Pages" 
            direction TB
            Bacchus["Bacchus.vue"]:::client
            CheckList["CheckList.vue"]:::client
            Code["Code.vue"]:::client
            Codex["Codex.vue"]:::client
            CouleursRubans["CouleursRubans.vue"]:::client
            FolkloresEtrangers["FolkloresEtrangers.vue"]:::client
            FolkloresFrancais["FolkloresFrancais.vue"]:::client
            Gambrinus["Gambrinus.vue"]:::client
            GuideCouture["GuideCouture.vue"]:::client
            HistoriqueCroix["HistoriqueCroix.vue"]:::client
            Monome["Monome.vue"]:::client
            NotesAuxPMs["NotesAuxPMs.vue"]:::client
            Rabelais["Rabelais.vue"]:::client
            RecapSpe["RecapSpé.vue"]:::client
        end
        subgraph "Feature Components"
            direction TB
            Articles["Articles\n(src/components/articles/)"]:::client
            Folklores["Folklores\n(src/components/folklores/)"]:::client
            Shared["Shared\n(src/components/shared/)"]:::client
        end
        subgraph "Core Modules"
            direction TB
            ChecklistCore["checklist.ts"]:::client
            HistoriqueCore["historique_croix.ts"]:::client
            PageCore["page.ts"]:::client
        end
        Assets["Static Assets\n(public/images, public/sound, public/js)"]:::assets
    end

    AzureSWAP -->|HTTP GET index.html, JS, CSS| BrowserApp
    BrowserApp -->|init| Router
    Router -->|route to| Layout
    Layout -->|renders| Bacchus & CheckList & Code & Codex & CouleursRubans & FolkloresEtrangers & FolkloresFrancais & Gambrinus & GuideCouture & HistoriqueCroix & Monome & NotesAuxPMs & Rabelais & RecapSpe
    Layout -->|contains| Articles & Folklores & Shared
    Bacchus & CheckList & Code & Codex & CouleursRubans & FolkloresEtrangers & FolkloresFrancais & Gambrinus & GuideCouture & HistoriqueCroix & Monome & NotesAuxPMs & Rabelais & RecapSpe -->|import| Articles & Folklores & Shared
    Articles & Folklores & Shared -->|use logic| ChecklistCore & HistoriqueCore & PageCore
    Articles & Folklores & Shared -->|fetch| Assets

    %% Click Events
    click GitHubActions "https://github.com/la-chatte-2-0/code-amienois/blob/main/.github/workflows/build.yml"
    click GitHubActions "https://github.com/la-chatte-2-0/code-amienois/blob/main/.github/workflows/node.js.yml"
    click GitHubActions "https://github.com/la-chatte-2-0/code-amienois/blob/main/.github/workflows/azure-static-web-apps-purple-plant-06b77cc03.yml"
    click StaticWebConfig "https://github.com/la-chatte-2-0/code-amienois/blob/main/staticwebapp.config.json"
    click TSConfig "https://github.com/la-chatte-2-0/code-amienois/blob/main/tsconfig.json"
    click ViteConfig "https://github.com/la-chatte-2-0/code-amienois/blob/main/vite.config.ts"
    click AzureSWAP "https://github.com/la-chatte-2-0/code-amienois/blob/main/staticwebapp.config.json"
    click BrowserApp "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/main.ts"
    click BrowserApp "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/App.vue"
    click Router "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/router/index.ts"
    click Layout "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/layout/MainLayout.vue"
    click Bacchus "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/Bacchus.vue"
    click CheckList "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/CheckList.vue"
    click Code "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/Code.vue"
    click Codex "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/Codex.vue"
    click CouleursRubans "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/CouleursRubans.vue"
    click FolkloresEtrangers "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/FolkloresEtrangers.vue"
    click FolkloresFrancais "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/FolkloresFrancais.vue"
    click Gambrinus "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/Gambrinus.vue"
    click GuideCouture "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/GuideCouture.vue"
    click HistoriqueCroix "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/HistoriqueCroix.vue"
    click Monome "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/Monome.vue"
    click NotesAuxPMs "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/NotesAuxPMs.vue"
    click Rabelais "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/Rabelais.vue"
    click RecapSpe "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/pages/RecapSpé.vue"
    click Articles "https://github.com/la-chatte-2-0/code-amienois/tree/main/src/components/articles/"
    click Folklores "https://github.com/la-chatte-2-0/code-amienois/tree/main/src/components/folklores/"
    click Shared "https://github.com/la-chatte-2-0/code-amienois/tree/main/src/components/shared/"
    click ChecklistCore "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/core/checklist.ts"
    click HistoriqueCore "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/core/historique_croix.ts"
    click PageCore "https://github.com/la-chatte-2-0/code-amienois/blob/main/src/core/page.ts"

    %% Styles
    classDef dev fill:#cfe2f3,stroke:#6fa8dc,color:#000
    classDef cdn fill:#d9ead3,stroke:#93c47d,color:#000
    classDef client fill:#fce5cd,stroke:#f6b26b,color:#000
    classDef assets fill:#ebebeb,stroke:#bbbbbb,color:#000
```
