# 0978114331/khouvchvea-portfolio architecture

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

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

## Overview

This is a bilingual personal portfolio site with a Supabase-backed admin area and a collection of visitor tools. The main visitor workflow is to browse portfolio content, projects and documents, interact with engagement features, and open tools; administrators sign in to manage site content. The graph preserves the documented component composition and the sampled data/auth boundaries. Several data-fetching and admin implementation details are unsampled, so those internal connections are omitted rather than inferred from imports alone.

Main entry points: [`src/components/PublicSite.tsx`](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/PublicSite.tsx) (Public site), [`src/App.tsx`](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/App.tsx) (App routing), [`src/components/Reveal.tsx`](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/Reveal.tsx) (Scroll reveal), [`src/lib/auth.tsx`](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/lib/auth.tsx) (Authentication context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_app["App routing<br/>[App.tsx]"]
  node_public["Public site<br/>[PublicSite.tsx]"]
end

subgraph group_portfolio["Public portfolio"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
  node_hero["Hero<br/>[HeroSection.tsx]"]
  node_about["About and tools<br/>[AboutSection.tsx]"]
  node_skills["Skills<br/>[SkillsSection.tsx]"]
  node_projects["Projects"]
  node_documents["Documents"]
  node_contact["Contact<br/>[ContactSection.tsx]"]
  node_footer["Footer<br/>[Footer.tsx]"]
  node_reveal["Scroll reveal<br/>[Reveal.tsx]"]
end

subgraph group_tools["Visitor tools"]
  node_chat["Chat assistant<br/>[ChatAssistant.tsx]"]
  node_converter["Converter<br/>[ConverterModal.tsx]"]
  node_ocr["OCR tool<br/>[OcrModal.tsx]"]
  node_qr["QR generator"]
  node_vault["Vault<br/>[VaultModal.tsx]"]
  node_flashcards["Flashcards<br/>[FlashcardModal.tsx]"]
  node_wheel["Spin wheel<br/>[SpinWheelModal.tsx]"]
  node_lightbox["Image lightbox<br/>[Lightbox.tsx]"]
end

subgraph group_admin["Administration"]
  node_login["Admin login<br/>[AdminLogin.tsx]"]
  node_dashboard["Admin dashboard<br/>[AdminDashboard.tsx]"]
end

subgraph group_backend["Shared services"]
  node_auth["Authentication context<br/>[auth.tsx]"]
  node_app_context["Theme and language<br/>[app-context.tsx]"]
  node_portfolio_data["Portfolio data hook"]
  node_supabase_client["Supabase client<br/>[supabase.ts]"]
end

node_visitor(("Visitor"))
node_admin_actor(("Administrator"))
node_supabase_service[("Supabase service")]

node_visitor -->|"browses"| node_public
node_admin_actor -->|"opens admin"| node_app
node_app -->|"routes to"| node_public
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_dashboard
node_app -->|"reads session"| node_auth
node_app -->|"provides"| node_app_context
node_login -->|"signs in"| node_auth
node_public -->|"renders"| node_navbar
node_public -->|"renders"| node_hero
node_public -->|"renders"| node_about
node_public -->|"renders"| node_skills
node_public -->|"renders"| node_projects
node_public -->|"renders"| node_documents
node_public -->|"renders"| node_contact
node_public -->|"renders"| node_footer
node_public -->|"renders"| node_chat
node_public -->|"opens"| node_converter
node_public -->|"opens"| node_ocr
node_public -->|"opens"| node_qr
node_public -->|"opens"| node_vault
node_public -->|"opens"| node_flashcards
node_public -->|"opens"| node_wheel
node_public -->|"opens"| node_lightbox
node_about -->|"uses"| node_reveal
node_projects -->|"uses"| node_reveal
node_documents -->|"uses"| node_reveal
node_contact -->|"uses"| node_reveal
node_auth -->|"auth calls"| node_supabase_client
node_portfolio_data -->|"queries data"| node_supabase_client
node_supabase_client -.->|"connects"| node_supabase_service

click node_app "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/App.tsx"
click node_public "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/PublicSite.tsx"
click node_navbar "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/Navbar.tsx"
click node_hero "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/HeroSection.tsx"
click node_about "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/AboutSection.tsx"
click node_skills "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/SkillsSection.tsx"
click node_projects "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/ProjectsSection.tsx"
click node_documents "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/DocumentsSection.tsx"
click node_contact "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/ContactSection.tsx"
click node_footer "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/Footer.tsx"
click node_reveal "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/Reveal.tsx"
click node_chat "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/ChatAssistant.tsx"
click node_converter "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/ConverterModal.tsx"
click node_ocr "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/OcrModal.tsx"
click node_qr "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/QrGeneratorModal.tsx"
click node_vault "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/VaultModal.tsx"
click node_flashcards "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/FlashcardModal.tsx"
click node_wheel "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/SpinWheelModal.tsx"
click node_lightbox "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/Lightbox.tsx"
click node_login "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/AdminLogin.tsx"
click node_dashboard "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/AdminDashboard.tsx"
click node_auth "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/lib/auth.tsx"
click node_app_context "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/lib/app-context.tsx"
click node_portfolio_data "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/lib/use-portfolio-data.ts"
click node_supabase_client "https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/lib/supabase.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_public toneBlue
class node_navbar,node_hero,node_about,node_skills,node_projects,node_documents,node_contact,node_footer,node_reveal,node_supabase_service toneAmber
class node_chat,node_converter,node_ocr,node_qr,node_vault,node_flashcards,node_wheel,node_lightbox toneMint
class node_login,node_dashboard toneRose
class node_auth,node_app_context,node_portfolio_data,node_supabase_client,node_visitor,node_admin_actor toneIndigo
```

## Components

### Application entry

- [App routing](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/App.tsx): `src/App.tsx`
- [Public site](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/PublicSite.tsx): `src/components/PublicSite.tsx`

### Public portfolio

- [Navigation](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/Navbar.tsx): `src/components/Navbar.tsx`
- [Hero](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/HeroSection.tsx): `src/components/HeroSection.tsx`
- [About and tools](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/AboutSection.tsx): `src/components/AboutSection.tsx`
- [Skills](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/SkillsSection.tsx): `src/components/SkillsSection.tsx`
- [Projects](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/ProjectsSection.tsx): `src/components/ProjectsSection.tsx`
- [Documents](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/DocumentsSection.tsx): `src/components/DocumentsSection.tsx`
- [Contact](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/ContactSection.tsx): `src/components/ContactSection.tsx`
- [Footer](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`
- [Scroll reveal](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/Reveal.tsx): `src/components/Reveal.tsx`

### Visitor tools

- [Chat assistant](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/ChatAssistant.tsx): `src/components/ChatAssistant.tsx`
- [Converter](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/ConverterModal.tsx): `src/components/ConverterModal.tsx`
- [OCR tool](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/OcrModal.tsx): `src/components/OcrModal.tsx`
- [QR generator](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/QrGeneratorModal.tsx): `src/components/QrGeneratorModal.tsx`
- [Vault](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/VaultModal.tsx): `src/components/VaultModal.tsx`
- [Flashcards](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/FlashcardModal.tsx): `src/components/FlashcardModal.tsx`
- [Spin wheel](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/SpinWheelModal.tsx): `src/components/SpinWheelModal.tsx`
- [Image lightbox](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/Lightbox.tsx): `src/components/Lightbox.tsx`

### Administration

- [Admin login](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/AdminLogin.tsx): `src/components/AdminLogin.tsx`
- [Admin dashboard](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/components/AdminDashboard.tsx): `src/components/AdminDashboard.tsx`

### Shared services

- [Authentication context](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/lib/auth.tsx): `src/lib/auth.tsx`
- [Theme and language](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/lib/app-context.tsx): `src/lib/app-context.tsx`
- [Portfolio data hook](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/lib/use-portfolio-data.ts): `src/lib/use-portfolio-data.ts`
- [Supabase client](https://github.com/0978114331/khouvchvea-portfolio/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`

### Other components

- **Visitor**
- **Administrator**
- **Supabase service**

## Connections

- Visitor → Public site: browses (evidence: `src/components/PublicSite.tsx`)
- Administrator → App routing: opens admin (evidence: `src/App.tsx`)
- App routing → Public site: routes to (evidence: `src/App.tsx`)
- App routing → Admin login: routes to (evidence: `src/App.tsx`)
- App routing → Admin dashboard: routes to (evidence: `src/App.tsx`)
- App routing → Authentication context: reads session (evidence: `src/App.tsx`)
- App routing → Theme and language: provides (evidence: `src/App.tsx`)
- Admin login → Authentication context: signs in (evidence: `src/components/AdminLogin.tsx`)
- Public site → Navigation: renders (evidence: `src/components/PublicSite.tsx`)
- Public site → Hero: renders (evidence: `src/components/PublicSite.tsx`)
- Public site → About and tools: renders (evidence: `src/components/PublicSite.tsx`)
- Public site → Skills: renders (evidence: `src/components/PublicSite.tsx`)
- Public site → Projects: renders (evidence: `src/components/PublicSite.tsx`)
- Public site → Documents: renders (evidence: `src/components/PublicSite.tsx`)
- Public site → Contact: renders (evidence: `src/components/PublicSite.tsx`)
- Public site → Footer: renders (evidence: `src/components/PublicSite.tsx`)
- Public site → Chat assistant: renders (evidence: `src/components/PublicSite.tsx`)
- Public site → Converter: opens (evidence: `src/components/PublicSite.tsx`)
- Public site → OCR tool: opens (evidence: `src/components/PublicSite.tsx`)
- Public site → QR generator: opens (evidence: `src/components/PublicSite.tsx`)
- Public site → Vault: opens (evidence: `src/components/PublicSite.tsx`)
- Public site → Flashcards: opens (evidence: `src/components/PublicSite.tsx`)
- Public site → Spin wheel: opens (evidence: `src/components/PublicSite.tsx`)
- Public site → Image lightbox: opens (evidence: `src/components/PublicSite.tsx`)
- About and tools → Scroll reveal: uses (evidence: `src/components/AboutSection.tsx`)
- Projects → Scroll reveal: uses (evidence: `src/components/ProjectsSection.tsx`)
- Documents → Scroll reveal: uses (evidence: `src/components/DocumentsSection.tsx`)
- Contact → Scroll reveal: uses (evidence: `src/components/ContactSection.tsx`)
- Authentication context → Supabase client: auth calls (evidence: `src/lib/auth.tsx`)
- Portfolio data hook → Supabase client: queries data (evidence: `src/lib/use-portfolio-data.ts`)
- Supabase client → Supabase service: connects
