# jane-does-coding/portfolio-peep architecture

> Architecture diagram of the GitHub repository jane-does-coding/portfolio-peep, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jane-does-coding/portfolio-peep
- Repository: https://github.com/jane-does-coding/portfolio-peep

## Overview

##### Project type and purpose
- This is a frontend-heavy, single-page/interactive website built with Next.js (App Router) that presents “pages” as levels in a mini “game” about the author’s skills and personality.  It’s a static-first site (no custom backend or database) deployed on Vercel, with interactive components (Framer Motion), styling (Tailwind + CSS), and packaged assets (fonts, images, sounds).

##### File structure
- Top-level directories:
- app/ → Next.js App Router directory containing layout.js, global CSS, and per-route page.jsx files (pages 1–6, intro, outro, quick-tour).
- components/ → React components for TheGame wrapper, GamePages, QuickTour, GameFooter, etc.
- data/ → Static JavaScript data (skillsAndRiddles.js).
- public/ → Static assets served from CDN: fonts, images, sounds, resume PDF.
- Config files: next.config.mjs, jsconfig.json, postcss.config.mjs, vercel.json.
- No database or external API dependencies; all content is either code or static data/assets.

##### README for additional insights
- Confirms Next.js, Tailwind, Framer Motion tech stack.
- Mentions inspiration from Nicky Case’s “Evolution of Trust” game and a code-size error when combining pages into one file (hence the per-page route files).

a. Main components:
- Browser (client) running the React/Next.js UI
- Next.js serverless/runtime (on Vercel) that performs routing, SSG/SSR as configured
- Static data layer (skillsAndRiddles.js)
- Public CDN for static assets (fonts, images, sounds, resume)
- Component hierarchy (Layout → TheGame/QuickTour → GamePages → PageX, Footer)
b. Relationships & interactions:
- Browser requests a route → Next.js server resolves it (SSG/static page) → serves HTML/CSS/JS
- React components fetch or import data/asset files at build/runtime
- Framer Motion adds animation in the client
- Public assets are loaded via URLs (CDN)
c. Architectural patterns/design principles:
- Next.js App Router structure (file-based routing, per-route code-splitting)
- Static-first generation (SSG) for SEO/performance
- Component decomposition: TheGame root, subdivided into page-specific components
- Separation of concerns: data folder for content; public for assets; components for UI logic
d. Key technologies: Next.js, React, Tailwind CSS, Framer Motion, Vercel deployment

##### Detail without overthinking
- Component nesting: Layout → TheGame & QuickTour → each PageX → GameFooter
- Configuration files as side notes (next.config.mjs, vercel.json) indicating build/deploy settings
- Static data flow: data/skillsAndRiddles.js → imported by pages → rendered in UI

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client
    Browser["Browser"]:::client

    %% Serverless Next.js
    subgraph "Next.js Serverless (Vercel)" 
        direction TB
        AppRouter["App Router"]:::runtime
        Layout["Layout"]:::runtime
        subgraph "Routes"
            direction TB
            IntroPage["Landing Page (/home)"]:::runtime
            QuickTourRoute["Quick Tour (/quick-tour)"]:::runtime
            Page1Route["Page 1 (/page1)"]:::runtime
            Page2Route["Page 2 (/page2)"]:::runtime
            Page3Route["Page 3 (/page3)"]:::runtime
            Page4Route["Page 4 (/page4)"]:::runtime
            Page5Route["Page 5 (/page5)"]:::runtime
            Page6Route["Page 6 (/page6)"]:::runtime
            OutroRoute["Outro (/outro)"]:::runtime
        end
    end

    %% Component Layer
    subgraph "UI Components" 
        direction TB
        TheGame["TheGame"]:::runtime
        QuickTourComp["QuickTour"]:::runtime
        GamePages["GamePages"]:::runtime
        GameFooter["GameFooter"]:::runtime
    end

    %% Data and Assets
    DataModule["skillsAndRiddles.js"]:::data
    CDN["public/ (CDN Assets)"]:::assets

    %% Config files
    subgraph "Config Files"
        direction TB
        NextConfig["next.config.mjs"]:::config
        VercelConfig["vercel.json"]:::config
        JSConfig["jsconfig.json"]:::config
        PostCSSConfig["postcss.config.mjs"]:::config
    end

    %% Connections
    Browser -->|"HTTP GET /route"| AppRouter
    AppRouter --> Layout
    Layout --> IntroPage
    Layout --> QuickTourRoute
    Layout --> Page1Route
    Layout --> Page2Route
    Layout --> Page3Route
    Layout --> Page4Route
    Layout --> Page5Route
    Layout --> Page6Route
    Layout --> OutroRoute

    %% Routes render components
    IntroPage --> TheGame
    QuickTourRoute --> QuickTourComp
    Page1Route --> GamePages
    Page2Route --> GamePages
    Page3Route --> GamePages
    Page4Route --> GamePages
    Page5Route --> GamePages
    Page6Route --> GamePages
    OutroRoute --> GamePages

    %% Component interactions
    TheGame --> GamePages
    GamePages --> GameFooter
    GamePages --> DataModule
    TheGame --> DataModule
    QuickTourComp --> DataModule
    TheGame --> CDN
    GamePages --> CDN
    QuickTourComp --> CDN

    %% Serverless asset fetch
    AppRouter --> CDN

    %% Config influences build
    NextConfig -.-> AppRouter
    VercelConfig -.-> AppRouter
    JSConfig -.-> AppRouter
    PostCSSConfig -.-> AppRouter

    %% Click Events
    click Layout "https://github.com/jane-does-coding/portfolio-peep/blob/main/app/layout.js"
    click IntroPage "https://github.com/jane-does-coding/portfolio-peep/blob/main/app/page.js"
    click QuickTourRoute "https://github.com/jane-does-coding/portfolio-peep/blob/main/app/(pages)/quick-tour/page.jsx"
    click Page1Route "https://github.com/jane-does-coding/portfolio-peep/blob/main/app/(pages)/page1/page.jsx"
    click Page2Route "https://github.com/jane-does-coding/portfolio-peep/blob/main/app/(pages)/page2/page.jsx"
    click Page3Route "https://github.com/jane-does-coding/portfolio-peep/blob/main/app/(pages)/page3/page.jsx"
    click Page4Route "https://github.com/jane-does-coding/portfolio-peep/blob/main/app/(pages)/page4/page.jsx"
    click Page5Route "https://github.com/jane-does-coding/portfolio-peep/blob/main/app/(pages)/page5/page.jsx"
    click Page6Route "https://github.com/jane-does-coding/portfolio-peep/blob/main/app/(pages)/page6/page.jsx"
    click OutroRoute "https://github.com/jane-does-coding/portfolio-peep/blob/main/app/(pages)/outro/page.jsx"
    click TheGame "https://github.com/jane-does-coding/portfolio-peep/blob/main/components/TheGame.jsx"
    click QuickTourComp "https://github.com/jane-does-coding/portfolio-peep/blob/main/components/QuickTour/QuickTour.jsx"
    click GamePages "https://github.com/jane-does-coding/portfolio-peep/tree/main/components/GamePages/"
    click GameFooter "https://github.com/jane-does-coding/portfolio-peep/blob/main/components/GameFooter.jsx"
    click DataModule "https://github.com/jane-does-coding/portfolio-peep/blob/main/data/skillsAndRiddles.js"
    click CDN "https://github.com/jane-does-coding/portfolio-peep/tree/main/public/"
    click NextConfig "https://github.com/jane-does-coding/portfolio-peep/blob/main/next.config.mjs"
    click VercelConfig "https://github.com/jane-does-coding/portfolio-peep/blob/main/vercel.json"
    click JSConfig "https://github.com/jane-does-coding/portfolio-peep/blob/main/jsconfig.json"
    click PostCSSConfig "https://github.com/jane-does-coding/portfolio-peep/blob/main/postcss.config.mjs"

    %% Styles
    classDef runtime fill:#D0E8FF,stroke:#034E8C,stroke-width:1px
    classDef client fill:#F0F0F0,stroke:#666,stroke-width:1px
    classDef data fill:#FFF4C1,stroke:#E5A300,stroke-width:1px
    classDef assets fill:#C8F7C5,stroke:#2E7D32,stroke-width:1px
    classDef config fill:#FCE4EC,stroke:#C2185B,stroke-width:1px
```
