# anirudhkaplish/portfolio architecture

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

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

## Overview

This is a personal developer portfolio: visitors move through an animated landing/terminal experience into profile, skills, project, experience, achievement, writing, resume, and contact content. An admin can authenticate through the terminal and edit portfolio data, which the data hook reads from Firestore with static fallbacks. The graph follows documented imports and sampled calls; several section and form internals were not excerpted, so their detailed behavior is represented only where the source index supports it.

Main entry points: [`src/App.tsx`](https://github.com/anirudhkaplish/portfolio/blob/main/src/App.tsx) (App Router), [`src/lib/firebase.ts`](https://github.com/anirudhkaplish/portfolio/blob/main/src/lib/firebase.ts) (Firebase Setup), [`src/components/admin/AdminModal.tsx`](https://github.com/anirudhkaplish/portfolio/blob/main/src/components/admin/AdminModal.tsx) (Admin Modal), [`src/hooks/usePortfolioData.ts`](https://github.com/anirudhkaplish/portfolio/blob/main/src/hooks/usePortfolioData.ts) (Portfolio Data Hook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Portfolio Experience"]
  node_app["App Router<br/>[App.tsx]"]
  node_layout["Main Layout<br/>[MainLayout.tsx]"]
  node_navbar["Navbar<br/>[Navbar.tsx]"]
  node_terminal["Terminal Intro<br/>[TerminalIntro.tsx]"]
  node_neuralnav["Neural Navigation"]
  node_background["Neural Background"]
end

subgraph group_content["Portfolio Content"]
  node_sections["Portfolio Sections"]
  node_glitch["Glitch Text<br/>[GlitchText.tsx]"]
end

subgraph group_admin["Administration"]
  node_adminmodal["Admin Modal<br/>[AdminModal.tsx]"]
  node_adminforms["Admin Forms"]
  node_imageutils["Image Compression<br/>[imageUtils.ts]"]
  node_firebaseauth["Firebase Auth"]
end

subgraph group_data["Data Services"]
  node_datahook["Portfolio Data Hook"]
  node_staticdata["Fallback Portfolio Data<br/>[portfolio.ts]"]
  node_firebase["Firebase Setup<br/>[firebase.ts]"]
  node_firestore[("Firestore")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"renders"| node_layout
node_app -->|"renders"| node_terminal
node_app -->|"renders"| node_neuralnav
node_app -->|"renders"| node_background
node_app -->|"routes to"| node_sections
node_layout -->|"renders"| node_background
node_layout -->|"renders"| node_navbar
node_sections -->|"reads"| node_datahook
node_sections -->|"renders"| node_glitch
node_neuralnav -->|"renders"| node_glitch
node_app -->|"opens"| node_adminmodal
node_terminal -->|"uses auth"| node_firebase
node_terminal -->|"authenticates"| node_firebaseauth
node_adminmodal -->|"renders"| node_adminforms
node_adminmodal -->|"uses"| node_firebase
node_adminmodal -->|"writes"| node_firestore
node_adminforms -->|"compresses images"| node_imageutils
node_datahook -->|"uses"| node_firebase
node_datahook -->|"falls back to"| node_staticdata
node_datahook -->|"subscribes to"| node_firestore
node_firebase -->|"initializes"| node_firestore
node_firebase -->|"initializes"| node_firebaseauth

click node_app "https://github.com/anirudhkaplish/portfolio/blob/main/src/App.tsx"
click node_layout "https://github.com/anirudhkaplish/portfolio/blob/main/src/layouts/MainLayout.tsx"
click node_navbar "https://github.com/anirudhkaplish/portfolio/blob/main/src/components/layout/Navbar.tsx"
click node_terminal "https://github.com/anirudhkaplish/portfolio/blob/main/src/components/sections/TerminalIntro.tsx"
click node_neuralnav "https://github.com/anirudhkaplish/portfolio/blob/main/src/components/canvas/NeuralNavigation.tsx"
click node_background "https://github.com/anirudhkaplish/portfolio/blob/main/src/components/canvas/NeuralBackground.tsx"
click node_sections "https://github.com/anirudhkaplish/portfolio/tree/main/src/components/sections"
click node_glitch "https://github.com/anirudhkaplish/portfolio/blob/main/src/components/GlitchText.tsx"
click node_adminmodal "https://github.com/anirudhkaplish/portfolio/blob/main/src/components/admin/AdminModal.tsx"
click node_adminforms "https://github.com/anirudhkaplish/portfolio/tree/main/src/components/admin/forms"
click node_imageutils "https://github.com/anirudhkaplish/portfolio/blob/main/src/lib/imageUtils.ts"
click node_datahook "https://github.com/anirudhkaplish/portfolio/blob/main/src/hooks/usePortfolioData.ts"
click node_staticdata "https://github.com/anirudhkaplish/portfolio/blob/main/src/hooks/data/portfolio.ts"
click node_firebase "https://github.com/anirudhkaplish/portfolio/blob/main/src/lib/firebase.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,node_layout,node_navbar,node_terminal,node_neuralnav,node_background toneBlue
class node_sections,node_glitch toneAmber
class node_adminmodal,node_adminforms,node_imageutils,node_firebaseauth toneMint
class node_datahook,node_staticdata,node_firebase,node_firestore toneRose
class node_visitor toneIndigo
```

## Components

### Portfolio Experience

- [App Router](https://github.com/anirudhkaplish/portfolio/blob/main/src/App.tsx): `src/App.tsx`
- [Main Layout](https://github.com/anirudhkaplish/portfolio/blob/main/src/layouts/MainLayout.tsx): `src/layouts/MainLayout.tsx`
- [Navbar](https://github.com/anirudhkaplish/portfolio/blob/main/src/components/layout/Navbar.tsx): `src/components/layout/Navbar.tsx`
- [Terminal Intro](https://github.com/anirudhkaplish/portfolio/blob/main/src/components/sections/TerminalIntro.tsx): `src/components/sections/TerminalIntro.tsx`
- [Neural Navigation](https://github.com/anirudhkaplish/portfolio/blob/main/src/components/canvas/NeuralNavigation.tsx): `src/components/canvas/NeuralNavigation.tsx`
- [Neural Background](https://github.com/anirudhkaplish/portfolio/blob/main/src/components/canvas/NeuralBackground.tsx): `src/components/canvas/NeuralBackground.tsx`

### Portfolio Content

- [Portfolio Sections](https://github.com/anirudhkaplish/portfolio/tree/main/src/components/sections): `src/components/sections`
- [Glitch Text](https://github.com/anirudhkaplish/portfolio/blob/main/src/components/GlitchText.tsx): `src/components/GlitchText.tsx`

### Administration

- [Admin Modal](https://github.com/anirudhkaplish/portfolio/blob/main/src/components/admin/AdminModal.tsx): `src/components/admin/AdminModal.tsx`
- [Admin Forms](https://github.com/anirudhkaplish/portfolio/tree/main/src/components/admin/forms): `src/components/admin/forms`
- [Image Compression](https://github.com/anirudhkaplish/portfolio/blob/main/src/lib/imageUtils.ts): `src/lib/imageUtils.ts`
- **Firebase Auth**

### Data Services

- [Portfolio Data Hook](https://github.com/anirudhkaplish/portfolio/blob/main/src/hooks/usePortfolioData.ts): `src/hooks/usePortfolioData.ts`
- [Fallback Portfolio Data](https://github.com/anirudhkaplish/portfolio/blob/main/src/hooks/data/portfolio.ts): `src/hooks/data/portfolio.ts`
- [Firebase Setup](https://github.com/anirudhkaplish/portfolio/blob/main/src/lib/firebase.ts): `src/lib/firebase.ts`
- **Firestore**

### Other components

- **Visitor**

## Connections

- Visitor → App Router: opens
- App Router → Main Layout: renders (evidence: `src/App.tsx`)
- App Router → Terminal Intro: renders (evidence: `src/App.tsx`)
- App Router → Neural Navigation: renders (evidence: `src/App.tsx`)
- App Router → Neural Background: renders (evidence: `src/App.tsx`)
- App Router → Portfolio Sections: routes to (evidence: `src/App.tsx`)
- Main Layout → Neural Background: renders (evidence: `src/layouts/MainLayout.tsx`)
- Main Layout → Navbar: renders (evidence: `src/layouts/MainLayout.tsx`)
- Portfolio Sections → Portfolio Data Hook: reads (evidence: `src/components/sections/Projects.tsx`)
- Portfolio Sections → Glitch Text: renders (evidence: `src/components/sections/Projects.tsx`)
- Neural Navigation → Glitch Text: renders (evidence: `src/components/canvas/NeuralNavigation.tsx`)
- App Router → Admin Modal: opens (evidence: `src/App.tsx`)
- Terminal Intro → Firebase Setup: uses auth (evidence: `src/components/sections/TerminalIntro.tsx`)
- Terminal Intro → Firebase Auth: authenticates (evidence: `src/components/sections/TerminalIntro.tsx`)
- Admin Modal → Admin Forms: renders (evidence: `src/components/admin/AdminModal.tsx`)
- Admin Modal → Firebase Setup: uses (evidence: `src/components/admin/AdminModal.tsx`)
- Admin Modal → Firestore: writes (evidence: `src/components/admin/AdminModal.tsx`)
- Admin Forms → Image Compression: compresses images (evidence: `src/components/admin/forms/ProjectForm.tsx`)
- Portfolio Data Hook → Firebase Setup: uses (evidence: `src/hooks/usePortfolioData.ts`)
- Portfolio Data Hook → Fallback Portfolio Data: falls back to (evidence: `src/hooks/usePortfolioData.ts`)
- Portfolio Data Hook → Firestore: subscribes to (evidence: `src/hooks/usePortfolioData.ts`)
- Firebase Setup → Firestore: initializes (evidence: `src/lib/firebase.ts`)
- Firebase Setup → Firebase Auth: initializes (evidence: `src/lib/firebase.ts`)
