# sonnymonroe/mike_abramo_dev_portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/sonnymonroe/mike_abramo_dev_portfolio
- Repository: https://github.com/sonnymonroe/mike_abramo_dev_portfolio

## Overview

##### Project type and purpose
- This is a single-page, static portfolio site built with SvelteKit.
- It uses file-based routing for pages, TailwindCSS for styling, Vite as a bundler, and is deployed to Vercel as a static site.

##### File structure
- Top level:
- package.json, vite.config.js, svelte.config.js, tailwind.config.js (configuration & build)
- src/ – application source code
– app.html, app.css (global static files used by SvelteKit)
– components/ – reusable Svelte components (Header, Footer, Main, Step, Table, VideoCards)
– lib/ – shared utilities or JS modules
– routes/ – file-based routes (+layout.svelte, +page.svelte)
– images/ – locally served images
- No backend code—entirely client-rendered or prerendered.

##### README insights
- Tech stack: SvelteKit + Tailwind + Vite + Vercel
- Deployment target: Vercel, so the build produces static files served via CDN/Edge.

##### Main components
a. Browser (User)
b. Vercel Edge/CDN
c. SvelteKit application (SSR/SSG layer)
d. Vite build pipeline
e. Source code structure: Routes, Components, Static Assets
f. External services: FontAwesome CDN, particles.js JSON, email link (mailto)

##### Relationships and data flow
- Developer → GitHub → Vercel (CI/CD)
- Vercel CI: `npm install` → `npm run build` (Vite + SvelteKit prerender) → deploy static assets
- File-based routing: clicking nav links loads generated HTML/JS for each route

##### Architectural patterns & design principles
- File-based routing (SvelteKit)
- Component-based UI (Svelte components in src/components)
- Static site generation (SSG) on Vercel for performance & SEO
- Utility-first CSS (Tailwind)
- Build abstraction via Vite

##### Sample component grouping
- Routes layer: +layout.svelte, +page.svelte
- Components layer: Header, Footer, Main, Table, etc.
- Config/build layer: svelte.config.js, vite.config.js, tailwind.config.js

##### Detail
- Directory’s role in the flow
- How environment variables flow from Vercel UI → build → code (`import.meta.env`)
- That all routing is client-side after initial load or prerendered at build time

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Development Layer
    subgraph "Development"
        direction TB
        Developer((Developer)):::dev
        GitHub[(GitHub Repo)]:::dev
        Developer -->|push code| GitHub

        subgraph "Source Code"
            direction TB
            ConfigFiles["Config Files"]:::config
            ConfigFiles --> svelteConfig["svelte.config.js"]:::config
            ConfigFiles --> viteConfig["vite.config.js"]:::config
            ConfigFiles --> tailwindConfig["tailwind.config.js"]:::config
            ConfigFiles --> postcssConfig["postcss.config.js"]:::config
            ConfigFiles --> packageJson["package.json"]:::config
            ConfigFiles --> packageLock["package-lock.json"]:::config
            ConfigFiles --> npmrc[".npmrc"]:::config
            ConfigFiles --> readme["README.md"]:::config
            ConfigFiles --> gitignore[".gitignore"]:::config
            ConfigFiles --> todo["todo.txt"]:::config

            subgraph "SvelteKit Application (src/)" 
                direction TB
                click SKApp "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/tree/master/src/"
                SKApp["src/"]:::code

                subgraph "File-Based Routes"
                    direction TB
                    Layout["+layout.svelte"]:::code
                    click Layout "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/blob/master/src/routes/+layout.svelte"
                    Page["+page.svelte"]:::code
                    click Page "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/blob/master/src/routes/+page.svelte"
                end

                subgraph "Components (src/components)"
                    direction TB
                    Header["Header.svelte"]:::code
                    click Header "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/blob/master/src/components/Header.svelte"
                    Footer["Footer.svelte"]:::code
                    click Footer "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/blob/master/src/components/Footer.svelte"
                    Main["Main.svelte"]:::code
                    click Main "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/blob/master/src/components/Main.svelte"
                    Step["Step.svelte"]:::code
                    click Step "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/blob/master/src/components/Step.svelte"
                    Table["Table.svelte"]:::code
                    click Table "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/blob/master/src/components/Table.svelte"
                    VideoCards["VideoCards.svelte"]:::code
                    click VideoCards "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/blob/master/src/components/VideoCards.svelte"
                end

                Utils["src/lib/index.js"]:::code
                click Utils "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/blob/master/src/lib/index.js"

                AppHTML["src/app.html"]:::code
                click AppHTML "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/blob/master/src/app.html"
                AppCSS["src/app.css"]:::code
                click AppCSS "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/blob/master/src/app.css"
            end

            StaticSrc["static/"]:::assets
            click StaticSrc "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/tree/master/static/"
        end
    end

    %% Build & CI/CD Layer
    subgraph "Build & CI/CD"
        direction TB
        GitHub -->|trigger build| VercelCI[(Vercel CI/CD)]:::build
        VercelCI -->|npm install| npmInstall([npm install]):::build
        VercelCI -->|npm run build| BuildProcess([Vite & SvelteKit Build]):::build
        BuildProcess -->|prerender SSG| StaticSite([Static Files]):::build
    end

    %% Deployment Layer
    subgraph "Deployment"
        direction TB
        StaticSite -->|deploy| VercelCDN[(Vercel Edge/CDN)]:::deploy
    end

    %% Runtime Layer
    subgraph "Runtime"
        direction TB
        Browser((Browser)):::runtime
        Browser -->|GET HTML/CSS/JS| VercelCDN
        Browser -->|load icons| FontAwesome[(FontAwesome CDN)]:::external
        Browser -->|fetch particles.json| Particles["particles.json"]:::assets
        Browser -->|open email link| Mailto((Mail Client)):::external

        subgraph "Static Assets Bucket"
            direction TB
            Particles
            IconsFolder["icons/"]:::assets
            click IconsFolder "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/tree/master/static/icons/"
            Favicon["site.webmanifest"]:::assets
            click Favicon "https://github.com/sonnymonroe/mike_abramo_dev_portfolio/blob/master/static/favicon/site.webmanifest"
        end

        VercelCDN --> Particles
        VercelCDN --> IconsFolder
        VercelCDN --> Favicon
    end

    %% Styling
    classDef dev fill:#bbdefb,stroke:#1e88e5
    classDef build fill:#90caf9,stroke:#1565c0
    classDef deploy fill:#a5d6a7,stroke:#2e7d32
    classDef runtime fill:#c8e6c9,stroke:#388e3c
    classDef external fill:#fff59d,stroke:#f9a825
    classDef code fill:#ffe0b2,stroke:#ef6c00
    classDef config fill:#b39ddb,stroke:#6a1b9a
    classDef assets fill:#c5e1a5,stroke:#558b2f
```
