# adityacodes-root/portfolio architecture

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

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

## Overview

1. **Project type and runtime**
   - This is a **Next.js + React + TypeScript** portfolio site built as a mostly **static, client-friendly presentation app**.
   - There is no visible backend, API layer, database, or server-side domain model in the repo tree; the architecture is centered on **rendering and interaction**.

2. **Route structure**
   - The app uses the **Next.js App Router** under `app/`.
   - `app/page.tsx` is the main landing page and likely assembles the one-page portfolio sections.
   - `app/layout.tsx` provides the root shell for all pages, while `app/not-found.tsx` handles fallback routing.
   - This suggests a small route surface with a primary homepage and a custom 404.

3. **Page composition model**
   - The homepage is organized as a **section-based single-page experience**.
   - Individual content areas live in `components/sections/`: `hero`, `about`, `skills`, `experience`, `projects`, `testimonials`, and `contact`.
   - `components/section-wrapper.tsx` likely standardizes spacing, anchors, or layout behavior across these sections.

4. **Global app shell and cross-cutting UI**
   - `components/header.tsx` and `components/footer.tsx` define persistent site chrome.
   - `components/loader.tsx`, `components/cursor-wrapper.tsx`, `components/custom-cursor.tsx`, and `components/theme-fade.tsx` indicate the experience includes **global transitions and interaction polish** layered across the page.
   - These are presentation concerns, not business logic, but they shape the user flow significantly.

5. **Theme system**
   - The repo has a dedicated theme layer: `components/theme-provider.tsx` and `components/theme-toggle.tsx`.
   - The README explicitly mentions **multiple themes**; combined with `styles/theme-transitions.css`, this implies theme switching is a first-class architectural concern.
   - The theme provider likely wraps the app at the layout level so theme state is available globally.

6. **Project details interaction**
   - `components/project-modal.tsx` suggests projects can be expanded into a **modal dialog** rather than only being displayed as cards.
   - This creates a local interaction boundary: the `projects` section renders summaries, and the modal presents deeper details when a user selects an item.

7. **UI component foundation**
   - `components/ui/` is a large design-system layer built from **Radix UI primitives** and styled wrappers.
   - It includes common primitives such as dialog, dropdown, tooltip, sheet, tabs, accordion, toast, form controls, and more.
   - This layer separates low-level accessible interactions from page-specific sections, so the portfolio content can stay relatively clean.

8. **Shared utilities and hooks**
   - `lib/utils.ts` is the main shared utility file, likely for class-name composition or small helpers.
   - `hooks/use-mobile.tsx` and `hooks/use-toast.ts` support responsive behavior and ephemeral notifications.
   - The same hooks also appear under `components/ui/`, which suggests some UI primitives are generated or re-exported in a shadcn-style structure.

9. **Styling architecture**
   - Styling is split across `app/globals.css`, `styles/globals.css`, and `styles/theme-transitions.css`, with **Tailwind CSS** as the primary utility system.
   - `tailwind.config.ts` and `postcss.config.mjs` indicate a conventional Tailwind build pipeline.
   - The presence of both app-level and styles-folder CSS suggests a mix of global base styles and specialized theme transition rules.

10. **Asset and content boundaries**
   - Static assets live in `public/`, including `public/AdityaDubey_Resume.pdf`, `public/images`, `public/logos`, and `public/site.webmanifest`.
   - This points to content being delivered mostly from the filesystem rather than fetched dynamically.
   - The resume PDF and imagery are part of the site’s outward-facing content surface.

11. **Responsive and interaction-heavy behavior**
   - The README emphasizes a “smooth and responsive experience for all devices,” and the code structure supports that with a mobile hook, cursor components, and UI primitives for overlays and drawers.
   - The UI stack includes **Framer Motion** per the README, so animations are likely used for transitions, section reveals, modal behavior, and theme effects.

12. **What an architecture diagram should show**
   - A good diagram would place `app/layout.tsx` at the top as the root shell.
   - Under it, show `app/page.tsx` composing the section components and shared chrome.
   - Add a separate cross-cutting band for theme, cursor/loader, and UI primitives.
   - Show static content flowing from `public/` into the sections and modal, with Tailwind/CSS and Radix-based primitives supporting the presentation layer.

Main entry points: [`app/page.tsx`](https://github.com/adityacodes-root/portfolio/blob/main/app/page.tsx) (Home Page), [`components/ui`](https://github.com/adityacodes-root/portfolio/tree/main/components/ui) (UI Primitives), [`app/layout.tsx`](https://github.com/adityacodes-root/portfolio/blob/main/app/layout.tsx) (Root Layout), [`components/sections/projects-section.tsx`](https://github.com/adityacodes-root/portfolio/blob/main/components/sections/projects-section.tsx) (Projects)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["App Router"]
  node_app_layout["Root Layout<br/>next app shell<br/>[layout.tsx]"]
  node_app_page["Home Page<br/>next route<br/>[page.tsx]"]
  node_app_not_found["404 Page<br/>next fallback<br/>[not-found.tsx]"]
end

subgraph group_sections["Page Sections"]
  node_section_wrapper["Section Wrapper<br/>layout helper"]
  node_hero_section["Hero<br/>content section<br/>[hero-section.tsx]"]
  node_about_section["About<br/>content section<br/>[about-section.tsx]"]
  node_skills_section["Skills<br/>content section<br/>[skills-section.tsx]"]
  node_experience_section["Experience<br/>content section"]
  node_projects_section["Projects<br/>content section"]
  node_testimonials_section["Testimonials<br/>content section"]
  node_contact_section["Contact<br/>content section"]
end

subgraph group_interaction["Interaction Layer"]
  node_header["Header<br/>site chrome<br/>[header.tsx]"]
  node_footer["Footer<br/>site chrome<br/>[footer.tsx]"]
  node_theme_provider["Theme Provider<br/>theme state<br/>[theme-provider.tsx]"]
  node_theme_toggle(("Theme Toggle<br/>theme control<br/>[theme-toggle.tsx]"))
  node_theme_fade(("Theme Fade<br/>transition layer<br/>[theme-fade.tsx]"))
  node_loader(("Loader<br/>loading effect<br/>[loader.tsx]"))
  node_cursor_wrapper["Cursor Wrapper<br/>interaction shell<br/>[cursor-wrapper.tsx]"]
  node_custom_cursor(("Custom Cursor<br/>cursor effect<br/>[custom-cursor.tsx]"))
  node_project_modal["Project Modal<br/>overlay dialog<br/>[project-modal.tsx]"]
end

subgraph group_ui["UI Primitives"]
  node_ui_primitives["UI Primitives<br/>radix/shadcn layer"]
  node_ui_hooks["UI Hooks<br/>hook layer<br/>[use-toast.ts]"]
  node_hooks_mobile(("Mobile Hook<br/>responsive hook<br/>[use-mobile.tsx]"))
  node_hooks_toast(("Toast Hook<br/>notification hook<br/>[use-toast.ts]"))
end

subgraph group_content["Content & Assets"]
  node_globals_css["Global CSS<br/>base styles<br/>[globals.css]"]
  node_styles_globals["Styles Globals<br/>global styles<br/>[globals.css]"]
  node_theme_transitions["Theme Transitions<br/>style module"]
  node_public_assets[("Static Assets<br/>filesystem content")]
  node_utils(("Utils<br/>shared helpers<br/>[utils.ts]"))
end

node_app_layout -->|"wraps"| node_theme_provider
node_app_layout -->|"wraps"| node_cursor_wrapper
node_app_layout -->|"loads"| node_globals_css
node_app_layout -->|"loads"| node_styles_globals
node_app_layout -->|"loads"| node_theme_transitions
node_app_page -->|"composes"| node_header
node_app_page -->|"composes"| node_footer
node_app_page -->|"composes"| node_hero_section
node_app_page -->|"composes"| node_about_section
node_app_page -->|"composes"| node_skills_section
node_app_page -->|"composes"| node_experience_section
node_app_page -->|"composes"| node_projects_section
node_app_page -->|"composes"| node_testimonials_section
node_app_page -->|"composes"| node_contact_section
node_app_page -->|"uses"| node_section_wrapper
node_app_not_found -.->|"uses"| node_ui_primitives
node_theme_toggle -->|"controls"| node_theme_provider
node_theme_fade -->|"reacts to"| node_theme_provider
node_loader -.->|"signals"| node_app_layout
node_cursor_wrapper -->|"contains"| node_custom_cursor
node_projects_section -->|"opens"| node_project_modal
node_project_modal -->|"builds on"| node_ui_primitives
node_hero_section -->|"builds on"| node_ui_primitives
node_about_section -->|"builds on"| node_ui_primitives
node_skills_section -->|"builds on"| node_ui_primitives
node_experience_section -->|"builds on"| node_ui_primitives
node_projects_section -->|"builds on"| node_ui_primitives
node_testimonials_section -->|"builds on"| node_ui_primitives
node_contact_section -->|"builds on"| node_ui_primitives
node_ui_primitives -->|"uses"| node_utils
node_ui_hooks -->|"includes"| node_hooks_mobile
node_ui_hooks -->|"includes"| node_hooks_toast
node_ui_primitives -->|"depends on"| node_ui_hooks
node_public_assets -->|"feeds"| node_hero_section
node_public_assets -->|"feeds"| node_projects_section
node_public_assets -->|"feeds"| node_contact_section
node_theme_provider -->|"exposes"| node_theme_toggle

click node_app_layout "https://github.com/adityacodes-root/portfolio/blob/main/app/layout.tsx"
click node_app_page "https://github.com/adityacodes-root/portfolio/blob/main/app/page.tsx"
click node_app_not_found "https://github.com/adityacodes-root/portfolio/blob/main/app/not-found.tsx"
click node_header "https://github.com/adityacodes-root/portfolio/blob/main/components/header.tsx"
click node_footer "https://github.com/adityacodes-root/portfolio/blob/main/components/footer.tsx"
click node_theme_provider "https://github.com/adityacodes-root/portfolio/blob/main/components/theme-provider.tsx"
click node_theme_toggle "https://github.com/adityacodes-root/portfolio/blob/main/components/theme-toggle.tsx"
click node_theme_fade "https://github.com/adityacodes-root/portfolio/blob/main/components/theme-fade.tsx"
click node_loader "https://github.com/adityacodes-root/portfolio/blob/main/components/loader.tsx"
click node_cursor_wrapper "https://github.com/adityacodes-root/portfolio/blob/main/components/cursor-wrapper.tsx"
click node_custom_cursor "https://github.com/adityacodes-root/portfolio/blob/main/components/custom-cursor.tsx"
click node_project_modal "https://github.com/adityacodes-root/portfolio/blob/main/components/project-modal.tsx"
click node_section_wrapper "https://github.com/adityacodes-root/portfolio/blob/main/components/section-wrapper.tsx"
click node_hero_section "https://github.com/adityacodes-root/portfolio/blob/main/components/sections/hero-section.tsx"
click node_about_section "https://github.com/adityacodes-root/portfolio/blob/main/components/sections/about-section.tsx"
click node_skills_section "https://github.com/adityacodes-root/portfolio/blob/main/components/sections/skills-section.tsx"
click node_experience_section "https://github.com/adityacodes-root/portfolio/blob/main/components/sections/experience-section.tsx"
click node_projects_section "https://github.com/adityacodes-root/portfolio/blob/main/components/sections/projects-section.tsx"
click node_testimonials_section "https://github.com/adityacodes-root/portfolio/blob/main/components/sections/testimonials-section.tsx"
click node_contact_section "https://github.com/adityacodes-root/portfolio/blob/main/components/sections/contact-section.tsx"
click node_ui_primitives "https://github.com/adityacodes-root/portfolio/tree/main/components/ui"
click node_ui_hooks "https://github.com/adityacodes-root/portfolio/blob/main/components/ui/use-toast.ts"
click node_hooks_mobile "https://github.com/adityacodes-root/portfolio/blob/main/hooks/use-mobile.tsx"
click node_hooks_toast "https://github.com/adityacodes-root/portfolio/blob/main/hooks/use-toast.ts"
click node_globals_css "https://github.com/adityacodes-root/portfolio/blob/main/app/globals.css"
click node_styles_globals "https://github.com/adityacodes-root/portfolio/blob/main/styles/globals.css"
click node_theme_transitions "https://github.com/adityacodes-root/portfolio/blob/main/styles/theme-transitions.css"
click node_public_assets "https://github.com/adityacodes-root/portfolio/tree/main/public"
click node_utils "https://github.com/adityacodes-root/portfolio/blob/main/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_app_layout,node_app_page,node_app_not_found toneBlue
class node_section_wrapper,node_hero_section,node_about_section,node_skills_section,node_experience_section,node_projects_section,node_testimonials_section,node_contact_section toneAmber
class node_header,node_footer,node_theme_provider,node_theme_toggle,node_theme_fade,node_loader,node_cursor_wrapper,node_custom_cursor,node_project_modal toneMint
class node_ui_primitives,node_ui_hooks,node_hooks_mobile,node_hooks_toast toneRose
class node_globals_css,node_styles_globals,node_theme_transitions,node_public_assets,node_utils toneIndigo
```

## Components

### App Router

Next.js root shell, routes, and page entrypoints

- [Root Layout](https://github.com/adityacodes-root/portfolio/blob/main/app/layout.tsx): next app shell · Top-level application shell and providers for every route · `app/layout.tsx`
- [Home Page](https://github.com/adityacodes-root/portfolio/blob/main/app/page.tsx): next route · Main landing page that assembles the portfolio experience · `app/page.tsx`
- [404 Page](https://github.com/adityacodes-root/portfolio/blob/main/app/not-found.tsx): next fallback · Custom not-found route for missing pages · `app/not-found.tsx`

### Page Sections

One-page portfolio composition and content blocks

- [Section Wrapper](https://github.com/adityacodes-root/portfolio/blob/main/components/section-wrapper.tsx): layout helper · Shared framing for anchors, spacing, and section layout · `components/section-wrapper.tsx`
- [Hero](https://github.com/adityacodes-root/portfolio/blob/main/components/sections/hero-section.tsx): content section · Lead introduction and first-screen messaging · `components/sections/hero-section.tsx`
- [About](https://github.com/adityacodes-root/portfolio/blob/main/components/sections/about-section.tsx): content section · Personal background and summary section · `components/sections/about-section.tsx`
- [Skills](https://github.com/adityacodes-root/portfolio/blob/main/components/sections/skills-section.tsx): content section · Capabilities and technical skill presentation · `components/sections/skills-section.tsx`
- [Experience](https://github.com/adityacodes-root/portfolio/blob/main/components/sections/experience-section.tsx): content section · Work history and timeline content · `components/sections/experience-section.tsx`
- [Projects](https://github.com/adityacodes-root/portfolio/blob/main/components/sections/projects-section.tsx): content section · Project showcase that can open detailed overlays · `components/sections/projects-section.tsx`
- [Testimonials](https://github.com/adityacodes-root/portfolio/blob/main/components/sections/testimonials-section.tsx): content section · Quotes and social proof section · `components/sections/testimonials-section.tsx`
- [Contact](https://github.com/adityacodes-root/portfolio/blob/main/components/sections/contact-section.tsx): content section · Contact call-to-action and outreach section · `components/sections/contact-section.tsx`

### Interaction Layer

Theme, motion, cursor, modal, and persistent chrome

- [Header](https://github.com/adityacodes-root/portfolio/blob/main/components/header.tsx): site chrome · Persistent top navigation and branding · `components/header.tsx`
- [Footer](https://github.com/adityacodes-root/portfolio/blob/main/components/footer.tsx): site chrome · Persistent bottom site information · `components/footer.tsx`
- [Theme Provider](https://github.com/adityacodes-root/portfolio/blob/main/components/theme-provider.tsx): theme state · Global theme context and switching support · `components/theme-provider.tsx`
- [Theme Toggle](https://github.com/adityacodes-root/portfolio/blob/main/components/theme-toggle.tsx): theme control · User-facing control for changing themes · `components/theme-toggle.tsx`
- [Theme Fade](https://github.com/adityacodes-root/portfolio/blob/main/components/theme-fade.tsx): transition layer · Visual transition effect during theme changes · `components/theme-fade.tsx`
- [Loader](https://github.com/adityacodes-root/portfolio/blob/main/components/loader.tsx): loading effect · Global loading or intro animation layer · `components/loader.tsx`
- [Cursor Wrapper](https://github.com/adityacodes-root/portfolio/blob/main/components/cursor-wrapper.tsx): interaction shell · Wraps cursor-enhanced interactions across the app · `components/cursor-wrapper.tsx`
- [Custom Cursor](https://github.com/adityacodes-root/portfolio/blob/main/components/custom-cursor.tsx): cursor effect · Custom pointer treatment for the presentation UI · `components/custom-cursor.tsx`
- [Project Modal](https://github.com/adityacodes-root/portfolio/blob/main/components/project-modal.tsx): overlay dialog · Expanded project detail view launched from the projects section · `components/project-modal.tsx`

### UI Primitives

Shared accessible component foundation

- [UI Primitives](https://github.com/adityacodes-root/portfolio/tree/main/components/ui): radix/shadcn layer · Shared accessible component library used by sections and overlays · `components/ui`
- [UI Hooks](https://github.com/adityacodes-root/portfolio/blob/main/components/ui/use-toast.ts): hook layer · Shared client hooks for mobile behavior and toasts · `components/ui/use-toast.ts`
- [Mobile Hook](https://github.com/adityacodes-root/portfolio/blob/main/hooks/use-mobile.tsx): responsive hook · Responsive breakpoint helper for client interactions · `hooks/use-mobile.tsx`
- [Toast Hook](https://github.com/adityacodes-root/portfolio/blob/main/hooks/use-toast.ts): notification hook · Ephemeral notification state and helpers · `hooks/use-toast.ts`

### Content & Assets

Static files and global styling inputs

- [Global CSS](https://github.com/adityacodes-root/portfolio/blob/main/app/globals.css): base styles · App-wide global styles for the Next.js shell · `app/globals.css`
- [Styles Globals](https://github.com/adityacodes-root/portfolio/blob/main/styles/globals.css): global styles · Additional global styling layer · `styles/globals.css`
- [Theme Transitions](https://github.com/adityacodes-root/portfolio/blob/main/styles/theme-transitions.css): style module · Theme transition-specific CSS rules · `styles/theme-transitions.css`
- [Static Assets](https://github.com/adityacodes-root/portfolio/tree/main/public): filesystem content · Resume, images, logos, and web manifest delivered from public files · `public`
- [Utils](https://github.com/adityacodes-root/portfolio/blob/main/lib/utils.ts): shared helpers · Common helper functions such as class composition · `lib/utils.ts`

## Connections

- Root Layout → Theme Provider: wraps · Layout installs global theme context
- Root Layout → Cursor Wrapper: wraps · Layout applies cursor interaction shell
- Root Layout → Global CSS: loads · Root app shell imports global styles
- Root Layout → Styles Globals: loads · Additional global style layer is included by the app
- Root Layout → Theme Transitions: loads · Theme transition styles are made available globally
- Home Page → Header: composes · Home page includes persistent header chrome
- Home Page → Footer: composes · Home page includes persistent footer chrome
- Home Page → Hero: composes · Landing page starts with the hero section
- Home Page → About: composes · Landing page includes about content
- Home Page → Skills: composes · Landing page includes skills content
- Home Page → Experience: composes · Landing page includes experience content
- Home Page → Projects: composes · Landing page includes project showcase
- Home Page → Testimonials: composes · Landing page includes testimonials
- Home Page → Contact: composes · Landing page ends with contact section
- Home Page → Section Wrapper: uses · Sections share a common framing component
- 404 Page → UI Primitives: uses · Fallback route can rely on shared UI components
- Theme Toggle → Theme Provider: controls · Toggle updates global theme state
- Theme Fade → Theme Provider: reacts to · Theme transitions depend on shared theme state
- Loader → Root Layout: signals · Loading state is part of the global shell experience
- Cursor Wrapper → Custom Cursor: contains · Wrapper provides the custom cursor implementation
- Projects → Project Modal: opens · Project cards expand into a modal detail view
- Project Modal → UI Primitives: builds on · Modal is implemented using shared dialog and overlay primitives
- Hero → UI Primitives: builds on · Content sections use shared UI components for presentation
- About → UI Primitives: builds on · Content sections use shared UI components for presentation
- Skills → UI Primitives: builds on · Content sections use shared UI components for presentation
- Experience → UI Primitives: builds on · Content sections use shared UI components for presentation
- Projects → UI Primitives: builds on · Project cards and controls rely on shared primitives
- Testimonials → UI Primitives: builds on · Content sections use shared UI components for presentation
- Contact → UI Primitives: builds on · Contact section uses shared UI components for input and layout
- UI Primitives → Utils: uses · Shared components rely on helper utilities
- UI Hooks → Mobile Hook: includes · Responsive hook is part of the shared UI support layer
- UI Hooks → Toast Hook: includes · Toast hook is part of the shared UI support layer
- UI Primitives → UI Hooks: depends on · Primitive components use shared hooks for behavior
- Static Assets → Hero: feeds · Images and resume assets support the landing content
- Static Assets → Projects: feeds · Project visuals and logos support showcased work
- Static Assets → Contact: feeds · Static assets support contact and branding content
- Theme Provider → Theme Toggle: exposes · Provider makes theme state available to the toggle
