# trzmlel/little-prince-collection architecture

> Architecture diagram of the GitHub repository trzmlel/little-prince-collection, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/trzmlel/little-prince-collection
- Repository: https://github.com/trzmlel/little-prince-collection

## Overview

##### Project type and purpose
- This is a statically generated, client-side web application built with **Nuxt (Vue.js)**.
- Purpose: showcase a personal book collection, with interactive 3D/animation effects (via **Three.js** and **GSAP**) and styling via **TailwindCSS**.
- Content is sourced at build time from local JSON files (in `public/`) and managed via Pages CMS.

##### File structure
- **Top-level files & config**
· `nuxt.config.ts` & `tsconfig.json` → Nuxt and TypeScript setups
· `.github/workflows/nuxtjs.yml` → CI/CD pipeline for build & deploy
· `.pages.yml` → Pages CMS configuration
- **`pages/`**
· `index.vue` → main gallery view
· `[isbn].vue` → dynamic route for book details
· `three.js` & `three-book.js` → client-side Three.js scene setup
- **`assets/`**
· CSS, fonts, shaders, images – bundled by Nuxt during build
- **`public/`**
· `books.json`, `languages.json` → static data sources
· `covers/`, `images/` → static assets served as-is
- **`server/`**
· Present but empty of logic – this project is purely static.

##### Review the README insights
- Tech stack confirms Nuxt/Vue, GSAP, Tailwind, Three.js, Pages CMS.
- Deployment instructions: `npm run generate` → static site → hosted on GitHub Pages.

##### Components & interactions to illustrate
a. Developer environment
- Code editor → Git repo (GitHub)
- Local dev server (`npm run dev`)
b. CI/CD pipeline
- GitHub Actions workflow → executes build & `npm run generate`
- Deploys output to GitHub Pages (via Pages CMS / `.pages.yml`)
c. Static site output
- Generated HTML/CSS/JS
- Bundled assets (images, shaders, fonts)
d. Client browser
- Fetches static files from CDN/GitHub Pages
- Executes Vue app, Three.js scenes, GSAP animations
e. Data sources
- Local JSON files (`books.json`, `languages.json`) at build time
- Pages CMS (if used for remote editing)

##### Architectural patterns & design principles
- **Separation of concerns**:
- Build pipeline vs. runtime
- Static assets vs. application logic
- **Static-site generation (SSG)**
- **Modular Vue components** (under `pages/` and `components/` if present)
- **CI/CD as code** (GitHub Actions)

##### Every essential element
- Be exhaustive: include fonts, shaders, JSON data, and 3rd-party libs
- Do not overcomplicate: stick to clear separation between build, deploy, run.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Developer Machine"
        Dev["Code Editor & Local Dev\n(npm run dev)"]:::dev
    end

    Dev -->|"push code"| Repo["GitHub Repo"]:::repo

    subgraph "CI/CD Pipeline"
        Actions["GitHub Actions Workflow"]:::ci
    end
    Repo -->|triggers| Actions
    click Actions "https://github.com/trzmlel/little-prince-collection/blob/master/.github/workflows/nuxtjs.yml"

    subgraph "Build Process"
        Build["Node.js + Nuxt.js SSG"]:::build
        subgraph "Build Inputs"
            NuxtConfig["nuxt.config.ts"]:::config
            TSConfigRoot["tsconfig.json"]:::config
            TSConfigServer["server/tsconfig.json"]:::config
            AppVue["app.vue"]:::component
            PagesIndex["pages/index.vue"]:::component
            PagesDetail["pages/[isbn].vue"]:::component
            ThreeInit["pages/three.js"]:::component
            ThreeBook["pages/three-book.js"]:::component
            Styles["assets/css/main.css"]:::asset
            Fonts["assets/fonts/"]:::asset
            ShadersVertex["assets/shaders/vertex.glsl"]:::asset
            ShadersFragment["assets/shaders/fragment.glsl"]:::asset
            ShadersFBO["assets/shaders/fbo.glsl"]:::asset
            ImagesBundle["assets/images/"]:::asset
            PublicCovers["public/covers/"]:::static
            PublicImages["public/images/"]:::static
            BooksJSON["public/books.json"]:::static
            LangJSON["public/languages.json"]:::static
            Manifest["public/site.webmanifest"]:::static
            Robots["public/robots.txt"]:::static
            PackageJSON["package.json"]:::config
            PackageLock["package-lock.json"]:::config
            ServerStub["server/"]:::static
        end
    end

    Actions -->|run npm generate| Build

    Build -->|"output static files"| Output["Generated HTML/CSS/JS\n+ Assets"]:::output

    subgraph "Deployment"
        Deploy["Deploy to GitHub Pages\n(.pages.yml)"]:::deploy
    end
    click Deploy "https://github.com/trzmlel/little-prince-collection/blob/master/.pages.yml"

    Output -->|deploy| Deploy

    Deploy -->|serve| CDN["CDN / GitHub Pages"]:::cdn

    CDN -->|HTTP GET| Browser["Client Browser"]:::browser

    subgraph "Runtime (Browser)" 
        VueRouter["Vue Router"]:::runtime
        ThreeJS["Three.js Engine"]:::runtime
        GSAP["GSAP Animations"]:::runtime
        Tailwind["TailwindCSS"]:::runtime
    end
    Browser --> VueRouter
    Browser --> ThreeJS
    Browser --> GSAP
    Browser --> Tailwind

    classDef dev fill:#BBDEFB,stroke:#0D47A1,color:#0D47A1;
    classDef repo fill:#FFF9C4,stroke:#F57F17,color:#F57F17;
    classDef ci fill:#FFE0B2,stroke:#E65100,color:#E65100;
    classDef build fill:#C8E6C9,stroke:#1B5E20,color:#1B5E20;
    classDef output fill:#D1C4E9,stroke:#4A148C,color:#4A148C;
    classDef deploy fill:#FFCCBC,stroke:#BF360C,color:#BF360C;
    classDef cdn fill:#BBDEFB,stroke:#0D47A1,color:#0D47A1;
    classDef browser fill:#F0F4C3,stroke:#827717,color:#827717;
    classDef runtime fill:#FFF9C4,stroke:#F57F17,color:#F57F17;
    classDef config fill:#E1BEE7,stroke:#6A1B9A,color:#6A1B9A;
    classDef component fill:#FFECB3,stroke:#FF6F00,color:#FF6F00;
    classDef asset fill:#E0F7FA,stroke:#006064,color:#006064;
    classDef static fill:#F5F5F5,stroke:#616161,color:#424242;

    click NuxtConfig "https://github.com/trzmlel/little-prince-collection/blob/master/nuxt.config.ts"
    click TSConfigRoot "https://github.com/trzmlel/little-prince-collection/blob/master/tsconfig.json"
    click TSConfigServer "https://github.com/trzmlel/little-prince-collection/blob/master/server/tsconfig.json"
    click AppVue "https://github.com/trzmlel/little-prince-collection/blob/master/app.vue"
    click PagesIndex "https://github.com/trzmlel/little-prince-collection/blob/master/pages/index.vue"
    click PagesDetail "https://github.com/trzmlel/little-prince-collection/blob/master/pages/[isbn].vue"
    click ThreeInit "https://github.com/trzmlel/little-prince-collection/blob/master/pages/three.js"
    click ThreeBook "https://github.com/trzmlel/little-prince-collection/blob/master/pages/three-book.js"
    click Styles "https://github.com/trzmlel/little-prince-collection/blob/master/assets/css/main.css"
    click Fonts "https://github.com/trzmlel/little-prince-collection/tree/master/assets/fonts/"
    click ShadersVertex "https://github.com/trzmlel/little-prince-collection/blob/master/assets/shaders/vertex.glsl"
    click ShadersFragment "https://github.com/trzmlel/little-prince-collection/blob/master/assets/shaders/fragment.glsl"
    click ShadersFBO "https://github.com/trzmlel/little-prince-collection/blob/master/assets/shaders/fbo.glsl"
    click ImagesBundle "https://github.com/trzmlel/little-prince-collection/tree/master/assets/images/"
    click PublicCovers "https://github.com/trzmlel/little-prince-collection/tree/master/public/covers/"
    click PublicImages "https://github.com/trzmlel/little-prince-collection/tree/master/public/images/"
    click BooksJSON "https://github.com/trzmlel/little-prince-collection/blob/master/public/books.json"
    click LangJSON "https://github.com/trzmlel/little-prince-collection/blob/master/public/languages.json"
    click Manifest "https://github.com/trzmlel/little-prince-collection/blob/master/public/site.webmanifest"
    click Robots "https://github.com/trzmlel/little-prince-collection/blob/master/public/robots.txt"
    click PackageJSON "https://github.com/trzmlel/little-prince-collection/blob/master/package.json"
    click PackageLock "https://github.com/trzmlel/little-prince-collection/blob/master/package-lock.json"
    click ServerStub "https://github.com/trzmlel/little-prince-collection/tree/master/server/"
```
