# shrivastvaryan/portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/shrivastvaryan/portfolio
- Repository: https://github.com/shrivastvaryan/portfolio

## Overview

This is a personal portfolio and blog: visitors browse the landing page and its portfolio, experience, and about content, then can read Sanity-published blog posts or view the resume. Editors publish posts through the embedded Sanity studio; a configured webhook refreshes the blog after changes. The graph includes documented GitHub contribution activity and the main UI components. Some source was not excerpted, so uncertain implementation links are omitted rather than inferred.

Main entry points: [`src/app/page.tsx`](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/page.tsx) (Home route), [`src/sanity/lib/posts.ts`](https://github.com/shrivastvaryan/portfolio/blob/main/src/sanity/lib/posts.ts) (Post data access), [`src/app/studio/[[...tool]]/page.tsx`](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/studio/%5B%5B...tool%5D%5D/page.tsx) (Sanity studio), [`src/app/components/Home/PortfolioCaraousel.tsx`](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Home/PortfolioCaraousel.tsx) (Portfolio carousel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portfolio["Portfolio experience"]
  node_home_route["Home route<br/>[page.tsx]"]
  node_hero["Portfolio hero<br/>[page.tsx]"]
  node_carousel["Portfolio carousel"]
  node_experience["Experience section<br/>[Experience.tsx]"]
  node_tech_stack["Tech stack data<br/>[techStackData.tsx]"]
  node_about["About page<br/>[page.tsx]"]
  node_resume["Resume component<br/>[resume.tsx]"]
end

subgraph group_blog["Blog publishing"]
  node_blog_index["Blog index<br/>[page.tsx]"]
  node_blog_article["Blog article<br/>[page.tsx]"]
  node_post_queries["Post queries<br/>[queries.ts]"]
  node_post_data["Post data access<br/>[posts.ts]"]
  node_sanity_client["Sanity client<br/>[client.ts]"]
  node_image_builder["Image URL builder<br/>[image.ts]"]
  node_studio["Sanity studio<br/>[page.tsx]"]
  node_post_schema["Post schema<br/>[sanity.config.ts]"]
  node_revalidate["Revalidation endpoint<br/>[route.ts]"]
end

subgraph group_shared["Shared presentation"]
  node_footer["Site footer<br/>[Footer.tsx]"]
  node_github_activity["GitHub activity<br/>[GitHubActivity.tsx]"]
  node_scroll_reveal["Scroll reveal<br/>[ScrollReveal.tsx]"]
  node_target_cursor["Target cursor<br/>[TargetCursor.tsx]"]
  node_cursor_css["Cursor styles<br/>[TargetCursor.css]"]
  node_carousel_ui["Carousel controls<br/>[carousel.tsx]"]
  node_button["Button component<br/>[button.tsx]"]
  node_utils["Class utilities<br/>[utils.ts]"]
end

subgraph group_integrations["External integrations"]
  node_github_api["GitHub activity API<br/>[route.ts]"]
  node_sanity_service[("Sanity service")]
  node_github_service["GitHub"]
end

node_visitor(("Visitor"))
node_editor(("Content editor"))

node_visitor -->|"opens"| node_home_route
node_home_route -->|"renders"| node_hero
node_home_route -->|"renders"| node_carousel
node_home_route -->|"renders"| node_experience
node_home_route -->|"renders"| node_target_cursor
node_carousel -->|"uses data"| node_tech_stack
node_carousel -->|"uses"| node_scroll_reveal
node_visitor -->|"opens"| node_about
node_visitor -->|"opens"| node_blog_index
node_blog_index -->|"fetches posts"| node_post_data
node_blog_article -->|"fetches post"| node_post_data
node_blog_article -->|"builds image URL"| node_image_builder
node_post_data -->|"fetches content"| node_sanity_client
node_post_data -->|"uses queries"| node_post_queries
node_image_builder -->|"uses client"| node_sanity_client
node_visitor -->|"opens"| node_studio
node_studio -->|"loads config"| node_post_schema
node_editor -->|"edits posts"| node_studio
node_studio -->|"publishes posts"| node_sanity_service
node_sanity_service -->|"sends webhook"| node_revalidate
node_revalidate -->|"refreshes"| node_blog_index
node_revalidate -->|"refreshes affected"| node_blog_article
node_footer -->|"renders"| node_github_activity
node_visitor -->|"views activity"| node_github_activity
node_carousel_ui -->|"uses"| node_button
node_carousel_ui -->|"uses"| node_utils
node_button -->|"uses"| node_utils
node_target_cursor -->|"imports styles"| node_cursor_css
node_github_service -->|"provides contribution data"| node_github_activity
node_github_service -.->|"provides optional exact totals"| node_github_api

click node_home_route "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/page.tsx"
click node_hero "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Home/page.tsx"
click node_carousel "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Home/PortfolioCaraousel.tsx"
click node_experience "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Home/Experience.tsx"
click node_tech_stack "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Home/techStackData.tsx"
click node_about "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/about/page.tsx"
click node_resume "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Resume/resume.tsx"
click node_blog_index "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/blog/page.tsx"
click node_blog_article "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/blog/%5Bslug%5D/page.tsx"
click node_post_queries "https://github.com/shrivastvaryan/portfolio/blob/main/src/sanity/lib/queries.ts"
click node_post_data "https://github.com/shrivastvaryan/portfolio/blob/main/src/sanity/lib/posts.ts"
click node_sanity_client "https://github.com/shrivastvaryan/portfolio/blob/main/src/sanity/lib/client.ts"
click node_image_builder "https://github.com/shrivastvaryan/portfolio/blob/main/src/sanity/lib/image.ts"
click node_studio "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/studio/%5B%5B...tool%5D%5D/page.tsx"
click node_post_schema "https://github.com/shrivastvaryan/portfolio/blob/main/sanity.config.ts"
click node_revalidate "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/api/revalidate/route.ts"
click node_footer "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Footer/Footer.tsx"
click node_github_activity "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Footer/GitHubActivity.tsx"
click node_github_api "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/api/github-activity/route.ts"
click node_scroll_reveal "https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/ScrollReveal.tsx"
click node_target_cursor "https://github.com/shrivastvaryan/portfolio/blob/main/src/components/TargetCursor.tsx"
click node_cursor_css "https://github.com/shrivastvaryan/portfolio/blob/main/src/components/TargetCursor.css"
click node_carousel_ui "https://github.com/shrivastvaryan/portfolio/blob/main/src/components/ui/carousel.tsx"
click node_button "https://github.com/shrivastvaryan/portfolio/blob/main/src/components/ui/button.tsx"
click node_utils "https://github.com/shrivastvaryan/portfolio/blob/main/src/lib/utils.ts"

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_route,node_hero,node_carousel,node_experience,node_tech_stack,node_about,node_resume toneBlue
class node_blog_index,node_blog_article,node_post_queries,node_post_data,node_sanity_client,node_image_builder,node_studio,node_post_schema,node_revalidate toneAmber
class node_footer,node_github_activity,node_scroll_reveal,node_target_cursor,node_cursor_css,node_carousel_ui,node_button,node_utils toneMint
class node_github_api,node_sanity_service,node_github_service toneRose
class node_visitor,node_editor toneIndigo
```

## Components

### Portfolio experience

- [Home route](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Portfolio hero](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Home/page.tsx): `src/app/components/Home/page.tsx`
- [Portfolio carousel](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Home/PortfolioCaraousel.tsx): `src/app/components/Home/PortfolioCaraousel.tsx`
- [Experience section](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Home/Experience.tsx): `src/app/components/Home/Experience.tsx`
- [Tech stack data](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Home/techStackData.tsx): `src/app/components/Home/techStackData.tsx`
- [About page](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/about/page.tsx): `src/app/about/page.tsx`
- [Resume component](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Resume/resume.tsx): `src/app/components/Resume/resume.tsx`

### Blog publishing

- [Blog index](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/blog/page.tsx): `src/app/blog/page.tsx`
- [Blog article](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/blog/%5Bslug%5D/page.tsx): `src/app/blog/[slug]/page.tsx`
- [Post queries](https://github.com/shrivastvaryan/portfolio/blob/main/src/sanity/lib/queries.ts): `src/sanity/lib/queries.ts`
- [Post data access](https://github.com/shrivastvaryan/portfolio/blob/main/src/sanity/lib/posts.ts): `src/sanity/lib/posts.ts`
- [Sanity client](https://github.com/shrivastvaryan/portfolio/blob/main/src/sanity/lib/client.ts): `src/sanity/lib/client.ts`
- [Image URL builder](https://github.com/shrivastvaryan/portfolio/blob/main/src/sanity/lib/image.ts): `src/sanity/lib/image.ts`
- [Sanity studio](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/studio/%5B%5B...tool%5D%5D/page.tsx): `src/app/studio/[[...tool]]/page.tsx`
- [Post schema](https://github.com/shrivastvaryan/portfolio/blob/main/sanity.config.ts): `sanity.config.ts`
- [Revalidation endpoint](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/api/revalidate/route.ts): `src/app/api/revalidate/route.ts`

### Shared presentation

- [Site footer](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Footer/Footer.tsx): `src/app/components/Footer/Footer.tsx`
- [GitHub activity](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/Footer/GitHubActivity.tsx): `src/app/components/Footer/GitHubActivity.tsx`
- [Scroll reveal](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/components/ScrollReveal.tsx): `src/app/components/ScrollReveal.tsx`
- [Target cursor](https://github.com/shrivastvaryan/portfolio/blob/main/src/components/TargetCursor.tsx): `src/components/TargetCursor.tsx`
- [Cursor styles](https://github.com/shrivastvaryan/portfolio/blob/main/src/components/TargetCursor.css): `src/components/TargetCursor.css`
- [Carousel controls](https://github.com/shrivastvaryan/portfolio/blob/main/src/components/ui/carousel.tsx): `src/components/ui/carousel.tsx`
- [Button component](https://github.com/shrivastvaryan/portfolio/blob/main/src/components/ui/button.tsx): `src/components/ui/button.tsx`
- [Class utilities](https://github.com/shrivastvaryan/portfolio/blob/main/src/lib/utils.ts): `src/lib/utils.ts`

### External integrations

- [GitHub activity API](https://github.com/shrivastvaryan/portfolio/blob/main/src/app/api/github-activity/route.ts): `src/app/api/github-activity/route.ts`
- **Sanity service**
- **GitHub**

### Other components

- **Visitor**
- **Content editor**

## Connections

- Visitor → Home route: opens (evidence: `src/app/page.tsx`)
- Home route → Portfolio hero: renders (evidence: `src/app/page.tsx`)
- Home route → Portfolio carousel: renders (evidence: `src/app/page.tsx`)
- Home route → Experience section: renders (evidence: `src/app/page.tsx`)
- Home route → Target cursor: renders (evidence: `src/app/page.tsx`)
- Portfolio carousel → Tech stack data: uses data (evidence: `src/app/components/Home/PortfolioCaraousel.tsx`)
- Portfolio carousel → Scroll reveal: uses (evidence: `src/app/components/Home/PortfolioCaraousel.tsx`)
- Visitor → About page: opens (evidence: `src/app/about/page.tsx`)
- Visitor → Blog index: opens (evidence: `src/app/blog/page.tsx`)
- Blog index → Post data access: fetches posts (evidence: `src/app/blog/page.tsx`)
- Blog article → Post data access: fetches post (evidence: `src/app/blog/[slug]/page.tsx`)
- Blog article → Image URL builder: builds image URL (evidence: `src/app/blog/[slug]/page.tsx`)
- Post data access → Sanity client: fetches content (evidence: `src/sanity/lib/posts.ts`)
- Post data access → Post queries: uses queries (evidence: `src/sanity/lib/posts.ts`)
- Image URL builder → Sanity client: uses client (evidence: `src/sanity/lib/image.ts`)
- Visitor → Sanity studio: opens (evidence: `README.md`)
- Sanity studio → Post schema: loads config (evidence: `src/app/studio/[[...tool]]/page.tsx`)
- Content editor → Sanity studio: edits posts (evidence: `README.md`)
- Sanity studio → Sanity service: publishes posts (evidence: `README.md`)
- Sanity service → Revalidation endpoint: sends webhook (evidence: `README.md`)
- Revalidation endpoint → Blog index: refreshes (evidence: `README.md`)
- Revalidation endpoint → Blog article: refreshes affected (evidence: `README.md`)
- Site footer → GitHub activity: renders (evidence: `src/app/components/Footer/Footer.tsx`)
- Visitor → GitHub activity: views activity (evidence: `README.md`)
- Carousel controls → Button component: uses (evidence: `src/components/ui/carousel.tsx`)
- Carousel controls → Class utilities: uses (evidence: `src/components/ui/carousel.tsx`)
- Button component → Class utilities: uses (evidence: `src/components/ui/button.tsx`)
- Target cursor → Cursor styles: imports styles (evidence: `src/components/TargetCursor.tsx`)
- GitHub → GitHub activity: provides contribution data (evidence: `README.md`)
- GitHub → GitHub activity API: provides optional exact totals
