How narainkarthikv/portfolio works
What this project is (type + purpose)
This repo is a personal portfolio website that is primarily a static site:
• Primary (modern) implementation: Astro site in src/ (with components, pages, layouts, scripts) + Tailwind + TypeScript.
• Legacy implementation: a standalone static site in legacy/ (index.html, styles.css, app.js, cv.json) that the README explicitly calls out as the GitHub Pages source.
• Build-time architecture (Astro SSG + asset pipeline + CI),
• Runtime architecture (browser fetching static assets from a CDN/Pages),
• External embeds/integrations (e.g., Spotify component, sitemap/robots generation).
Runtime-facing (what ships to users)
• public/ — static assets (PDF, mp3, webmanifest).
• src/pages/ — route entrypoints:
• index.astro (home)
• blog.astro (blog page)
• robots.txt.ts and sitemap.xml.ts (generated at build time but served as static endpoints)
• src/components/ + src/components/sections/ — UI building blocks (Hero/About/Projects/etc.)
• src/layouts/Layout.astro — global shell
• src/scripts/ — client-side JS (navigation/search/main)
• src/globals.css + tailwind.config.mjs — styling system
Data/content inputs
• cv.json at repo root (and legacy/cv.json) — content source for CV/resume sections (likely loaded at build time or bundled).
• public/narainkarthik-cv.pdf and legacy/narainkarthik-cv.pdf — downloadable artifact.
“Library” / reusable logic
• src/lib/contextCursor/** — custom cursor/context interaction logic (a mini internal library with chunks/modes/types).
Build/deploy plumbing
• package.json, lockfiles — Node toolchain.
• astro.config.mjs, tsconfig.json — build configuration.
• .github/workflows/static.yml — CI/CD for GitHub Pages.
• netlify.toml, vercel.json, astro.config.vercel.mjs — alternative deployment adapters/targets.
• legacy/ — classic static HTML/CSS/JS site, and README says GH Pages serves from ./legacy/.
Shows how code becomes static assets and where they get published.
Shows browser requests to a static host/CDN + any third-party embeds.
Architectural patterns/design principles evident here
• Static Site Generation (SSG) via Astro (src/pages/*.astro)
• Componentized UI (src/components/**, src/components/sections/**)
• Separation of concerns
• Layouts (src/layouts)
• Content/data (cv.json)
• Client scripts (src/scripts)
• Reusable internal lib (src/lib/contextCursor)
• Multi-environment deployment readiness
• GitHub Pages (workflow)
• Netlify + Vercel configs present
Build & Repo (GitHub + Actions + Astro toolchain)
And a separate boundary for Legacy Site vs Astro Site (this repo has both—don’t merge them mentally).
Step 3: Populate with concrete nodes named after repo artifacts
• “Astro Pages: src/pages/index.astro, src/pages/blog.astro”
• “Generated endpoints: src/pages/sitemap.xml.ts, src/pages/robots.txt.ts”
• “UI Sections: src/components/sections/*”
• “Client Scripts: src/scripts/{main,navigation,search}.ts”
• “Internal lib: src/lib/contextCursor/*”
• “Legacy site: legacy/index.html, legacy/app.js, legacy/styles.css”
Examples:
• Browser → Static Host: “GET /index.html, /assets/*”
• Browser → Static Host: “GET /sitemap.xml, /robots.txt”
• Browser → Spotify: “Embed/requests (iframe/api)”
• GitHub → Actions: “push triggers workflow”
• Actions → Pages: “deploy artifact”