How adolph97/portfolio works
What this project is (type + purpose)
This is a static, client-rendered personal portfolio web app built with React + TypeScript and bundled by Vite. It’s primarily a front-end SPA that renders multiple “sections” (Hero, Portfolio, Services, etc.) and includes interactive elements (custom cursor, 3D scene via Three.js).
There is also an api/ folder containing api/contact.ts, which strongly suggests one serverless API endpoint (e.g., Vercel/Netlify-style function) for contact form submissions. So architecturally it’s “mostly static frontend” + “optional backend function”.
Frontend entry + composition
• index.html — Vite entry HTML shell (loads the JS bundle).
• index.tsx — React bootstrap (mounts the app into DOM).
• App.tsx — top-level composition and routing (likely single-page sections).
• index.css — global styling.
UI/components structure
• components/Navigation.tsx — top navigation, anchors to sections.
• components/CustomCursor.tsx — global cursor behavior, event listeners.
• components/ThreeScene.tsx — Three.js canvas/scene management (renderer, camera, animation loop).
• components/UI/* — smaller widgets:
• RotatingGlobe.tsx (likely Three/Canvas or SVG)
• ScrollToTop.tsx
• SocialLinks.tsx
• SystemStatus.tsx (could call an external status API or just render a status indicator)
Page sections (feature modules)
• components/Sections/*:
• Hero.tsx, Portfolio.tsx, Services.tsx, Process.tsx, TechStack.tsx, Testimonials.tsx, GlobalPresence.tsx, Contact.tsx
Backend/API (optional but important)
• api/contact.ts — one API endpoint/function. Typically:
• receives POST from Contact section
• validates payload
• sends email / writes somewhere / calls third-party service
Build output + hosting
• dist/ — built artifacts (bundled JS/CSS, optimized assets, dist/index.html).
• public/ — static assets copied as-is (images, logos).
• vite.config.ts, tsconfig.json, package.json — build/toolchain boundary.
What the README adds (stack + key features to highlight)
From README:
• Interactive UI, 3D elements → highlight Three.js rendering loop and browser GPU/canvas boundary.
• Modular sections → highlight internal component modularity.
• React+TS+Vite → highlight toolchain and artifact pipeline.
The README’s “src/” in the example doesn’t match your tree (you have top-level components/, App.tsx, etc.), but functionally it’s the same: a React app with modular components.
System Context (C4 L1)
Who uses it, where it runs, what external dependencies exist.
Browser SPA, Static hosting/CDN, optional serverless API, external email/service.
App composition: App.tsx → Navigation/Sections/ThreeScene/UI widgets; Contact section → API call.
Browser → Static Host/CDN
• GET / → index.html
• GET assets/index-*.js, assets/index-*.css, images/logos
React SPA internal flows
• index.tsx mounts App.tsx
• App.tsx renders Navigation, CustomCursor, ThreeScene, and each Sections/*
• Navigation scrolls to anchors / section refs
• ScrollToTop listens to scroll, triggers window scroll
• CustomCursor listens to pointer events and updates UI
• ThreeScene creates WebGL context and runs animation loop (requestAnimationFrame)
Contact flow
• User submits in Sections/Contact.tsx
• Contact.tsx → HTTP POST /api/contact (or similar)
• api/contact.ts → (optional) Email provider / storage
• Response → UI success/failure state
Build/deploy (non-runtime but essential)
• git push → CI (optional) → pnpm install → pnpm build (Vite) → upload dist/ to hosting
Architectural patterns/design principles present
• Component-driven UI (React): composition of independent UI modules.
• Separation of concerns by folder:
• components/Sections/* = feature/section modules
• components/UI/* = reusable UI primitives/widgets
• Static-first architecture:
• Most content served from CDN, minimal backend footprint.
• Optional serverless backend:
• A single-purpose function for contact (keeps site fast and secure vs embedding secrets client-side).
• 3D rendering boundary:
• React manages DOM; Three.js manages canvas/WebGL. This is a key architectural seam worth drawing.
“As many components as possible” without overthinking it
• primary responsibility (1 line)
• key dependencies (e.g., ThreeScene → Three.js; Contact → fetch/api)
• key assets (images/logos)
• where it runs (Browser vs Serverless)