How bryan-cheong/bryan-portfolio works
Project Type and Purpose
• This is a frontend-focused, component-based web application built with SvelteKit (initialized via the sv CLI).
• Its purpose is to render a personal portfolio/resume site, with pages like About, Experience, Education, Projects, and static assets (e.g., CV PDF, images).
File Structure
• Top-level files and dirs:
• package.json, npmrc, eslint.config.js, svelte.config.js, vite.config.js – define dependencies, linting, build and server configuration.
• src/ – the heart of the application:
– src/routes/ – SvelteKit filesystem-based router:
• +layout.svelte / +layout.js define shared layout and load-logic.
• +page.svelte – the home page entry point.
– src/components/ – reusable UI components (Header, Footer, TitleSection, EducationList, etc.).
– src/lib/ – utility modules or shared code.
– src/app.html and src/app.css – HTML template and global CSS.
• static/ – assets served as-is (PDFs, images, project attachments).
• Build and Dev Tools:
• Vite dev server (npm run dev) for HMR.
• SvelteKit’s adapter and prerender pipeline (npm run build).
README for Additional Insights
• Confirms it’s scaffolded with npx sv create.
• Standard dev/build/preview scripts pointing at SvelteKit + Vite.
• Mentions adapters for deployment targets (e.g., static-site hosting or serverless).
a. Main Components
• Developer Machine
– IDE, Git, CLI tools (sv, Node.js, npm/yarn)
– Vite Dev Server
– SvelteKit Compiler/Builder
• Application Layers
– Router Layer (src/routes) – maps URLs to Svelte pages
– UI Components (src/components)
– Data/Utils (src/lib)
• Build Output
– Static HTML/CSS/JS bundles
– Prerendered pages (if configured)
• Static Assets
– PDFs, images under static/assets
• Hosting Environment
– CDN or Static-Site Host (e.g., Vercel, Netlify)
– (Optionally) Serverless Functions or Node server if SSR adapter used
• Client (Browser)
b. Relationships & Interactions
– Developer invokes npm run dev → Vite serves unbundled modules + HMR
– On build: SvelteKit compiles .svelte components → JS/CSS bundles + prerendered HTML
– Hosting serves static files + bundles to the browser
– Browser requests / → CDN/host returns HTML → loads JS/CSS → hydrates into a SPA
– Internal navigation uses client-side router to swap pages and fetch assets on-demand
c. Architectural Patterns & Design Principles
– Component-Based Architecture (reusable Svelte components)
– File-based Routing (SvelteKit convention)
– Static-Site Generation / Prerendering (for optimal performance/SEO)
– Separation of Concerns: UI, routing, data/utils, static assets
d. Key Technologies, Frameworks, Libraries
– SvelteKit (SSR/SSG framework)
– Vite (dev server, bundler)
– Node.js (build tool runtime)
– npm/Yarn (dependency manager)