# leelakrishna-r/krishnar.xyz architecture

> Architecture diagram of the GitHub repository leelakrishna-r/krishnar.xyz, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/leelakrishna-r/krishnar.xyz
- Repository: https://github.com/leelakrishna-r/krishnar.xyz

## Overview

krishnar.xyz is a personal portfolio and writing site built with the Next.js App Router. Visitors browse the home scroll-story, project listings and case-study pages, alongside homelab, about, blog, resume and contact pages. Server-rendered pages combine content modules with cached live profile/community data; the contact form sends through Resend. The graph preserves documented capabilities even where their implementation was not sampled; those links are cited to the README rather than implying source inspection.

Main entry points: [`lib/live.js`](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/live.js) (Cached live data), [`app/page.js`](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/page.js) (Home story), [`app/about/page.js`](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/about/page.js) (About page), [`app/homelab/page.js`](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/homelab/page.js) (Homelab page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routes["Page routes"]
  node_home["Home story<br/>[page.js]"]
  node_worklist["Work listing<br/>[page.js]"]
  node_projectpage["Project detail<br/>[page.js]"]
  node_about["About page<br/>[page.js]"]
  node_homelab["Homelab page<br/>[page.js]"]
  node_bloglist["Writing index<br/>[page.js]"]
  node_blogpost["Blog post<br/>[page.js]"]
  node_resumehtml["Resume page<br/>[page.js]"]
  node_resumetxt["Text resume<br/>[route.js]"]
  node_contactpage["Contact page<br/>[page.js]"]
  node_contactform["Contact form<br/>[ContactForm.jsx]"]
  node_contactapi["Contact endpoint<br/>[route.js]"]
end

subgraph group_content["Content and data"]
  node_projectsdata["Project catalog<br/>[projects.js]"]
  node_postsdata["Blog posts<br/>[posts.js]"]
  node_resumedata["Resume content<br/>[resume.js]"]
  node_labdata["Homelab content<br/>[lab.js]"]
  node_timeline["About timeline<br/>[timeline.js]"]
  node_siteconfig["Site identity<br/>[site.js]"]
end

subgraph group_ui["Presentation components"]
  node_story["Scroll story<br/>[Story.jsx]"]
  node_storyrail["Story rail<br/>[StoryRail.jsx]"]
  node_pagehead["Page heading<br/>[PageHead.jsx]"]
  node_chibi["Chibi illustration<br/>[Chibi.jsx]"]
  node_gpuviewer["GPU viewer<br/>[viewer.js]"]
  node_icons["Inline icons<br/>[Icons.jsx]"]
end

subgraph group_services["Live services"]
  node_livedata["Cached live data<br/>[live.js]"]
end

node_visitor(("Site visitor"))
node_github["GitHub APIs"]
node_discord["Discord invite API"]
node_resend["Resend"]

node_visitor -->|"opens"| node_home
node_visitor -.->|"browses"| node_worklist
node_visitor -.->|"browses"| node_homelab
node_visitor -.->|"browses"| node_bloglist
node_visitor -.->|"browses"| node_about
node_visitor -.->|"views"| node_resumehtml
node_visitor -.->|"opens"| node_contactpage
node_home -->|"renders"| node_story
node_home -->|"fetches community"| node_livedata
node_home -->|"reads profile"| node_siteconfig
node_story -->|"renders"| node_storyrail
node_story -->|"renders"| node_chibi
node_worklist -->|"lists projects"| node_projectsdata
node_projectpage -->|"loads project"| node_projectsdata
node_projectpage -->|"fetches community"| node_livedata
node_projectpage -->|"renders"| node_pagehead
node_bloglist -->|"lists posts"| node_postsdata
node_blogpost -->|"loads post"| node_postsdata
node_about -->|"reads timeline"| node_timeline
node_about -->|"fetches GitHub data"| node_livedata
node_homelab -->|"reads details"| node_labdata
node_homelab -->|"reads live counts"| node_livedata
node_resumehtml -->|"renders resume"| node_resumedata
node_resumetxt -->|"formats text"| node_resumedata
node_contactpage -->|"renders"| node_contactform
node_contactform -.->|"submits message"| node_contactapi
node_contactapi -.->|"sends email"| node_resend
node_livedata -.->|"fetches profile data"| node_github
node_livedata -.->|"fetches counts"| node_discord
node_pagehead -->|"renders"| node_chibi
node_about -->|"renders"| node_pagehead
node_homelab -->|"renders"| node_pagehead
node_contactform -->|"uses icons"| node_icons
node_story -.->|"embeds GPU scene"| node_gpuviewer

click node_home "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/page.js"
click node_worklist "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/work/page.js"
click node_projectpage "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/work/%5Bslug%5D/page.js"
click node_about "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/about/page.js"
click node_homelab "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/homelab/page.js"
click node_bloglist "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/blog/page.js"
click node_blogpost "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/blog/%5Bslug%5D/page.js"
click node_resumehtml "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/resume/page.js"
click node_resumetxt "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/resume.txt/route.js"
click node_contactpage "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/contact/page.js"
click node_contactform "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/contact/ContactForm.jsx"
click node_contactapi "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/api/contact/route.js"
click node_story "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/components/story/Story.jsx"
click node_storyrail "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/components/story/StoryRail.jsx"
click node_pagehead "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/components/PageHead.jsx"
click node_chibi "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/components/Chibi.jsx"
click node_gpuviewer "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/components/gpu/viewer.js"
click node_icons "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/components/Icons.jsx"
click node_projectsdata "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/projects.js"
click node_postsdata "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/posts.js"
click node_resumedata "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/resume.js"
click node_labdata "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/lab.js"
click node_timeline "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/timeline.js"
click node_siteconfig "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/site.js"
click node_livedata "https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/live.js"

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_home,node_worklist,node_projectpage,node_about,node_homelab,node_bloglist,node_blogpost,node_resumehtml,node_resumetxt,node_contactpage,node_contactform,node_contactapi toneBlue
class node_projectsdata,node_postsdata,node_resumedata,node_labdata,node_timeline,node_siteconfig toneAmber
class node_story,node_storyrail,node_pagehead,node_chibi,node_gpuviewer,node_icons,node_github,node_discord toneMint
class node_livedata toneRose
class node_visitor,node_resend toneIndigo
```

## Components

### Page routes

- [Home story](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/page.js): `app/page.js`
- [Work listing](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/work/page.js): `app/work/page.js`
- [Project detail](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/work/%5Bslug%5D/page.js): `app/work/[slug]/page.js`
- [About page](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/about/page.js): `app/about/page.js`
- [Homelab page](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/homelab/page.js): `app/homelab/page.js`
- [Writing index](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/blog/page.js): `app/blog/page.js`
- [Blog post](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/blog/%5Bslug%5D/page.js): `app/blog/[slug]/page.js`
- [Resume page](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/resume/page.js): `app/resume/page.js`
- [Text resume](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/resume.txt/route.js): `app/resume.txt/route.js`
- [Contact page](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/contact/page.js): `app/contact/page.js`
- [Contact form](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/contact/ContactForm.jsx): `app/contact/ContactForm.jsx`
- [Contact endpoint](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/app/api/contact/route.js): `app/api/contact/route.js`

### Content and data

- [Project catalog](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/projects.js): `lib/projects.js`
- [Blog posts](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/posts.js): `lib/posts.js`
- [Resume content](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/resume.js): `lib/resume.js`
- [Homelab content](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/lab.js): `lib/lab.js`
- [About timeline](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/timeline.js): `lib/timeline.js`
- [Site identity](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/site.js): `lib/site.js`

### Presentation components

- [Scroll story](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/components/story/Story.jsx): `components/story/Story.jsx`
- [Story rail](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/components/story/StoryRail.jsx): `components/story/StoryRail.jsx`
- [Page heading](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/components/PageHead.jsx): `components/PageHead.jsx`
- [Chibi illustration](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/components/Chibi.jsx): `components/Chibi.jsx`
- [GPU viewer](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/components/gpu/viewer.js): `components/gpu/viewer.js`
- [Inline icons](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/components/Icons.jsx): `components/Icons.jsx`

### Live services

- [Cached live data](https://github.com/leelakrishna-r/krishnar.xyz/blob/main/lib/live.js): `lib/live.js`

### Other components

- **Site visitor**
- **GitHub APIs**
- **Discord invite API**
- **Resend**

## Connections

- Site visitor → Home story: opens
- Site visitor → Work listing: browses
- Site visitor → Homelab page: browses
- Site visitor → Writing index: browses
- Site visitor → About page: browses
- Site visitor → Resume page: views
- Site visitor → Contact page: opens
- Home story → Scroll story: renders (evidence: `app/page.js`)
- Home story → Cached live data: fetches community (evidence: `app/page.js`)
- Home story → Site identity: reads profile (evidence: `app/page.js`)
- Scroll story → Story rail: renders (evidence: `components/story/Story.jsx`)
- Scroll story → Chibi illustration: renders (evidence: `components/story/Story.jsx`)
- Work listing → Project catalog: lists projects (evidence: `app/work/page.js`)
- Project detail → Project catalog: loads project (evidence: `app/work/[slug]/page.js`)
- Project detail → Cached live data: fetches community (evidence: `app/work/[slug]/page.js`)
- Project detail → Page heading: renders (evidence: `app/work/[slug]/page.js`)
- Writing index → Blog posts: lists posts (evidence: `app/blog/page.js`)
- Blog post → Blog posts: loads post (evidence: `app/blog/[slug]/page.js`)
- About page → About timeline: reads timeline (evidence: `app/about/page.js`)
- About page → Cached live data: fetches GitHub data (evidence: `app/about/page.js`)
- Homelab page → Homelab content: reads details (evidence: `app/homelab/page.js`)
- Homelab page → Cached live data: reads live counts (evidence: `app/homelab/page.js`)
- Resume page → Resume content: renders resume (evidence: `app/resume/page.js`)
- Text resume → Resume content: formats text (evidence: `app/resume.txt/route.js`)
- Contact page → Contact form: renders (evidence: `app/contact/page.js`)
- Contact form → Contact endpoint: submits message
- Contact endpoint → Resend: sends email
- Cached live data → GitHub APIs: fetches profile data
- Cached live data → Discord invite API: fetches counts
- Page heading → Chibi illustration: renders (evidence: `components/PageHead.jsx`)
- About page → Page heading: renders (evidence: `app/about/page.js`)
- Homelab page → Page heading: renders (evidence: `app/homelab/page.js`)
- Contact form → Inline icons: uses icons (evidence: `app/contact/ContactForm.jsx`)
- Scroll story → GPU viewer: embeds GPU scene
