How greg-chang/personal-site works
Project type and purpose
• This is a Next.js personal portfolio site (full-stack but frontend-heavy), built with the “app” directory (Next.js 13+) and deployed on Vercel.
• It serves static content (resume PDF, images, markdown-based experience posts) plus a minimal backend API for the contact form.
File structure
• Top-level configs: eslint.config.mjs, jsconfig.json, next.config.mjs, tailwind.config.js, postcss.config.mjs – define linting, TS path aliases, Next.js behavior, and CSS pipeline.
• public/ – static assets (Resume PDF, fonts, images for experiences & projects).
• src/app/ – “app router” pages and components:
• page.js & layout.js: root page and layout (SSR + streaming support).
• app/api/contact/route.js: serverless function handling contact form POSTs.
• Components under app/components/ – header, ExperiencePopup, experience, projects.
• app/content/experiences/*.md – markdown sources for experiences.
README for additional insights
• Standard Create-Next-App boilerplate.
• Deploys on Vercel, auto-optimizes fonts with next/font.
• No extra services documented, implying a purely Vercel-hosted solution with optional external email or form-processing integration.
a. Main components
• Client (Browser)
• Next.js Frontend (React + SSR)
• Static Assets/CDN (Vercel’s Edge CDN)
• Serverless API (contact route)
• (Optional) External Service – e.g. email provider or database for form submissions
b. Relationships & interactions
1. Browser requests page → hits Vercel Edge CDN → cached static HTML/CSS/JS or triggers SSR.
2. Browser fetches static assets (PDF, fonts, images) from public/ via CDN.
3. On “Contact” submit, Browser POSTs to /api/contact → invokes serverless function (route.js).
4. Serverless function processes data → optionally calls external email or storage service → responds to client.
c. Architectural patterns & design principles
• App-directory Routing (file-based routing + server components)
• Serverless Functions (per-route lambdas)
• Static vs. Dynamic rendering (SSG for content pages, SSR/Edge for dynamic)
• CSS Utility-First (TailwindCSS)
d. Key technologies & frameworks
• Next.js 13+ (React, SSR, app router)
• Vercel (hosting + CDN + Functions)
• Tailwind CSS + PostCSS
• Markdown processing for content (MDX or custom loader)
Essential elements to capture
• Separation of concerns: UI, data/content, backend logic
• Data flow (request/response paths)
• Caching layers (Edge CDN vs. serverless)
• Any third-party integrations (email, analytics, forms)