# chunchunmaru25/portfolio architecture

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

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

## Overview

This is a portfolio website with a public-facing showcase and an authenticated admin area for maintaining portfolio content. Visitors enter the React app to view projects, skills, resume material, FAQs, and contact information; administrators use protected pages to edit content through the Express API. The API routes requests to domain controllers, which persist records through Prisma/PostgreSQL and use Supabase Storage for project images. Edges reflect the supplied excerpts, SOURCE INDEX references, and README; unsampled frontend-to-API wiring is not asserted.

Main entry points: [`frontend/src/App.tsx`](https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/App.tsx) (Route composition), [`backend/src/database/database.js`](https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/database/database.js) (Prisma database client), [`backend/app.js`](https://github.com/chunchunmaru25/portfolio/blob/main/backend/app.js) (Express application), [`frontend/src/pages/index.tsx`](https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/index.tsx) (Public portfolio)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Portfolio website"]
  node_frontend_entry["React entry<br/>[main.tsx]"]
  node_frontend_app["Route composition<br/>[App.tsx]"]
  node_public_content["Public portfolio<br/>[index.tsx]"]
  node_portfolio_sections["Showcase sections"]
  node_theme["Theme control<br/>[useTheme.tsx]"]
  node_contact["Contact form<br/>[Contact.tsx]"]
end

subgraph group_admin["Admin interface"]
  node_admin_auth["Admin login<br/>[auth.tsx]"]
  node_route_guard["Protected routes"]
  node_admin_panel["Content dashboard<br/>[controlPanel.tsx]"]
  node_project_editor["Project editing<br/>[addProjects.tsx]"]
  node_resume_editor["Resume editing<br/>[addExperience.tsx]"]
  node_tech_editor["Tech stack editing<br/>[addTechStack.tsx]"]
end

subgraph group_api["REST API"]
  node_api_app["Express application<br/>[app.js]"]
  node_project_routes["Project routes<br/>[projects.router.js]"]
  node_auth_routes["Auth routes<br/>[auth.router.js]"]
  node_resume_routes["Resume routes"]
  node_skill_routes["Skill routes<br/>[frontendSkills.js]"]
end

subgraph group_content["Content services"]
  node_content_controllers["Content controllers"]
  node_experience_controller["Experience controller"]
  node_skill_controller["Frontend skill controller"]
  node_auth_controller["Authentication controller<br/>[auth.controller.js]"]
end

subgraph group_storage["Persistence and media"]
  node_prisma_client["Prisma database client<br/>[database.js]"]
  node_postgres[("PostgreSQL")]
  node_supabase_media[("Supabase object storage")]
end

node_visitor(("Portfolio visitor"))

node_visitor -->|"opens"| node_frontend_entry
node_frontend_entry -->|"renders"| node_frontend_app
node_frontend_app -->|"routes"| node_public_content
node_frontend_app -->|"routes"| node_admin_auth
node_frontend_app -->|"routes"| node_admin_panel
node_frontend_app -->|"routes"| node_project_editor
node_frontend_app -->|"routes"| node_resume_editor
node_frontend_app -->|"routes"| node_tech_editor
node_frontend_app -->|"guards"| node_route_guard
node_public_content -.->|"presents"| node_portfolio_sections
node_public_content -.->|"offers"| node_theme
node_public_content -.->|"includes"| node_contact
node_api_app -->|"mounts"| node_project_routes
node_api_app -->|"mounts"| node_auth_routes
node_api_app -->|"mounts"| node_resume_routes
node_api_app -->|"mounts"| node_skill_routes
node_project_routes -->|"dispatches"| node_content_controllers
node_resume_routes -->|"dispatches"| node_experience_controller
node_skill_routes -->|"dispatches"| node_skill_controller
node_auth_routes -->|"dispatches"| node_auth_controller
node_content_controllers -->|"queries"| node_prisma_client
node_experience_controller -->|"queries"| node_prisma_client
node_skill_controller -->|"queries"| node_prisma_client
node_auth_controller -->|"queries"| node_prisma_client
node_content_controllers -->|"uploads media"| node_supabase_media
node_prisma_client -->|"persists records"| node_postgres

click node_frontend_entry "https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/main.tsx"
click node_frontend_app "https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/App.tsx"
click node_public_content "https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/index.tsx"
click node_portfolio_sections "https://github.com/chunchunmaru25/portfolio/tree/main/frontend/src/components/sections/index"
click node_theme "https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/components/hooks/useTheme.tsx"
click node_contact "https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/components/sections/index/Contact.tsx"
click node_admin_auth "https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/auth.tsx"
click node_route_guard "https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/auth/auth.middleware.tsx"
click node_admin_panel "https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/controlPanel.tsx"
click node_project_editor "https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/projects/addProjects.tsx"
click node_resume_editor "https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/experience/addExperience.tsx"
click node_tech_editor "https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/techStack/addTechStack.tsx"
click node_api_app "https://github.com/chunchunmaru25/portfolio/blob/main/backend/app.js"
click node_project_routes "https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/routes/projects.router.js"
click node_auth_routes "https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/routes/auth.router.js"
click node_resume_routes "https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/routes/experience.router.js"
click node_skill_routes "https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/routes/frontendSkills.js"
click node_content_controllers "https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/controllers/project.controller.js"
click node_experience_controller "https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/controllers/resume/experience.controller.js"
click node_skill_controller "https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/controllers/skills/frontendSkills.controller.js"
click node_auth_controller "https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/controllers/auth.controller.js"
click node_prisma_client "https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/database/database.js"

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_frontend_entry,node_frontend_app,node_public_content,node_portfolio_sections,node_theme,node_contact toneBlue
class node_admin_auth,node_route_guard,node_admin_panel,node_project_editor,node_resume_editor,node_tech_editor toneAmber
class node_api_app,node_project_routes,node_auth_routes,node_resume_routes,node_skill_routes toneMint
class node_content_controllers,node_experience_controller,node_skill_controller,node_auth_controller toneRose
class node_prisma_client,node_postgres,node_supabase_media,node_visitor toneIndigo
```

## Components

### Portfolio website

- [React entry](https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/main.tsx): `frontend/src/main.tsx`
- [Route composition](https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Public portfolio](https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/index.tsx): `frontend/src/pages/index.tsx`
- [Showcase sections](https://github.com/chunchunmaru25/portfolio/tree/main/frontend/src/components/sections/index): `frontend/src/components/sections/index`
- [Theme control](https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/components/hooks/useTheme.tsx): `frontend/src/components/hooks/useTheme.tsx`
- [Contact form](https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/components/sections/index/Contact.tsx): `frontend/src/components/sections/index/Contact.tsx`

### Admin interface

- [Admin login](https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/auth.tsx): `frontend/src/pages/auth.tsx`
- [Protected routes](https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/auth/auth.middleware.tsx): `frontend/src/pages/auth/auth.middleware.tsx`
- [Content dashboard](https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/controlPanel.tsx): `frontend/src/pages/controlPanel.tsx`
- [Project editing](https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/projects/addProjects.tsx): `frontend/src/pages/projects/addProjects.tsx`
- [Resume editing](https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/experience/addExperience.tsx): `frontend/src/pages/experience/addExperience.tsx`
- [Tech stack editing](https://github.com/chunchunmaru25/portfolio/blob/main/frontend/src/pages/techStack/addTechStack.tsx): `frontend/src/pages/techStack/addTechStack.tsx`

### REST API

- [Express application](https://github.com/chunchunmaru25/portfolio/blob/main/backend/app.js): `backend/app.js`
- [Project routes](https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/routes/projects.router.js): `backend/src/routes/projects.router.js`
- [Auth routes](https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/routes/auth.router.js): `backend/src/routes/auth.router.js`
- [Resume routes](https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/routes/experience.router.js): `backend/src/routes/experience.router.js`
- [Skill routes](https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/routes/frontendSkills.js): `backend/src/routes/frontendSkills.js`

### Content services

- [Content controllers](https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/controllers/project.controller.js): `backend/src/controllers/project.controller.js`
- [Experience controller](https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/controllers/resume/experience.controller.js): `backend/src/controllers/resume/experience.controller.js`
- [Frontend skill controller](https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/controllers/skills/frontendSkills.controller.js): `backend/src/controllers/skills/frontendSkills.controller.js`
- [Authentication controller](https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/controllers/auth.controller.js): `backend/src/controllers/auth.controller.js`

### Persistence and media

- [Prisma database client](https://github.com/chunchunmaru25/portfolio/blob/main/backend/src/database/database.js): `backend/src/database/database.js`
- **PostgreSQL**
- **Supabase object storage**

### Other components

- **Portfolio visitor**

## Connections

- Portfolio visitor → React entry: opens
- React entry → Route composition: renders (evidence: `frontend/src/main.tsx`)
- Route composition → Public portfolio: routes (evidence: `frontend/src/App.tsx`)
- Route composition → Admin login: routes (evidence: `frontend/src/App.tsx`)
- Route composition → Content dashboard: routes (evidence: `frontend/src/App.tsx`)
- Route composition → Project editing: routes (evidence: `frontend/src/App.tsx`)
- Route composition → Resume editing: routes (evidence: `frontend/src/App.tsx`)
- Route composition → Tech stack editing: routes (evidence: `frontend/src/App.tsx`)
- Route composition → Protected routes: guards (evidence: `frontend/src/App.tsx`)
- Public portfolio → Showcase sections: presents
- Public portfolio → Theme control: offers
- Public portfolio → Contact form: includes
- Express application → Project routes: mounts (evidence: `backend/app.js`)
- Express application → Auth routes: mounts (evidence: `backend/app.js`)
- Express application → Resume routes: mounts (evidence: `backend/app.js`)
- Express application → Skill routes: mounts (evidence: `backend/app.js`)
- Project routes → Content controllers: dispatches (evidence: `backend/src/routes/projects.router.js`)
- Resume routes → Experience controller: dispatches (evidence: `backend/src/routes/experience.router.js`)
- Skill routes → Frontend skill controller: dispatches (evidence: `backend/src/routes/frontendSkills.js`)
- Auth routes → Authentication controller: dispatches (evidence: `backend/src/routes/auth.router.js`)
- Content controllers → Prisma database client: queries (evidence: `backend/src/controllers/project.controller.js`)
- Experience controller → Prisma database client: queries (evidence: `backend/src/controllers/resume/experience.controller.js`)
- Frontend skill controller → Prisma database client: queries (evidence: `backend/src/controllers/skills/frontendSkills.controller.js`)
- Authentication controller → Prisma database client: queries (evidence: `backend/src/controllers/auth.controller.js`)
- Content controllers → Supabase object storage: uploads media (evidence: `backend/src/controllers/project.controller.js`)
- Prisma database client → PostgreSQL: persists records (evidence: `backend/src/database/database.js`)
