# andrew-app/folio-website architecture

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

- Interactive diagram: https://gitdiagram.com/andrew-app/folio-website
- Repository: https://github.com/andrew-app/folio-website

## Overview

##### Main Components Identification

a. Frontend Layer
- Astro Static Site Generation
- Solid.js Components
- Content Management (MDX)
- Asset Management

b. Build/Deploy Layer
- Firebase Hosting
- GitHub Actions CI/CD
- CloudFront Integration

##### Structural Organization

a. Content Layer
- /src/content directory structure
- Blogs and MDX processing
- To the content configuration system

b. Component Architecture
- Component hierarchy starting from pages
- Relationship between Astro and Solid.js components
- How components like NavBar integrate with pages

c. Asset Pipeline
- Demonstrate the integration of scripts and animations

##### Specific Implementation Details

- Pages (src/pages/*)
- Components (src/components/*)
- Content (src/content/*)
- Assets (src/assets/*)

- Astro Components (.astro files) - Use hexagons
- Solid.js Components (.tsx files) - Use rectangles

##### Flow Representation

- Build-time content processing
- Runtime component rendering
- Asset loading and optimization
- Deployment pipeline

##### Integration Points

Integration points:
- GitHub Actions CI/CD workflow
- Firebase hosting configuration
- CloudFront event handling
- WASM integration points (based on WasmIcon component)

##### Use a top-down approach
**[Build & Deploy Layer]**
- ↓
**[Static Site Generation]**
- ↓
**[Component Layer]**
- ↓
**[Content Layer]**
- ↓
**[Asset Layer]**

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Build
        CI["CI/CD Pipeline"]
        FB["Firebase Hosting"]
        CF["CloudFront CDN"]
        
        CI --> FB
        FB --> CF
    end

    subgraph SSG["Static Site Generation"]
        AC["Astro Config"]
        TS["TypeScript Config"]
        TW["Tailwind Config"]
        
        AC --> TS
        AC --> TW
    end

    subgraph Components
        Pages["Pages Layer"]
        SolidComps["Solid Components"]
        AstroComps["Astro Components"]
        Nav["Navigation"]
        WASM["WASM Integration"]
        
        Pages --> SolidComps
        Pages --> AstroComps
        Pages --> Nav
        Pages --> WASM
    end

    subgraph Content
        MDX["MDX Content"]
        Blogs["Blog Posts"]
        Projects["Project Pages"]
        ContentConfig["Content Config"]
        
        MDX --> Blogs
        MDX --> Projects
        ContentConfig --> MDX
    end

    subgraph Assets
        Static["Static Assets"]
        Fonts["Font Files"]
        Diagrams["Diagram Assets"]
        Anim["Animation System"]
        AnimHelp["Animation Helpers"]
        
        Static --> Fonts
        Static --> Diagrams
        Anim --> AnimHelp
    end

    Build --> SSG
    SSG --> Components
    Components --> Content
    Components --> Assets

    %% Click Events
    click CI "https://github.com/andrew-app/folio-website/blob/main/.github/workflows/ci-cd.yml"
    click FB "https://github.com/andrew-app/folio-website/blob/main/firebase.json"
    click CF "https://github.com/andrew-app/folio-website/blob/main/src/diagrams/cloudfront-events.astro"
    click AC "https://github.com/andrew-app/folio-website/blob/main/astro.config.mjs"
    click TS "https://github.com/andrew-app/folio-website/blob/main/tsconfig.json"
    click TW "https://github.com/andrew-app/folio-website/blob/main/tailwind.config.cjs"
    click Pages "https://github.com/andrew-app/folio-website/tree/main/src/pages"
    click SolidComps "https://github.com/andrew-app/folio-website/tree/main/src/components"
    click Nav "https://github.com/andrew-app/folio-website/blob/main/src/components/NavBar.tsx"
    click WASM "https://github.com/andrew-app/folio-website/blob/main/src/components/WasmIcon.astro"
    click MDX "https://github.com/andrew-app/folio-website/tree/main/src/content/blogs"
    click Blogs "https://github.com/andrew-app/folio-website/blob/main/src/content/blogs/wasm-lambda.mdx"
    click Projects "https://github.com/andrew-app/folio-website/tree/main/src/pages/projects"
    click ContentConfig "https://github.com/andrew-app/folio-website/blob/main/src/content/config.ts"
    click Static "https://github.com/andrew-app/folio-website/tree/main/src/assets"
    click Fonts "https://github.com/andrew-app/folio-website/tree/main/src/assets/fonts"
    click Diagrams "https://github.com/andrew-app/folio-website/tree/main/src/diagrams"
    click Anim "https://github.com/andrew-app/folio-website/blob/main/src/scripts/Animation.js"
    click AnimHelp "https://github.com/andrew-app/folio-website/blob/main/src/scripts/AnimationHelpers.js"

    %% Styling
    classDef build fill:#2374ab
    classDef ssg fill:#ff7f50
    classDef component fill:#4caf50
    classDef content fill:#9c27b0
    classDef asset fill:#ff9800

    class CI,FB,CF build
    class AC,TS,TW ssg
    class Pages,SolidComps,AstroComps,Nav,WASM component
    class MDX,Blogs,Projects,ContentConfig content
    class Static,Fonts,Diagrams,Anim,AnimHelp asset
```
