# kunaidebnath/kunai_portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/kunaidebnath/kunai_portfolio
- Repository: https://github.com/kunaidebnath/kunai_portfolio

## Overview

This is a React portfolio and editable content workbench. Visitors enter through the client-side router, browse profile, skills, project demonstrations, education and contact pages, and can submit an inquiry or download a generated résumé. Administrators log in and manage portfolio content and inbox records through a separate dashboard. The map preserves README-described capabilities, including responsive multipage presentation and interactive demos. Some connections rely on the SOURCE INDEX rather than full excerpts; unsampled implementation details are not inferred.

Main entry points: [`src/lib/supabase.ts`](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/lib/supabase.ts) (Supabase client), [`src/pages/Home.tsx`](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/pages/Home.tsx) (Home composition), [`src/pages/AdminDashboard.tsx`](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/pages/AdminDashboard.tsx) (Admin dashboard), [`src/App.tsx`](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/App.tsx) (Route application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["App routing"]
  node_app["Route application<br/>[App.tsx]"]
  node_home["Home composition<br/>[Home.tsx]"]
  node_public_pages["Portfolio pages"]
  node_admin_login["Admin login<br/>[AdminLogin.tsx]"]
end

subgraph group_portfolio["Public portfolio"]
  node_profile_view["Profile and résumé<br/>[Hero.tsx]"]
  node_about["About and journey<br/>[About.tsx]"]
  node_skills["Skills showcase<br/>[Skills.tsx]"]
  node_projects["Project showcase<br/>[Projects.tsx]"]
  node_interactive_demos["Interactive demos"]
  node_project_modal["Project details"]
  node_education["Education and certifications"]
  node_contact["Contact form<br/>[Contact.tsx]"]
end

subgraph group_admin["Admin workbench"]
  node_dashboard["Admin dashboard<br/>[AdminDashboard.tsx]"]
  node_admin_projects["Project editor<br/>[AdminProjects.tsx]"]
  node_admin_skills["Skills editor<br/>[AdminSkills.tsx]"]
  node_admin_education["Education editor<br/>[AdminEducation.tsx]"]
  node_admin_inbox["Inquiry inbox<br/>[AdminInbox.tsx]"]
  node_admin_profile["Profile editor<br/>[AdminProfile.tsx]"]
end

subgraph group_content["Content and services"]
  node_profile_state["Profile state<br/>[useProfile.ts]"]
  node_portfolio_data["Portfolio source data<br/>[portfolioData.ts]"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
  node_supabase[("Supabase service")]
  node_resume_pdf["Résumé PDF generator"]
end

node_visitor(("Visitor"))
node_admin_user(("Administrator"))

node_visitor -->|"opens"| node_app
node_admin_user -->|"opens admin"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_public_pages
node_app -->|"routes to"| node_admin_login
node_app -->|"routes to"| node_dashboard
node_home -->|"renders"| node_profile_view
node_home -->|"renders"| node_about
node_home -->|"renders"| node_skills
node_home -->|"renders"| node_projects
node_home -->|"renders"| node_education
node_home -->|"renders"| node_contact
node_projects -->|"renders demo"| node_interactive_demos
node_projects -->|"opens details"| node_project_modal
node_profile_view -->|"reads profile"| node_profile_state
node_profile_view -->|"generates résumé"| node_resume_pdf
node_about -->|"reads profile"| node_profile_state
node_skills -->|"loads skills"| node_supabase_client
node_projects -->|"loads projects"| node_supabase_client
node_contact -->|"reads profile"| node_profile_state
node_contact -->|"submits inquiry"| node_supabase_client
node_profile_state -->|"uses defaults"| node_portfolio_data
node_profile_state -->|"syncs profile"| node_supabase_client
node_supabase_client -.->|"connects"| node_supabase
node_admin_login -->|"authenticates"| node_supabase_client
node_dashboard -->|"renders editor"| node_admin_projects
node_dashboard -->|"renders editor"| node_admin_skills
node_dashboard -->|"renders inbox"| node_admin_inbox
node_dashboard -->|"renders editor"| node_admin_education
node_dashboard -->|"renders editor"| node_admin_profile
node_admin_projects -->|"manages projects"| node_supabase_client
node_admin_skills -->|"manages skills"| node_supabase_client
node_admin_inbox -->|"manages inquiries"| node_supabase_client
node_admin_education -->|"manages education"| node_supabase_client
node_admin_education -->|"uses defaults"| node_portfolio_data
node_admin_profile -->|"manages profile"| node_supabase_client
node_admin_profile -->|"updates profile"| node_profile_state

click node_app "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/App.tsx"
click node_home "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/pages/Home.tsx"
click node_public_pages "https://github.com/kunaidebnath/kunai_portfolio/tree/main/src/pages"
click node_admin_login "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/pages/AdminLogin.tsx"
click node_dashboard "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/pages/AdminDashboard.tsx"
click node_profile_view "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/Hero.tsx"
click node_about "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/About.tsx"
click node_skills "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/Skills.tsx"
click node_projects "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/Projects.tsx"
click node_interactive_demos "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/LiveInteractiveDemos.tsx"
click node_project_modal "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/InteractiveProjectModal.tsx"
click node_education "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/EducationCertifications.tsx"
click node_contact "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/Contact.tsx"
click node_admin_projects "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/admin/AdminProjects.tsx"
click node_admin_skills "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/admin/AdminSkills.tsx"
click node_admin_education "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/admin/AdminEducation.tsx"
click node_admin_inbox "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/admin/AdminInbox.tsx"
click node_admin_profile "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/admin/AdminProfile.tsx"
click node_profile_state "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/lib/useProfile.ts"
click node_portfolio_data "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/data/portfolioData.ts"
click node_supabase_client "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/lib/supabase.ts"
click node_resume_pdf "https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/lib/generateResumePdf.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_home,node_public_pages,node_admin_login toneBlue
class node_profile_view,node_about,node_skills,node_projects,node_interactive_demos,node_project_modal,node_education,node_contact toneAmber
class node_dashboard,node_admin_projects,node_admin_skills,node_admin_education,node_admin_inbox,node_admin_profile toneMint
class node_profile_state,node_portfolio_data,node_supabase_client,node_supabase,node_resume_pdf toneRose
class node_visitor,node_admin_user toneIndigo
```

## Components

### App routing

- [Route application](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/App.tsx): `src/App.tsx`
- [Home composition](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Portfolio pages](https://github.com/kunaidebnath/kunai_portfolio/tree/main/src/pages): `src/pages`
- [Admin login](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/pages/AdminLogin.tsx): `src/pages/AdminLogin.tsx`

### Public portfolio

- [Profile and résumé](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/Hero.tsx): `src/components/Hero.tsx`
- [About and journey](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/About.tsx): `src/components/About.tsx`
- [Skills showcase](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/Skills.tsx): `src/components/Skills.tsx`
- [Project showcase](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/Projects.tsx): `src/components/Projects.tsx`
- [Interactive demos](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/LiveInteractiveDemos.tsx): `src/components/LiveInteractiveDemos.tsx`
- [Project details](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/InteractiveProjectModal.tsx): `src/components/InteractiveProjectModal.tsx`
- [Education and certifications](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/EducationCertifications.tsx): `src/components/EducationCertifications.tsx`
- [Contact form](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/Contact.tsx): `src/components/Contact.tsx`

### Admin workbench

- [Admin dashboard](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/pages/AdminDashboard.tsx): `src/pages/AdminDashboard.tsx`
- [Project editor](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/admin/AdminProjects.tsx): `src/components/admin/AdminProjects.tsx`
- [Skills editor](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/admin/AdminSkills.tsx): `src/components/admin/AdminSkills.tsx`
- [Education editor](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/admin/AdminEducation.tsx): `src/components/admin/AdminEducation.tsx`
- [Inquiry inbox](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/admin/AdminInbox.tsx): `src/components/admin/AdminInbox.tsx`
- [Profile editor](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/components/admin/AdminProfile.tsx): `src/components/admin/AdminProfile.tsx`

### Content and services

- [Profile state](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/lib/useProfile.ts): `src/lib/useProfile.ts`
- [Portfolio source data](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/data/portfolioData.ts): `src/data/portfolioData.ts`
- [Supabase client](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- **Supabase service**
- [Résumé PDF generator](https://github.com/kunaidebnath/kunai_portfolio/blob/main/src/lib/generateResumePdf.ts): `src/lib/generateResumePdf.ts`

### Other components

- **Visitor**
- **Administrator**

## Connections

- Visitor → Route application: opens (evidence: `README.md`)
- Administrator → Route application: opens admin (evidence: `src/App.tsx`)
- Route application → Home composition: routes to (evidence: `src/App.tsx`)
- Route application → Portfolio pages: routes to (evidence: `src/App.tsx`)
- Route application → Admin login: routes to (evidence: `src/App.tsx`)
- Route application → Admin dashboard: routes to (evidence: `src/App.tsx`)
- Home composition → Profile and résumé: renders (evidence: `src/pages/Home.tsx`)
- Home composition → About and journey: renders (evidence: `src/pages/Home.tsx`)
- Home composition → Skills showcase: renders (evidence: `src/pages/Home.tsx`)
- Home composition → Project showcase: renders (evidence: `src/pages/Home.tsx`)
- Home composition → Education and certifications: renders (evidence: `src/pages/Home.tsx`)
- Home composition → Contact form: renders (evidence: `src/pages/Home.tsx`)
- Project showcase → Interactive demos: renders demo (evidence: `src/components/Projects.tsx`)
- Project showcase → Project details: opens details (evidence: `src/components/Projects.tsx`)
- Profile and résumé → Profile state: reads profile (evidence: `src/components/Hero.tsx`)
- Profile and résumé → Résumé PDF generator: generates résumé (evidence: `src/components/Hero.tsx`)
- About and journey → Profile state: reads profile (evidence: `src/components/About.tsx`)
- Skills showcase → Supabase client: loads skills (evidence: `src/components/Skills.tsx`)
- Project showcase → Supabase client: loads projects (evidence: `src/components/Projects.tsx`)
- Contact form → Profile state: reads profile (evidence: `src/components/Contact.tsx`)
- Contact form → Supabase client: submits inquiry (evidence: `src/components/Contact.tsx`)
- Profile state → Portfolio source data: uses defaults (evidence: `src/lib/useProfile.ts`)
- Profile state → Supabase client: syncs profile (evidence: `src/lib/useProfile.ts`)
- Supabase client → Supabase service: connects (evidence: `src/lib/supabase.ts`)
- Admin login → Supabase client: authenticates (evidence: `src/pages/AdminLogin.tsx`)
- Admin dashboard → Project editor: renders editor (evidence: `src/pages/AdminDashboard.tsx`)
- Admin dashboard → Skills editor: renders editor (evidence: `src/pages/AdminDashboard.tsx`)
- Admin dashboard → Inquiry inbox: renders inbox (evidence: `src/pages/AdminDashboard.tsx`)
- Admin dashboard → Education editor: renders editor (evidence: `src/pages/AdminDashboard.tsx`)
- Admin dashboard → Profile editor: renders editor (evidence: `src/pages/AdminDashboard.tsx`)
- Project editor → Supabase client: manages projects (evidence: `src/components/admin/AdminProjects.tsx`)
- Skills editor → Supabase client: manages skills (evidence: `src/components/admin/AdminSkills.tsx`)
- Inquiry inbox → Supabase client: manages inquiries (evidence: `src/components/admin/AdminInbox.tsx`)
- Education editor → Supabase client: manages education (evidence: `src/components/admin/AdminEducation.tsx`)
- Education editor → Portfolio source data: uses defaults (evidence: `src/components/admin/AdminEducation.tsx`)
- Profile editor → Supabase client: manages profile (evidence: `src/components/admin/AdminProfile.tsx`)
- Profile editor → Profile state: updates profile (evidence: `src/components/admin/AdminProfile.tsx`)
