How fowlfarmer/website works
What this project is (type + purpose)
This repo is a personal website / portfolio deployed at tzhu.dev, primarily a React single-page app (SPA) built with Vite. The file tree also contains a small Python “api” folder (likely serverless functions/endpoints) used for a couple of integrations (e.g., Spotify).
So architecturally it’s a static frontend + optional lightweight API endpoints + static assets, deployed on Vercel.
Frontend (Vite + React)
Key indicators:
• index.html, vite.config.js, package.json, src/main.jsx → Vite + React entrypoints
• src/App.jsx → main app shell
• src/components/* → UI components
• src/components/cards/* → “card” subcomponents (portfolio items / gallery tiles)
• src/data/projects.js → local data model powering the UI (projects content)
This suggests a classic SPA layout:
• Entry: index.html → mounts React root via src/main.jsx
• Composition root: App.jsx wires major sections (NavBar, Self, Gallery, Contact, etc.)
• Presentation components: in components/ and components/cards/
• Content: driven by src/data/projects.js
Static assets
• public/* contains PDFs, zips, and .well-known/discord
• The presence of .well-known implies some domain verification / identity endpoint (Discord verification or similar), served as static files.
Backend/API (lightweight)
• api/macbook.py
• api/spotify.py
• requirements.txt
This pattern strongly resembles Vercel serverless functions (or a similar serverless convention) where files in api/ are deployed as HTTP endpoints.
Even if unused, it’s important to represent them as a separate runtime from the SPA.
Deployment
• package-lock.json and requirements.txt → two build ecosystems (Node for frontend; Python for serverless endpoints)
What the README adds
The README is minimal, but it confirms:
• purpose: “personal webpage”
• tech: “Built with react”
• production URL: tzhu.dev
Serverless API (Python)
• /api/spotify (from api/spotify.py)
• /api/macbook (from api/macbook.py)
External Services
• Spotify Web API (very likely, given spotify.py)
Optionally (but useful for principal-level clarity), add:
Build pipeline
• “Vite build (Node)” producing static bundle
• “Python deps” for serverless functions
• Browser → Vercel Hosting: GET /
• Vercel Hosting → Browser: serves index.html, JS/CSS bundle (from Vite build)
• Browser → Vercel Static Assets: GET /Theodore_Resume.pdf, etc. (served from public/)
• SPA (in browser) → Vercel Serverless API: GET /api/spotify (or whatever endpoints are called)
• Vercel Serverless API → Spotify Web API: authenticated API calls (if applicable)
• Spotify Web API → Serverless API → SPA: response payload
• Browser → Vercel Static .well-known/... for verification (if relevant to domain integrations)
• React code runs in the browser
• serverless functions run on Vercel (separate compute)
• external services are off-platform
Architectural patterns/design principles present
For this project, explicitly label:
• SPA architecture (client-side rendering; React component tree)
• Static hosting + serverless (BFF-style endpoints for third-party integration)
• Content-as-data (projects driven by src/data/projects.js)
• Component composition (sections + cards)
Relevant technologies/frameworks
• Frontend: React, Vite, (optionally “JSX”, “CSS”)
• Hosting: Vercel
• API: Python serverless functions (Vercel Functions)
• External: Spotify API
• Assets: public/ (PDF/ZIP), .well-known
• User Browser
• Vercel (hosting + serverless)
• React SPA static bundle
• public assets
• serverless endpoints
• Spotify API
This is where you “separate into as many components as possible” based on src/components:
• App.jsx at the center
• NavBar, Self, Gallery, Contact
• Gallery → cards/* (each card component)
• Data flow: projects.js feeding Gallery/cards
This gives a highly accurate picture of how the UI is structured, which matters for a portfolio site.