# rafaeluzzi/uzziportfolio architecture

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

- Interactive diagram: https://gitdiagram.com/rafaeluzzi/uzziportfolio
- Repository: https://github.com/rafaeluzzi/uzziportfolio

## Overview

##### Project type and purpose
- From the file tree and “uzziportfolio” README, this is a single-page portfolio website built with React/TypeScript (Vite + Tailwind), deployed on Netlify, with one serverless function (Spotify Now Playing).
- Purpose: showcase a developer’s work, play short sound effects, show live Spotify data, and provide a contact wizard.

##### File structure
- Top-level files:
– index.html, src/main.tsx: entry for React app
– vite.config.ts, tsconfig.json: build & TS config
– tailwind.config.js, postcss.config.js: styling pipeline
– netlify.toml + netlify/functions/spotify.ts: deployment + serverless API
- src/components: dozens of UI sections (Hero, About, Experience, Projects, Contact, etc.)
- src/lib/sfx: sound-effect assets
- static assets & config: .bolt, backups folders, components.json
- package.json + lock: dependencies (React, Vite, Tailwind, etc.)

##### README for additional insights
- README is minimal but the file tree and Netlify function imply an architecture: a React SPA calling a serverless endpoint that proxies Spotify API.

a. Main components
– Client Browser (User’s device)
– React SPA (hosted on a CDN via Netlify)
– Static Asset Store (images, sfx, CSS, JS bundles)
– Netlify Build & Deployment Pipeline (Vite build + tailwind)
– Netlify Functions (spotify.ts)
– External Spotify API
b. Relationships & interactions
– Browser requests JS/CSS bundles & static assets from Netlify/CDN
– React app initializes, renders components, plays SFX from asset store
– “NowPlaying” component calls the Netlify Function endpoint
– Function fetches data from the Spotify API, returns JSON to SPA
c. Architectural patterns & principles
– SPA architecture: client-side routing & rendering
– Serverless backend for third-party API integration (no dedicated server)
– CI/CD: automated builds via Netlify (Vite → production assets)
– Modular component design (React + TypeScript, TSX files per section)
d. Key technologies
– React + ReactDOM, Vite (dev server + bundler)
– TypeScript, TailwindCSS, PostCSS
– Netlify (hosting + functions), Spotify Web API
– Static assets (wav/mp3) served from src/lib/sfx

- React SPA
– main.tsx, App.tsx, src/components/...
– Routing, state management (if any), UI logic
- Build & Deploy
– vite.config.ts → bundle → dist/
– netlify.toml triggers deploy
- Serverless Function
– spotify.ts: authenticates & proxies Spotify Web API
- External Services
– Spotify Web API (token endpoint, now-playing endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "User"
        Browser["User's Browser"]:::external
    end

    subgraph "Hosting & CDN"
        CDN["Netlify CDN"]:::frontend
    end

    subgraph "Build & Deploy"
        VITE["vite.config.ts"]:::pipeline
        TS["tsconfig.json"]:::pipeline
        Tailwind["tailwind.config.js"]:::pipeline
        PostCSS["postcss.config.js"]:::pipeline
        NetlifyToml["netlify.toml"]:::pipeline
        VITE & TS & Tailwind & PostCSS & NetlifyToml -->|"build&deploy"| CDN
    end

    Browser -->|"GET assets"| CDN

    subgraph "React SPA"
        HTML["index.html"]:::frontend
        Main["src/main.tsx"]:::frontend
        App["src/App.tsx"]:::frontend
        Hero["src/components/HeroSection.tsx"]:::frontend
        About["src/components/AboutSection.tsx"]:::frontend
        Exp["src/components/ExperienceSection.tsx"]:::frontend
        Proj["src/components/ProjectsSection.tsx"]:::frontend
        DevInq["src/components/DevInquiryWizard.tsx"]:::frontend
        NP["src/components/NowPlaying.tsx"]:::frontend
    end

    CDN --> HTML
    HTML --> Main
    Main --> App
    App --> Hero
    App --> About
    App --> Exp
    App --> Proj
    App --> DevInq
    App --> NP

    subgraph "Static Assets"
        Assets["Sound Effects Store"]:::storage
    end

    Hero -->|"useSFX"| Assets
    Exp -->|"useSFX"| Assets
    Proj -->|"useSFX"| Assets
    DevInq -->|"playSFX"| Assets

    subgraph "Serverless Functions"
        Function["/now-playing Function"]:::backend
    end

    NP -->|"fetchNowPlaying"| Function
    Function -->|"SpotifyAPIrequest"| Spotify
    Function -->|"returnsJSON"| NP

    Spotify["Spotify Web API"]:::external

    click HTML "https://github.com/rafaeluzzi/uzziportfolio/blob/main/index.html"
    click Main "https://github.com/rafaeluzzi/uzziportfolio/blob/main/src/main.tsx"
    click App "https://github.com/rafaeluzzi/uzziportfolio/blob/main/src/App.tsx"
    click Hero "https://github.com/rafaeluzzi/uzziportfolio/blob/main/src/components/HeroSection.tsx"
    click About "https://github.com/rafaeluzzi/uzziportfolio/blob/main/src/components/AboutSection.tsx"
    click Exp "https://github.com/rafaeluzzi/uzziportfolio/blob/main/src/components/ExperienceSection.tsx"
    click Proj "https://github.com/rafaeluzzi/uzziportfolio/blob/main/src/components/ProjectsSection.tsx"
    click DevInq "https://github.com/rafaeluzzi/uzziportfolio/blob/main/src/components/DevInquiryWizard.tsx"
    click NP "https://github.com/rafaeluzzi/uzziportfolio/blob/main/src/components/NowPlaying.tsx"
    click Assets "https://github.com/rafaeluzzi/uzziportfolio/tree/main/src/lib/sfx/"
    click VITE "https://github.com/rafaeluzzi/uzziportfolio/blob/main/vite.config.ts"
    click TS "https://github.com/rafaeluzzi/uzziportfolio/blob/main/tsconfig.json"
    click Tailwind "https://github.com/rafaeluzzi/uzziportfolio/blob/main/tailwind.config.js"
    click PostCSS "https://github.com/rafaeluzzi/uzziportfolio/blob/main/postcss.config.js"
    click NetlifyToml "https://github.com/rafaeluzzi/uzziportfolio/blob/main/netlify.toml"
    click Function "https://github.com/rafaeluzzi/uzziportfolio/blob/main/netlify/functions/spotify.ts"

    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef storage fill:#90EE90,stroke:#000,stroke-width:1px
    classDef backend fill:#FFA500,stroke:#000,stroke-width:1px
    classDef external fill:#DDA0DD,stroke:#000,stroke-width:1px
    classDef pipeline fill:#D3D3D3,stroke:#000,stroke-width:1px
```
