# kushan2210-tech/kushan-portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/kushan2210-tech/kushan-portfolio
- Repository: https://github.com/kushan2210-tech/kushan-portfolio

## Overview

This is a personal developer portfolio built with Next.js. Visitors browse the landing page’s profile and featured work, open project detail pages, and can use contact or project-data endpoints. The project catalog also presents documented work across AI, computer vision, recruitment, onboarding, and blockchain; these are portfolio entries, not implementations of those systems in this repository. Edges reflect sampled imports/calls or explicit fetch paths; API route behavior beyond the shown project route is not inferred.

Main entry points: [`lib/api.ts`](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/lib/api.ts) (API client), [`data/projects.ts`](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/data/projects.ts) (Project catalog), [`app/page.tsx`](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/page.tsx) (Home page), [`app/projects/[slug]/page.tsx`](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/projects/%5Bslug%5D/page.tsx) (Project detail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Portfolio experience"]
  node_home["Home page<br/>[page.tsx]"]
  node_site_shell["Site shell<br/>[layout.tsx]"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
  node_spotlight["Pointer spotlight<br/>[Spotlight.tsx]"]
  node_typing["Role animation<br/>[TypingRoles.tsx]"]
  node_project_detail["Project detail<br/>[page.tsx]"]
  node_project_card["Project card<br/>[ProjectCard.tsx]"]
end

subgraph group_content["Project content"]
  node_project_catalog["Project catalog<br/>[projects.ts]"]
end

subgraph group_interactions["Visitor interactions"]
  node_contact_form["Contact form<br/>[ContactForm.tsx]"]
  node_visitor_tracker["Visit tracker<br/>[VisitorTracker.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_contact_api["Contact endpoint<br/>[route.ts]"]
  node_analytics_api["Analytics endpoint<br/>[route.ts]"]
  node_projects_api["Projects endpoint<br/>[route.ts]"]
end

node_visitor(("Portfolio visitor"))

node_visitor -->|"opens"| node_home
node_site_shell -->|"renders"| node_navbar
node_site_shell -->|"renders"| node_spotlight
node_visitor -->|"opens"| node_project_detail
node_home -->|"reads"| node_project_catalog
node_home -->|"renders"| node_typing
node_project_detail -->|"looks up"| node_project_catalog
node_project_card -->|"uses project data"| node_project_catalog
node_project_detail -->|"renders"| node_visitor_tracker
node_contact_form -->|"sends message"| node_api_client
node_visitor_tracker -->|"tracks visit"| node_api_client
node_api_client -->|"POSTs to"| node_contact_api
node_api_client -->|"POSTs to"| node_analytics_api
node_visitor -->|"requests projects"| node_projects_api
node_projects_api -->|"returns"| node_project_catalog

click node_home "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/page.tsx"
click node_site_shell "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/layout.tsx"
click node_navbar "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/components/Navbar.tsx"
click node_spotlight "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/components/Spotlight.tsx"
click node_typing "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/components/TypingRoles.tsx"
click node_project_detail "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/projects/%5Bslug%5D/page.tsx"
click node_project_catalog "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/data/projects.ts"
click node_project_card "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/components/ProjectCard.tsx"
click node_contact_form "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/components/ContactForm.tsx"
click node_visitor_tracker "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/components/VisitorTracker.tsx"
click node_api_client "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/lib/api.ts"
click node_contact_api "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/api/contact/route.ts"
click node_analytics_api "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/api/analytics/route.ts"
click node_projects_api "https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/api/projects/route.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,node_site_shell,node_navbar,node_spotlight,node_typing,node_project_detail,node_project_card toneBlue
class node_project_catalog toneAmber
class node_contact_form,node_visitor_tracker,node_api_client,node_contact_api,node_analytics_api,node_projects_api toneMint
class node_visitor toneIndigo
```

## Components

### Portfolio experience

- [Home page](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/page.tsx): `app/page.tsx`
- [Site shell](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/layout.tsx): `app/layout.tsx`
- [Navigation](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/components/Navbar.tsx): `components/Navbar.tsx`
- [Pointer spotlight](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/components/Spotlight.tsx): `components/Spotlight.tsx`
- [Role animation](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/components/TypingRoles.tsx): `components/TypingRoles.tsx`
- [Project detail](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/projects/%5Bslug%5D/page.tsx): `app/projects/[slug]/page.tsx`
- [Project card](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/components/ProjectCard.tsx): `components/ProjectCard.tsx`

### Project content

- [Project catalog](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/data/projects.ts): `data/projects.ts`

### Visitor interactions

- [Contact form](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/components/ContactForm.tsx): `components/ContactForm.tsx`
- [Visit tracker](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/components/VisitorTracker.tsx): `components/VisitorTracker.tsx`
- [API client](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/lib/api.ts): `lib/api.ts`
- [Contact endpoint](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/api/contact/route.ts): `app/api/contact/route.ts`
- [Analytics endpoint](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/api/analytics/route.ts): `app/api/analytics/route.ts`
- [Projects endpoint](https://github.com/kushan2210-tech/kushan-portfolio/blob/main/app/api/projects/route.ts): `app/api/projects/route.ts`

### Other components

- **Portfolio visitor**

## Connections

- Portfolio visitor → Home page: opens (evidence: `app/page.tsx`)
- Site shell → Navigation: renders (evidence: `app/layout.tsx`)
- Site shell → Pointer spotlight: renders (evidence: `app/layout.tsx`)
- Portfolio visitor → Project detail: opens (evidence: `app/projects/[slug]/page.tsx`)
- Home page → Project catalog: reads (evidence: `app/page.tsx`)
- Home page → Role animation: renders (evidence: `app/page.tsx`)
- Project detail → Project catalog: looks up (evidence: `app/projects/[slug]/page.tsx`)
- Project card → Project catalog: uses project data (evidence: `components/ProjectCard.tsx`)
- Project detail → Visit tracker: renders (evidence: `app/projects/[slug]/page.tsx`)
- Contact form → API client: sends message (evidence: `components/ContactForm.tsx`)
- Visit tracker → API client: tracks visit (evidence: `components/VisitorTracker.tsx`)
- API client → Contact endpoint: POSTs to (evidence: `lib/api.ts`)
- API client → Analytics endpoint: POSTs to (evidence: `lib/api.ts`)
- Portfolio visitor → Projects endpoint: requests projects (evidence: `app/api/projects/route.ts`)
- Projects endpoint → Project catalog: returns (evidence: `app/api/projects/route.ts`)
