# anand-chaudhary/portfolio architecture

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

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

## Overview

This repository is a **Next.js App Router portfolio site**: a mostly static, presentation-focused frontend with a small set of reusable interactive components and no visible backend/API layer.

1. **Top-level architecture**
   - The app is organized around `src/app`, so routing is file-based through Next.js pages.
   - The site is split into a few content routes: home (`/`), about (`/about`), projects (`/project`), and contacts (`/contacts`).

2. **Route and page boundaries**
   - Each route has its own `page.tsx` under `src/app/...`.
   - This suggests the app is page-driven rather than data-driven: each screen is a distinct composition of shared components and local content.
   - `src/app/layout.tsx` is the global shell that wraps all pages.

3. **Global shell and shared UI**
   - `layout.tsx` is the main integration point for global navigation, fonts, and root-level providers/effects.
   - `src/components/navbar.tsx` is likely the primary cross-page navigation element.
   - Shared visual effects such as `CursorDot`, `preLoader`, `particles`, and `marquee` are reusable across multiple pages rather than tied to one route.

4. **Presentation/components layer**
   - Most of the UI lives in `src/components`, which is a mix of custom widgets and page-level building blocks.
   - `testimonial.tsx` indicates a dedicated section for social proof/content display.
   - The presence of `marquee`, `particles`, and cursor effects shows the site emphasizes motion and visual polish as first-class architectural concerns.

5. **Reusable primitive UI layer**
   - `src/components/ui` contains low-level, likely shadcn-style primitives: `button`, `card`, `input`, `label`, `textarea`, `badge`, `accordion`, `progress`.
   - These are the design system foundation used by higher-level components and pages.
   - This separation keeps layout/content components from depending directly on raw HTML styling patterns.

6. **Styling system**
   - Styling is centered on **Tailwind CSS** with configuration in `tailwind.config.ts`, plus global styles in `src/app/globals.css`.
   - `postcss.config.mjs` and `components.json` indicate a Tailwind-centered component workflow with utility-class composition.
   - `src/lib/utils.ts` likely contains small helpers for class-name merging or UI composition.

7. **Content and assets**
   - Static assets live under `public/`, including `public/files/Resume.pdf`, which is an explicit downloadable artifact.
   - `src/assets` appears to hold imported local images/media used by components and pages.
   - The absence of a CMS, database, or server data layer implies the content is embedded in components or local asset imports.

8. **Contact surface**
   - The `/contacts` route and form primitives (`input`, `textarea`, `label`, `button`) suggest a contact section or form UI.
   - Since there are no API route files, server actions, or backend services in the tree, any contact behavior is likely limited to client-side interaction, static links, or a simple form shell.

9. **Animation and interactivity**
   - The repo strongly favors client-side presentation effects: cursor tracking, particles, loader transitions, marquee motion, and likely testimonial/section animations.
   - These effects are isolated in dedicated components so they can be mounted where needed without contaminating page structure.

10. **Technology/runtime boundary**
   - The application is a **TypeScript** Next.js app, intended to run in the browser with Node.js used for development/build.
   - It is styled and assembled at build time, then served as a deployed frontend, with Vercel called out in the README.

11. **Operational/tooling layer**
   - ESLint is configured via `eslint.config.mjs`, and the repo includes `package-lock.json`, implying standard npm-based CI/build reproducibility.
   - `.github/workflow/workflow.yaml` suggests automated workflow coverage, likely for lint/build/deploy checks.

12. **Overall data flow**
   - User enters through a page route.
   - The root layout applies shared chrome and global styles.
   - The page composes content from reusable UI primitives plus motion/effect components.
   - Static assets such as the resume PDF are served directly from `public/`.
   - There is no visible persistence tier; the site is essentially a static, component-driven portfolio frontend.

If you are drawing the architecture, the main boxes are: **App Router pages**, **global layout/navbar**, **shared visual/effect components**, **UI primitives/design system**, **static assets**, and **build/deploy tooling**.

Main entry points: [`src/app/layout.tsx`](https://github.com/anand-chaudhary/portfolio/blob/main/src/app/layout.tsx) (Root layout), [`src/components/ui/badge.tsx`](https://github.com/anand-chaudhary/portfolio/blob/main/src/components/ui/badge.tsx) (Other primitives), [`src/app/contacts/page.tsx`](https://github.com/anand-chaudhary/portfolio/blob/main/src/app/contacts/page.tsx) (Contacts page), [`src/app/page.tsx`](https://github.com/anand-chaudhary/portfolio/blob/main/src/app/page.tsx) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_app["App routes"]
  node_node_layout["Root layout<br/>Next.js shell<br/>[layout.tsx]"]
  node_node_home["Home page<br/>Route page<br/>[page.tsx]"]
  node_node_about["About page<br/>Route page<br/>[page.tsx]"]
  node_node_project["Projects page<br/>Route page<br/>[page.tsx]"]
  node_node_contacts["Contacts page<br/>Route page<br/>[page.tsx]"]
end

subgraph group_group_components["Shared components"]
  node_node_navbar["Navbar<br/>Navigation<br/>[navbar.tsx]"]
  node_node_cursor(("Cursor dot<br/>Motion effect<br/>[CursorDot.tsx]"))
  node_node_preloader["Preloader<br/>Transition effect<br/>[preLoader.tsx]"]
  node_node_particles(("Particles<br/>Background effect<br/>[particles.tsx]"))
  node_node_marquee["Marquee<br/>Scrolling effect<br/>[marquee.tsx]"]
  node_node_testimonial["Testimonial<br/>Content section<br/>[testimonial.tsx]"]
end

subgraph group_group_ui["UI primitives"]
  node_node_ui_button["Button<br/>Primitive<br/>[button.tsx]"]
  node_node_ui_input["Input<br/>Primitive<br/>[input.tsx]"]
  node_node_ui_textarea["Textarea<br/>Primitive<br/>[textarea.tsx]"]
  node_node_ui_card["Card<br/>Primitive<br/>[card.tsx]"]
  node_node_ui_misc["Other primitives<br/>Primitive set<br/>[badge.tsx]"]
  node_node_utils["Utils<br/>Helper<br/>[utils.ts]"]
end

subgraph group_group_assets["Static assets"]
  node_node_resume["Resume PDF<br/>Public asset<br/>[Resume.pdf]"]
  node_node_src_assets["Source assets<br/>Media assets"]
end

subgraph group_group_tooling["Tooling"]
  node_node_tailwind["Tailwind config<br/>Styling config<br/>[tailwind.config.ts]"]
  node_node_globals["Global styles<br/>Stylesheet<br/>[globals.css]"]
  node_node_components_json["Components config<br/>UI tooling<br/>[components.json]"]
  node_node_eslint["ESLint<br/>Lint config<br/>[eslint.config.mjs]"]
  node_node_nextconfig["Next config<br/>Framework config<br/>[next.config.ts]"]
  node_node_postcss["PostCSS<br/>Style pipeline<br/>[postcss.config.mjs]"]
  node_node_workflow["Workflow<br/>CI config<br/>[workflow.yaml]"]
end

node_node_layout -->|"includes"| node_node_navbar
node_node_layout -->|"wraps"| node_node_home
node_node_layout -->|"wraps"| node_node_about
node_node_layout -->|"wraps"| node_node_project
node_node_layout -->|"wraps"| node_node_contacts
node_node_home -->|"uses"| node_node_marquee
node_node_home -->|"uses"| node_node_particles
node_node_home -->|"uses"| node_node_preloader
node_node_about -->|"uses"| node_node_testimonial
node_node_project -->|"uses"| node_node_marquee
node_node_contacts -->|"uses"| node_node_ui_input
node_node_contacts -->|"uses"| node_node_ui_textarea
node_node_contacts -->|"uses"| node_node_ui_button
node_node_contacts -->|"uses"| node_node_ui_card
node_node_navbar -->|"uses"| node_node_ui_button
node_node_testimonial -->|"uses"| node_node_ui_card
node_node_ui_misc -.->|"groups"| node_node_ui_button
node_node_ui_misc -.->|"groups"| node_node_ui_input
node_node_ui_misc -.->|"groups"| node_node_ui_textarea
node_node_ui_misc -.->|"groups"| node_node_ui_card
node_node_ui_misc -->|"supports"| node_node_utils
node_node_layout -->|"loads"| node_node_globals
node_node_layout -->|"styled by"| node_node_tailwind
node_node_globals -->|"extends"| node_node_tailwind
node_node_components_json -->|"configures"| node_node_ui_misc
node_node_workflow -.->|"checks"| node_node_eslint
node_node_workflow -.->|"builds"| node_node_nextconfig
node_node_workflow -.->|"styles"| node_node_tailwind
node_node_resume -->|"linked from"| node_node_contacts
node_node_src_assets -->|"supplies"| node_node_home
node_node_src_assets -->|"supplies"| node_node_about
node_node_src_assets -->|"supplies"| node_node_project
node_node_src_assets -->|"supplies"| node_node_testimonial

click node_node_layout "https://github.com/anand-chaudhary/portfolio/blob/main/src/app/layout.tsx"
click node_node_home "https://github.com/anand-chaudhary/portfolio/blob/main/src/app/page.tsx"
click node_node_about "https://github.com/anand-chaudhary/portfolio/blob/main/src/app/about/page.tsx"
click node_node_project "https://github.com/anand-chaudhary/portfolio/blob/main/src/app/project/page.tsx"
click node_node_contacts "https://github.com/anand-chaudhary/portfolio/blob/main/src/app/contacts/page.tsx"
click node_node_navbar "https://github.com/anand-chaudhary/portfolio/blob/main/src/components/navbar.tsx"
click node_node_cursor "https://github.com/anand-chaudhary/portfolio/blob/main/src/components/CursorDot.tsx"
click node_node_preloader "https://github.com/anand-chaudhary/portfolio/blob/main/src/components/preLoader.tsx"
click node_node_particles "https://github.com/anand-chaudhary/portfolio/blob/main/src/components/particles.tsx"
click node_node_marquee "https://github.com/anand-chaudhary/portfolio/blob/main/src/components/marquee.tsx"
click node_node_testimonial "https://github.com/anand-chaudhary/portfolio/blob/main/src/components/testimonial.tsx"
click node_node_ui_button "https://github.com/anand-chaudhary/portfolio/blob/main/src/components/ui/button.tsx"
click node_node_ui_input "https://github.com/anand-chaudhary/portfolio/blob/main/src/components/ui/input.tsx"
click node_node_ui_textarea "https://github.com/anand-chaudhary/portfolio/blob/main/src/components/ui/textarea.tsx"
click node_node_ui_card "https://github.com/anand-chaudhary/portfolio/blob/main/src/components/ui/card.tsx"
click node_node_ui_misc "https://github.com/anand-chaudhary/portfolio/blob/main/src/components/ui/badge.tsx"
click node_node_utils "https://github.com/anand-chaudhary/portfolio/blob/main/src/lib/utils.ts"
click node_node_resume "https://github.com/anand-chaudhary/portfolio/blob/main/public/files/Resume.pdf"
click node_node_src_assets "https://github.com/anand-chaudhary/portfolio/tree/main/src/assets"
click node_node_tailwind "https://github.com/anand-chaudhary/portfolio/blob/main/tailwind.config.ts"
click node_node_globals "https://github.com/anand-chaudhary/portfolio/blob/main/src/app/globals.css"
click node_node_components_json "https://github.com/anand-chaudhary/portfolio/blob/main/components.json"
click node_node_eslint "https://github.com/anand-chaudhary/portfolio/blob/main/eslint.config.mjs"
click node_node_nextconfig "https://github.com/anand-chaudhary/portfolio/blob/main/next.config.ts"
click node_node_postcss "https://github.com/anand-chaudhary/portfolio/blob/main/postcss.config.mjs"
click node_node_workflow "https://github.com/anand-chaudhary/portfolio/blob/main/.github/workflow/workflow.yaml"

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_node_layout,node_node_home,node_node_about,node_node_project,node_node_contacts toneBlue
class node_node_navbar,node_node_cursor,node_node_preloader,node_node_particles,node_node_marquee,node_node_testimonial toneAmber
class node_node_ui_button,node_node_ui_input,node_node_ui_textarea,node_node_ui_card,node_node_ui_misc,node_node_utils toneMint
class node_node_resume,node_node_src_assets toneRose
class node_node_tailwind,node_node_globals,node_node_components_json,node_node_eslint,node_node_nextconfig,node_node_postcss,node_node_workflow toneIndigo
```

## Components

### App routes

Next.js App Router pages and global shell.

- [Root layout](https://github.com/anand-chaudhary/portfolio/blob/main/src/app/layout.tsx): Next.js shell · Global wrapper for the app, including shared chrome and providers. · `src/app/layout.tsx`
- [Home page](https://github.com/anand-chaudhary/portfolio/blob/main/src/app/page.tsx): Route page · Landing route composition. · `src/app/page.tsx`
- [About page](https://github.com/anand-chaudhary/portfolio/blob/main/src/app/about/page.tsx): Route page · About route composition. · `src/app/about/page.tsx`
- [Projects page](https://github.com/anand-chaudhary/portfolio/blob/main/src/app/project/page.tsx): Route page · Project listing route composition. · `src/app/project/page.tsx`
- [Contacts page](https://github.com/anand-chaudhary/portfolio/blob/main/src/app/contacts/page.tsx): Route page · Contact route composition. · `src/app/contacts/page.tsx`

### Shared components

Reusable presentation and interaction components used across routes.

- [Navbar](https://github.com/anand-chaudhary/portfolio/blob/main/src/components/navbar.tsx): Navigation · Primary cross-page navigation. · `src/components/navbar.tsx`
- [Cursor dot](https://github.com/anand-chaudhary/portfolio/blob/main/src/components/CursorDot.tsx): Motion effect · Cursor-following visual effect. · `src/components/CursorDot.tsx`
- [Preloader](https://github.com/anand-chaudhary/portfolio/blob/main/src/components/preLoader.tsx): Transition effect · Loading or intro animation layer. · `src/components/preLoader.tsx`
- [Particles](https://github.com/anand-chaudhary/portfolio/blob/main/src/components/particles.tsx): Background effect · Animated particle backdrop. · `src/components/particles.tsx`
- [Marquee](https://github.com/anand-chaudhary/portfolio/blob/main/src/components/marquee.tsx): Scrolling effect · Horizontal text or content scroller. · `src/components/marquee.tsx`
- [Testimonial](https://github.com/anand-chaudhary/portfolio/blob/main/src/components/testimonial.tsx): Content section · Social proof or featured quote block. · `src/components/testimonial.tsx`

### UI primitives

Low-level design system building blocks.

- [Button](https://github.com/anand-chaudhary/portfolio/blob/main/src/components/ui/button.tsx): Primitive · Core action control. · `src/components/ui/button.tsx`
- [Input](https://github.com/anand-chaudhary/portfolio/blob/main/src/components/ui/input.tsx): Primitive · Single-line form field. · `src/components/ui/input.tsx`
- [Textarea](https://github.com/anand-chaudhary/portfolio/blob/main/src/components/ui/textarea.tsx): Primitive · Multi-line form field. · `src/components/ui/textarea.tsx`
- [Card](https://github.com/anand-chaudhary/portfolio/blob/main/src/components/ui/card.tsx): Primitive · Surface/container primitive. · `src/components/ui/card.tsx`
- [Other primitives](https://github.com/anand-chaudhary/portfolio/blob/main/src/components/ui/badge.tsx): Primitive set · Badge, label, accordion, and progress building blocks. · `src/components/ui/badge.tsx`
- [Utils](https://github.com/anand-chaudhary/portfolio/blob/main/src/lib/utils.ts): Helper · Small class/composition utility helpers. · `src/lib/utils.ts`

### Static assets

Imported media and public downloadable files.

- [Resume PDF](https://github.com/anand-chaudhary/portfolio/blob/main/public/files/Resume.pdf): Public asset · Downloadable resume file. · `public/files/Resume.pdf`
- [Source assets](https://github.com/anand-chaudhary/portfolio/tree/main/src/assets): Media assets · Imported local images and media used by components and pages. · `src/assets`

### Tooling

Build, lint, and workflow configuration.

- [Tailwind config](https://github.com/anand-chaudhary/portfolio/blob/main/tailwind.config.ts): Styling config · Tailwind theme and utility configuration. · `tailwind.config.ts`
- [Global styles](https://github.com/anand-chaudhary/portfolio/blob/main/src/app/globals.css): Stylesheet · App-wide CSS entrypoint. · `src/app/globals.css`
- [Components config](https://github.com/anand-chaudhary/portfolio/blob/main/components.json): UI tooling · Component system configuration for the UI workflow. · `components.json`
- [ESLint](https://github.com/anand-chaudhary/portfolio/blob/main/eslint.config.mjs): Lint config · Static analysis and code quality rules. · `eslint.config.mjs`
- [Next config](https://github.com/anand-chaudhary/portfolio/blob/main/next.config.ts): Framework config · Next.js build/runtime configuration. · `next.config.ts`
- [PostCSS](https://github.com/anand-chaudhary/portfolio/blob/main/postcss.config.mjs): Style pipeline · CSS processing configuration. · `postcss.config.mjs`
- [Workflow](https://github.com/anand-chaudhary/portfolio/blob/main/.github/workflow/workflow.yaml): CI config · Automated repository workflow definition. · `.github/workflow/workflow.yaml`

## Connections

- Root layout → Navbar: includes · Global shell mounts shared navigation.
- Root layout → Home page: wraps · Layout applies to the home route.
- Root layout → About page: wraps · Layout applies to the about route.
- Root layout → Projects page: wraps · Layout applies to the projects route.
- Root layout → Contacts page: wraps · Layout applies to the contacts route.
- Home page → Marquee: uses · Home page uses motion/presentation components.
- Home page → Particles: uses · Home page uses decorative background effects.
- Home page → Preloader: uses · Home page participates in intro/loading flow.
- About page → Testimonial: uses · About page can compose social proof content.
- Projects page → Marquee: uses · Projects page uses scrolling display elements.
- Contacts page → Input: uses · Contact form uses input controls.
- Contacts page → Textarea: uses · Contact form uses textarea control.
- Contacts page → Button: uses · Contact form uses action controls.
- Contacts page → Card: uses · Contact content is framed in surface primitives.
- Navbar → Button: uses · Navigation actions rely on button primitives.
- Testimonial → Card: uses · Testimonial content is rendered in card-like surfaces.
- Other primitives → Button: groups · Represents the broader primitive set.
- Other primitives → Input: groups · Represents the broader primitive set.
- Other primitives → Textarea: groups · Represents the broader primitive set.
- Other primitives → Card: groups · Represents the broader primitive set.
- Other primitives → Utils: supports · Primitives rely on small utility helpers.
- Root layout → Global styles: loads · Root layout applies global CSS.
- Root layout → Tailwind config: styled by · Layout and pages are assembled through Tailwind config.
- Global styles → Tailwind config: extends · Global CSS participates in the Tailwind pipeline.
- Components config → Other primitives: configures · Component workflow config supports the UI primitives.
- Workflow → ESLint: checks · Automated workflow likely runs linting.
- Workflow → Next config: builds · Workflow covers framework build/runtime checks.
- Workflow → Tailwind config: styles · Workflow supports the styled frontend build.
- Resume PDF → Contacts page: linked from · Public resume artifact is surfaced from the site.
- Source assets → Home page: supplies · Imported media supports page compositions.
- Source assets → About page: supplies · Imported media supports page compositions.
- Source assets → Projects page: supplies · Imported media supports page compositions.
- Source assets → Testimonial: supplies · Imported media supports page compositions.
