How pratyush1712/personal-website works
1. This is a mostly static personal-portfolio site built with Next.js 14 App Router and TypeScript. The architecture is centered on route-driven UI composition, with content coming from files in the repo rather than a database.
2. The main application routes live under src/app: a landing page at /, specialized pages at /brain, /founders, and /github, plus a dynamic content route at /[slug]. The app also exposes standard metadata routes like robots.txt, sitemap.ts, and manifest.ts, which indicates a deployment-oriented web app optimized for discoverability and PWA/browser metadata.
3. The biggest boundary in the app is between presentation and content. Long-form resume-style content is stored as markdown in public/readmes/*.md, and the resume itself is shipped as public/resume.pdf with source public/resume.tex. The src/app/[slug]/page.tsx route is the likely renderer that maps slugs to those markdown documents through src/utils/pages.ts.
4. Markdown rendering is isolated into src/components/Markdown, which suggests a reusable content-rendering layer with custom icon support. This keeps content pages separate from the site’s themed shell and allows multiple markdown-backed pages to share the same rendering pipeline.
5. The home page is a distinct subsystem implemented under src/components/HomeLayout. It appears to emulate a VSCode-like shell and also borrows Apple Watch/playlist visual motifs. Components like Sidebar, AppTree, Play, PlayList, AppButtons, and Footer indicate a composite dashboard-style landing experience rather than a simple hero page.
6. Home-page dynamic media is backed by src/utils/songs.json, and the repository includes a dedicated spotify/ Python folder plus a GitHub Actions workflow named update_songs.yml. That implies a content-refresh pipeline where a Python script pulls or transforms Spotify data into JSON, and the React UI consumes that JSON to render playlist bubbles or similar music-driven UI.
7. The “brain” section is another presentation silo under src/components/BrainLayout, with focused components such as Alexithymia, Autism, and Experience. This suggests the site has a separate narrative or interactive storytelling area with its own layout and content modules, distinct from the resume-style markdown pages.
8. There is a small server-side boundary at src/app/api/contact/route.ts. This is the only explicit API route in the tree and likely handles form submission or email dispatch. The src/ui/Email.tsx component indicates the API probably renders or packages email content using a shared template layer.
9. Shared UI primitives live in src/ui and cross-cutting utilities in src/utils. Theme, Loading, Image, HomePageCaption, and links.tsx imply the site’s navigation, theming, and visual assets are centralized so multiple route groups can share the same design system.
10. Static assets are served from public/, including icons, markdown content, privacy text for a browser extension, and the resume. This makes the app heavily file-backed and easy to deploy on Vercel without external content storage or a database.
11. Tooling and workflow are lightweight but production-oriented: ESLint, Prettier, Husky pre-commit hooks, and GitHub Actions for CI. The repo is structured for automated checks and content refreshes, not for runtime-heavy backend infrastructure.
12. Overall, the architecture is: file-backed content and generated data on the left, Next.js route/component rendering in the middle, and a small contact/email API plus a scheduled Spotify data-update pipeline on the right. Most of the site’s complexity is in front-end composition and content organization, not in stateful backend services.
Main entry points: layout.tsx App shell · Layout.tsx Home layout · page.tsx Slug pages · Markdown.tsx Markdown renderer
Components 24
Next.js routes
Route-driven application entry points and metadata endpoints.
- App shell · Global app wrapper and metadata/theme wiring.
src/app/layout.tsx - Home · Landing page route for the portfolio experience.
src/app/page.tsx - Brain · Specialized narrative or storytelling page.
src/app/brain/page.tsx - Founders · Dedicated route for founders content.
src/app/founders/page.tsx - GitHub · Dedicated route for GitHub-related content.
src/app/github/page.tsx - Slug pages · Markdown-backed content pages resolved by slug.
src/app/[slug]/page.tsx - Contact API · Server endpoint for contact or email submission.
src/app/api/contact/route.ts - Metadata · robots, sitemap, and manifest endpoints for discoverability and PWA support.
src/app/robots.txt
File-backed content
Markdown, resume, and static assets used as site content.
- Readmes · Resume-style markdown documents used by dynamic content pages.
public/readmes/overview.md - Resume files · PDF and TeX source for the shipped resume.
public/resume.pdf - Static assets · Icons and extension privacy document served directly from public/.
public/icons
UI layers
Reusable presentation shells, sections, and shared primitives.
- Home layout · VSCode-like landing page composition.
src/components/HomeLayout/Layout.tsx - Brain layout · Brain section presentation modules.
src/components/BrainLayout/Experience.tsx - Markdown renderer · Reusable markdown rendering pipeline with custom icon support.
src/components/Markdown/Markdown.tsx - Email template · Shared email formatting for contact flows.
src/ui/Email.tsx - Shared UI · Theme, loading, image, and caption components used across routes.
src/ui/Theme.tsx - Home parts · Sidebar, tree, playlist, playback, and footer widgets for the home shell.
src/components/HomeLayout/Sidebar.tsx - Brain parts · Alexithymia, autism, and experience content modules.
src/components/BrainLayout/Alexithymia.tsx
Automation
Content refresh and delivery pipelines outside the main app runtime.
- Spotify pipeline · Scripts that generate or update songs JSON for the home UI.
spotify/index.py - CI workflows · Build, lint, and content update automation.
.github/workflows/ci.yml
Shared utilities
Cross-cutting helpers, navigation data, and rendering support.
- Page map · Slug-to-content mapping for markdown-backed pages.
src/utils/pages.ts - Links data · Shared outbound and internal link definitions.
src/utils/links.tsx - Songs data · Playlist data consumed by the home page media UI.
src/utils/songs.json - Tooling · Linting, formatting, and package configuration for the app.
package.json
Connections 24
- App shell → Home: renders · Global layout wraps the landing page.
- App shell → Brain: renders · Global layout wraps the brain page.
- App shell → Founders: renders · Global layout wraps the founders page.
- App shell → GitHub: renders · Global layout wraps the GitHub page.
- App shell → Slug pages: renders · Global layout wraps dynamic content pages.
- Home → Home layout: uses · Landing page is composed from the home shell.
- Brain → Brain layout: uses · Brain page is composed from the brain section modules.
- Slug pages → Markdown renderer: uses · Dynamic content pages render markdown through the shared renderer.
- Slug pages → Page map: resolves · Slug route maps URL segments to content files.
- Page map → Readmes: points to · Route mapping targets markdown documents under public/readmes.
- Home layout → Home parts: composes · Home shell assembles sidebar, playlist, and footer widgets.
- Home layout → Songs data: consumes · Playlist UI is driven by song metadata.
- Home layout → Shared UI: shares · Home shell reuses common UI primitives.
- Brain layout → Brain parts: composes · Brain section is built from focused narrative modules.
- Markdown renderer → Static assets: uses · Markdown content can embed or reference static icons/assets.
- Contact API → Email template: formats · Contact endpoint packages outgoing email content.
- Contact API → Shared UI: shares · API-adjacent UI uses the shared component layer.
- Spotify pipeline → Songs data: updates · Python refresh pipeline generates the songs JSON consumed by the home UI.
- CI workflows → Tooling: enforces · Automation runs repository checks and build conventions.
- CI workflows → Spotify pipeline: runs · Workflow can refresh content data through the Spotify scripts.
- Founders → Markdown renderer: uses · Section pages likely reuse shared content rendering.
- GitHub → Links data: uses · GitHub page likely consumes shared navigation/link metadata.
- Metadata → Static assets: publishes · Metadata and public assets support discoverability and browser integration.
- Readmes → Resume files: complements · Markdown pages sit alongside downloadable resume artifacts.