# pratyush1712/personal-website architecture

> Architecture diagram of the GitHub repository pratyush1712/personal-website, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pratyush1712/personal-website
- Repository: https://github.com/pratyush1712/personal-website

## Overview

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: [`src/app/layout.tsx`](https://github.com/pratyush1712/personal-website/blob/master/src/app/layout.tsx) (App shell), [`src/components/HomeLayout/Layout.tsx`](https://github.com/pratyush1712/personal-website/blob/master/src/components/HomeLayout/Layout.tsx) (Home layout), [`src/app/[slug]/page.tsx`](https://github.com/pratyush1712/personal-website/blob/master/src/app/[slug]/page.tsx) (Slug pages), [`src/components/Markdown/Markdown.tsx`](https://github.com/pratyush1712/personal-website/blob/master/src/components/Markdown/Markdown.tsx) (Markdown renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routes["Next.js routes"]
  node_app_shell["App shell<br/>Next.js root layout<br/>[layout.tsx]"]
  node_home_route["Home<br/>Route page<br/>[page.tsx]"]
  node_brain_route["Brain<br/>Route page<br/>[page.tsx]"]
  node_founders_route["Founders<br/>Route page<br/>[page.tsx]"]
  node_github_route["GitHub<br/>Route page<br/>[page.tsx]"]
  node_slug_route["Slug pages<br/>Dynamic route<br/>[page.tsx]"]
  node_contact_api["Contact API<br/>API route<br/>[route.ts]"]
  node_metadata_routes["Metadata<br/>[robots.txt]"]
end

subgraph group_content["File-backed content"]
  node_content_md["Readmes<br/>Markdown content<br/>[overview.md]"]
  node_resume_files["Resume files<br/>Static resume<br/>[resume.pdf]"]
  node_static_assets["Static assets<br/>Public assets"]
end

subgraph group_ui["UI layers"]
  node_home_layout["Home layout<br/>Presentation shell<br/>[Layout.tsx]"]
  node_brain_layout["Brain layout<br/>Section components<br/>[Experience.tsx]"]
  node_markdown_renderer["Markdown renderer<br/>Content renderer<br/>[Markdown.tsx]"]
  node_email_template["Email template<br/>UI template<br/>[Email.tsx]"]
  node_shared_ui["Shared UI<br/>Primitives<br/>[Theme.tsx]"]
  node_home_parts["Home parts<br/>Composed widgets<br/>[Sidebar.tsx]"]
  node_brain_parts["Brain parts<br/>Story modules<br/>[Alexithymia.tsx]"]
end

subgraph group_automation["Automation"]
  node_spotify_pipeline["Spotify pipeline<br/>Python refresh<br/>[index.py]"]
  node_ci_workflows["CI workflows<br/>GitHub Actions<br/>[ci.yml]"]
end

subgraph group_shared["Shared utilities"]
  node_page_map["Page map<br/>Route mapping<br/>[pages.ts]"]
  node_links_data["Links data<br/>Navigation config<br/>[links.tsx]"]
  node_songs_data["Songs data<br/>JSON content<br/>[songs.json]"]
  node_repo_tooling["Tooling<br/>Repo config<br/>[package.json]"]
end

node_app_shell -->|"renders"| node_home_route
node_app_shell -->|"renders"| node_brain_route
node_app_shell -->|"renders"| node_founders_route
node_app_shell -->|"renders"| node_github_route
node_app_shell -->|"renders"| node_slug_route
node_home_route -->|"uses"| node_home_layout
node_brain_route -->|"uses"| node_brain_layout
node_slug_route -->|"uses"| node_markdown_renderer
node_slug_route -->|"resolves"| node_page_map
node_page_map -->|"points to"| node_content_md
node_home_layout -->|"composes"| node_home_parts
node_home_layout -->|"consumes"| node_songs_data
node_home_layout -->|"shares"| node_shared_ui
node_brain_layout -->|"composes"| node_brain_parts
node_markdown_renderer -->|"uses"| node_static_assets
node_contact_api -->|"formats"| node_email_template
node_contact_api -.->|"shares"| node_shared_ui
node_spotify_pipeline -->|"updates"| node_songs_data
node_ci_workflows -->|"enforces"| node_repo_tooling
node_ci_workflows -.->|"runs"| node_spotify_pipeline
node_founders_route -.->|"uses"| node_markdown_renderer
node_github_route -.->|"uses"| node_links_data
node_metadata_routes -->|"publishes"| node_static_assets
node_content_md -.->|"complements"| node_resume_files

click node_app_shell "https://github.com/pratyush1712/personal-website/blob/master/src/app/layout.tsx"
click node_home_route "https://github.com/pratyush1712/personal-website/blob/master/src/app/page.tsx"
click node_brain_route "https://github.com/pratyush1712/personal-website/blob/master/src/app/brain/page.tsx"
click node_founders_route "https://github.com/pratyush1712/personal-website/blob/master/src/app/founders/page.tsx"
click node_github_route "https://github.com/pratyush1712/personal-website/blob/master/src/app/github/page.tsx"
click node_slug_route "https://github.com/pratyush1712/personal-website/blob/master/src/app/[slug]/page.tsx"
click node_contact_api "https://github.com/pratyush1712/personal-website/blob/master/src/app/api/contact/route.ts"
click node_metadata_routes "https://github.com/pratyush1712/personal-website/blob/master/src/app/robots.txt"
click node_home_layout "https://github.com/pratyush1712/personal-website/blob/master/src/components/HomeLayout/Layout.tsx"
click node_brain_layout "https://github.com/pratyush1712/personal-website/blob/master/src/components/BrainLayout/Experience.tsx"
click node_markdown_renderer "https://github.com/pratyush1712/personal-website/blob/master/src/components/Markdown/Markdown.tsx"
click node_email_template "https://github.com/pratyush1712/personal-website/blob/master/src/ui/Email.tsx"
click node_shared_ui "https://github.com/pratyush1712/personal-website/blob/master/src/ui/Theme.tsx"
click node_home_parts "https://github.com/pratyush1712/personal-website/blob/master/src/components/HomeLayout/Sidebar.tsx"
click node_brain_parts "https://github.com/pratyush1712/personal-website/blob/master/src/components/BrainLayout/Alexithymia.tsx"
click node_page_map "https://github.com/pratyush1712/personal-website/blob/master/src/utils/pages.ts"
click node_links_data "https://github.com/pratyush1712/personal-website/blob/master/src/utils/links.tsx"
click node_songs_data "https://github.com/pratyush1712/personal-website/blob/master/src/utils/songs.json"
click node_content_md "https://github.com/pratyush1712/personal-website/blob/master/public/readmes/overview.md"
click node_resume_files "https://github.com/pratyush1712/personal-website/blob/master/public/resume.pdf"
click node_static_assets "https://github.com/pratyush1712/personal-website/tree/master/public/icons"
click node_spotify_pipeline "https://github.com/pratyush1712/personal-website/blob/master/spotify/index.py"
click node_ci_workflows "https://github.com/pratyush1712/personal-website/blob/master/.github/workflows/ci.yml"
click node_repo_tooling "https://github.com/pratyush1712/personal-website/blob/master/package.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app_shell,node_home_route,node_brain_route,node_founders_route,node_github_route,node_slug_route,node_contact_api,node_metadata_routes toneBlue
class node_content_md,node_resume_files,node_static_assets toneAmber
class node_home_layout,node_brain_layout,node_markdown_renderer,node_email_template,node_shared_ui,node_home_parts,node_brain_parts toneMint
class node_spotify_pipeline,node_ci_workflows toneRose
class node_page_map,node_links_data,node_songs_data,node_repo_tooling toneIndigo
```

## Components

### Next.js routes

Route-driven application entry points and metadata endpoints.

- [App shell](https://github.com/pratyush1712/personal-website/blob/master/src/app/layout.tsx): Next.js root layout · Global app wrapper and metadata/theme wiring. · `src/app/layout.tsx`
- [Home](https://github.com/pratyush1712/personal-website/blob/master/src/app/page.tsx): Route page · Landing page route for the portfolio experience. · `src/app/page.tsx`
- [Brain](https://github.com/pratyush1712/personal-website/blob/master/src/app/brain/page.tsx): Route page · Specialized narrative or storytelling page. · `src/app/brain/page.tsx`
- [Founders](https://github.com/pratyush1712/personal-website/blob/master/src/app/founders/page.tsx): Route page · Dedicated route for founders content. · `src/app/founders/page.tsx`
- [GitHub](https://github.com/pratyush1712/personal-website/blob/master/src/app/github/page.tsx): Route page · Dedicated route for GitHub-related content. · `src/app/github/page.tsx`
- [Slug pages](https://github.com/pratyush1712/personal-website/blob/master/src/app/[slug]/page.tsx): Dynamic route · Markdown-backed content pages resolved by slug. · `src/app/[slug]/page.tsx`
- [Contact API](https://github.com/pratyush1712/personal-website/blob/master/src/app/api/contact/route.ts): API route · Server endpoint for contact or email submission. · `src/app/api/contact/route.ts`
- [Metadata](https://github.com/pratyush1712/personal-website/blob/master/src/app/robots.txt): App 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](https://github.com/pratyush1712/personal-website/blob/master/public/readmes/overview.md): Markdown content · Resume-style markdown documents used by dynamic content pages. · `public/readmes/overview.md`
- [Resume files](https://github.com/pratyush1712/personal-website/blob/master/public/resume.pdf): Static resume · PDF and TeX source for the shipped resume. · `public/resume.pdf`
- [Static assets](https://github.com/pratyush1712/personal-website/tree/master/public/icons): Public assets · Icons and extension privacy document served directly from public/. · `public/icons`

### UI layers

Reusable presentation shells, sections, and shared primitives.

- [Home layout](https://github.com/pratyush1712/personal-website/blob/master/src/components/HomeLayout/Layout.tsx): Presentation shell · VSCode-like landing page composition. · `src/components/HomeLayout/Layout.tsx`
- [Brain layout](https://github.com/pratyush1712/personal-website/blob/master/src/components/BrainLayout/Experience.tsx): Section components · Brain section presentation modules. · `src/components/BrainLayout/Experience.tsx`
- [Markdown renderer](https://github.com/pratyush1712/personal-website/blob/master/src/components/Markdown/Markdown.tsx): Content renderer · Reusable markdown rendering pipeline with custom icon support. · `src/components/Markdown/Markdown.tsx`
- [Email template](https://github.com/pratyush1712/personal-website/blob/master/src/ui/Email.tsx): UI template · Shared email formatting for contact flows. · `src/ui/Email.tsx`
- [Shared UI](https://github.com/pratyush1712/personal-website/blob/master/src/ui/Theme.tsx): Primitives · Theme, loading, image, and caption components used across routes. · `src/ui/Theme.tsx`
- [Home parts](https://github.com/pratyush1712/personal-website/blob/master/src/components/HomeLayout/Sidebar.tsx): Composed widgets · Sidebar, tree, playlist, playback, and footer widgets for the home shell. · `src/components/HomeLayout/Sidebar.tsx`
- [Brain parts](https://github.com/pratyush1712/personal-website/blob/master/src/components/BrainLayout/Alexithymia.tsx): Story modules · Alexithymia, autism, and experience content modules. · `src/components/BrainLayout/Alexithymia.tsx`

### Automation

Content refresh and delivery pipelines outside the main app runtime.

- [Spotify pipeline](https://github.com/pratyush1712/personal-website/blob/master/spotify/index.py): Python refresh · Scripts that generate or update songs JSON for the home UI. · `spotify/index.py`
- [CI workflows](https://github.com/pratyush1712/personal-website/blob/master/.github/workflows/ci.yml): GitHub Actions · Build, lint, and content update automation. · `.github/workflows/ci.yml`

### Shared utilities

Cross-cutting helpers, navigation data, and rendering support.

- [Page map](https://github.com/pratyush1712/personal-website/blob/master/src/utils/pages.ts): Route mapping · Slug-to-content mapping for markdown-backed pages. · `src/utils/pages.ts`
- [Links data](https://github.com/pratyush1712/personal-website/blob/master/src/utils/links.tsx): Navigation config · Shared outbound and internal link definitions. · `src/utils/links.tsx`
- [Songs data](https://github.com/pratyush1712/personal-website/blob/master/src/utils/songs.json): JSON content · Playlist data consumed by the home page media UI. · `src/utils/songs.json`
- [Tooling](https://github.com/pratyush1712/personal-website/blob/master/package.json): Repo config · Linting, formatting, and package configuration for the app. · `package.json`

## Connections

- 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.
