# iktisad/portfolio-iktisad architecture

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

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

## Overview

1. This repository is a single-page portfolio app built with React + TypeScript on top of Vite, with TailwindCSS 4 for styling. The app is mostly client-rendered and ships as a static frontend in production.

2. The application has two main runtime surfaces: the public portfolio site and a local admin dashboard. They are routed inside the same frontend, with `src/routes/AppRoutes.tsx` and page shells in `src/pages/HomePage.tsx` and `src/pages/AdminPage.tsx`.

3. The public site is a content-driven landing page composed of section components such as Hero, Experience, Education, Projects, Skills, Publications, Hackathon, Volunteering, and Contact. `src/App.tsx` and the section components likely assemble the full scrolling portfolio experience.

4. The content model is centralized in `src/data/data.json`. That JSON file is the source of truth for the portfolio’s editable content, and the UI reads from it to render the public sections and the admin editor.

5. The admin dashboard is a structured content editor rather than a general CMS. It has a sidebar (`AdminSidebar`), section-based views (`SectionView`), and modal editing (`EditModal`) for items like experiences, projects, skills, education, publications, hackathons, and volunteering.

6. Each content type has its own dedicated form component under `src/components/admin/forms`. Shared field primitives live in `src/components/admin/shared`, which suggests the admin UI is built from reusable form controls, array editors, image upload support, and rich text/description blocks.

7. Persistence is handled by a local Node.js API in `api/app.cjs`. The README states this API runs on port `3005` and is responsible for reading and writing `src/data/data.json`, so the admin dashboard persists changes through a file-backed local service rather than a remote database.

8. The data flow is: admin UI edits content in the browser, then “Save All” sends the full updated dataset to the local API, which writes back to the JSON file. The public portfolio then renders from that same JSON-backed content, keeping the site and editor tightly coupled around one data source.

9. There is an explicit environment boundary: `/dashboard` is only usable from localhost. The restriction is enforced client-side, and the API is intended as a local-only tool, not something deployed with the public site.

10. Presentation and interaction are augmented by a few cross-cutting UI systems: `ThemeContext` for theme state, sakura-related hooks for decorative effects, and a mix of local CSS files plus public assets for images, resumes, and project media.

11. The `public/` directory contains static assets for portfolio projects and images, plus `public/resume.html`, indicating the app serves downloadable or standalone static collateral in addition to the interactive portfolio.

12. From an architecture-diagram perspective, the key boxes are: static React frontend, route-based split between public site and admin dashboard, local file-backed Node API, and the shared JSON content store that feeds both read and write paths.

Main entry points: [`src/pages/AdminPage.tsx`](https://github.com/iktisad/portfolio-iktisad/blob/main/src/pages/AdminPage.tsx) (Admin page), [`src/pages/HomePage.tsx`](https://github.com/iktisad/portfolio-iktisad/blob/main/src/pages/HomePage.tsx) (Home page), [`src/App.tsx`](https://github.com/iktisad/portfolio-iktisad/blob/main/src/App.tsx) (App shell), [`src/routes/AppRoutes.tsx`](https://github.com/iktisad/portfolio-iktisad/blob/main/src/routes/AppRoutes.tsx) (Routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["React frontend"]
  node_vite_app["Vite app<br/>react+ts frontend<br/>[main.tsx]"]
  node_app_shell["App shell<br/>root component<br/>[App.tsx]"]
  node_routes["Routes<br/>route map<br/>[AppRoutes.tsx]"]
  node_theme(("Theme<br/>context<br/>[ThemeContext.tsx]"))
end

subgraph group_public["Public site"]
  node_home_page["Home page<br/>public page<br/>[HomePage.tsx]"]
  node_hero["Hero<br/>landing section<br/>[Hero.tsx]"]
  node_sections["Portfolio sections<br/>section set<br/>[Experience.tsx]"]
  node_nav_ui["Nav UI<br/>site chrome<br/>[Navbar.tsx]"]
end

subgraph group_admin["Admin dashboard"]
  node_admin_page["Admin page<br/>[AdminPage.tsx]"]
  node_sidebar["Sidebar<br/>admin navigation<br/>[AdminSidebar.tsx]"]
  node_section_view["Section view<br/>editor workspace<br/>[SectionView.tsx]"]
  node_edit_modal["Edit modal<br/>editor modal<br/>[EditModal.tsx]"]
  node_forms["Forms<br/>[ProjectForm.tsx]"]
  node_shared_fields["Field blocks<br/>form primitives<br/>[FormInput.tsx]"]
end

subgraph group_backend["Local API"]
  node_local_api["Local API<br/>node file API<br/>[app.cjs]"]
end

subgraph group_content["Shared content"]
  node_data_json["Content JSON<br/>source of truth<br/>[data.json]"]
  node_public_assets["Static assets<br/>media assets<br/>[resume.html]"]
end

node_vite_app -->|"boots"| node_app_shell
node_app_shell -->|"uses"| node_routes
node_app_shell -->|"provides"| node_theme
node_routes -->|"public"| node_home_page
node_routes -->|"dashboard"| node_admin_page
node_home_page -->|"renders"| node_hero
node_home_page -->|"renders"| node_sections
node_home_page -->|"uses"| node_nav_ui
node_sections -->|"reads"| node_data_json
node_admin_page -->|"uses"| node_sidebar
node_admin_page -->|"hosts"| node_section_view
node_section_view -->|"opens"| node_edit_modal
node_section_view -->|"renders"| node_forms
node_forms -->|"builds from"| node_shared_fields
node_admin_page -->|"edits"| node_data_json
node_admin_page -->|"saves"| node_local_api
node_local_api -->|"writes"| node_data_json
node_home_page -->|"uses"| node_public_assets
node_admin_page -->|"uploads"| node_public_assets

click node_vite_app "https://github.com/iktisad/portfolio-iktisad/blob/main/src/main.tsx"
click node_app_shell "https://github.com/iktisad/portfolio-iktisad/blob/main/src/App.tsx"
click node_routes "https://github.com/iktisad/portfolio-iktisad/blob/main/src/routes/AppRoutes.tsx"
click node_theme "https://github.com/iktisad/portfolio-iktisad/blob/main/src/context/ThemeContext.tsx"
click node_home_page "https://github.com/iktisad/portfolio-iktisad/blob/main/src/pages/HomePage.tsx"
click node_hero "https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/Hero.tsx"
click node_sections "https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/Experience.tsx"
click node_nav_ui "https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/Navbar.tsx"
click node_admin_page "https://github.com/iktisad/portfolio-iktisad/blob/main/src/pages/AdminPage.tsx"
click node_sidebar "https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/admin/AdminSidebar.tsx"
click node_section_view "https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/admin/SectionView.tsx"
click node_edit_modal "https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/admin/EditModal.tsx"
click node_forms "https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/admin/forms/ProjectForm.tsx"
click node_shared_fields "https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/admin/shared/FormInput.tsx"
click node_data_json "https://github.com/iktisad/portfolio-iktisad/blob/main/src/data/data.json"
click node_local_api "https://github.com/iktisad/portfolio-iktisad/blob/main/api/app.cjs"
click node_public_assets "https://github.com/iktisad/portfolio-iktisad/blob/main/public/resume.html"

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_vite_app,node_app_shell,node_routes,node_theme toneBlue
class node_home_page,node_hero,node_sections,node_nav_ui toneAmber
class node_admin_page,node_sidebar,node_section_view,node_edit_modal,node_forms,node_shared_fields toneMint
class node_local_api toneRose
class node_data_json,node_public_assets toneIndigo
```

## Components

### React frontend

Static Vite app that serves both the public portfolio and the admin dashboard.

- [Vite app](https://github.com/iktisad/portfolio-iktisad/blob/main/src/main.tsx): react+ts frontend · App bootstrap and production shell for the single-page site. · `src/main.tsx`
- [App shell](https://github.com/iktisad/portfolio-iktisad/blob/main/src/App.tsx): root component · Top-level composition for routing and global providers. · `src/App.tsx`
- [Routes](https://github.com/iktisad/portfolio-iktisad/blob/main/src/routes/AppRoutes.tsx): route map · Splits the frontend into public and admin surfaces. · `src/routes/AppRoutes.tsx`
- [Theme](https://github.com/iktisad/portfolio-iktisad/blob/main/src/context/ThemeContext.tsx): context · Global theme state shared across the UI. · `src/context/ThemeContext.tsx`

### Public site

Content-driven landing experience rendered from shared portfolio data.

- [Home page](https://github.com/iktisad/portfolio-iktisad/blob/main/src/pages/HomePage.tsx): public page · Page shell for the public scrolling portfolio. · `src/pages/HomePage.tsx`
- [Hero](https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/Hero.tsx): landing section · Introductory top section for the portfolio site. · `src/components/Hero.tsx`
- [Portfolio sections](https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/Experience.tsx): section set · Main content sections such as experience, education, projects, skills, publications, hackathon, volunteering, and contact. · `src/components/Experience.tsx`
- [Nav UI](https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/Navbar.tsx): site chrome · Shared navigation and floating interaction controls. · `src/components/Navbar.tsx`

### Admin dashboard

Local structured editor for updating portfolio content.

- [Admin page](https://github.com/iktisad/portfolio-iktisad/blob/main/src/pages/AdminPage.tsx): admin page · Page shell for the local content editor. · `src/pages/AdminPage.tsx`
- [Sidebar](https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/admin/AdminSidebar.tsx): admin navigation · Section navigator for the dashboard. · `src/components/admin/AdminSidebar.tsx`
- [Section view](https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/admin/SectionView.tsx): editor workspace · Main editing surface for one content section at a time. · `src/components/admin/SectionView.tsx`
- [Edit modal](https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/admin/EditModal.tsx): editor modal · Popup editor used to create or modify individual items. · `src/components/admin/EditModal.tsx`
- [Forms](https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/admin/forms/ProjectForm.tsx): content forms · Section-specific forms for experiences, projects, skills, education, publications, hackathons, volunteering, and contact. · `src/components/admin/forms/ProjectForm.tsx`
- [Field blocks](https://github.com/iktisad/portfolio-iktisad/blob/main/src/components/admin/shared/FormInput.tsx): form primitives · Reusable input, textarea, array, image, toggle, and rich text controls. · `src/components/admin/shared/FormInput.tsx`

### Local API

File-backed Node service used to persist dashboard edits.

- [Local API](https://github.com/iktisad/portfolio-iktisad/blob/main/api/app.cjs): node file API · Local persistence layer that reads and writes the JSON content file. · `api/app.cjs`

### Shared content

Central JSON data store and assets used by both read and write paths.

- [Content JSON](https://github.com/iktisad/portfolio-iktisad/blob/main/src/data/data.json): source of truth · Editable portfolio content shared by the public site and admin editor. · `src/data/data.json`
- [Static assets](https://github.com/iktisad/portfolio-iktisad/blob/main/public/resume.html): media assets · Project media, images, CSS, and downloadable collateral such as the resume. · `public/resume.html`

## Connections

- Vite app → App shell: boots · Bootstraps the root React application.
- App shell → Routes: uses · Delegates surface selection to the route map.
- App shell → Theme: provides · Makes theme state available across the app.
- Routes → Home page: public · Routes the default experience to the portfolio site.
- Routes → Admin page: dashboard · Routes localhost dashboard access to the editor.
- Home page → Hero: renders · Composes the top landing section.
- Home page → Portfolio sections: renders · Stacks the content sections into the scrolling portfolio.
- Home page → Nav UI: uses · Adds navigation and interaction chrome.
- Portfolio sections → Content JSON: reads · Renders section content from the shared JSON model.
- Admin page → Sidebar: uses · Provides section navigation inside the dashboard.
- Admin page → Section view: hosts · Main workspace for editing portfolio sections.
- Section view → Edit modal: opens · Uses modal editing for individual items.
- Section view → Forms: renders · Loads the appropriate form for each content type.
- Forms → Field blocks: builds from · Composes reusable field primitives into section editors.
- Admin page → Content JSON: edits · Reads current content into the dashboard state before saving.
- Admin page → Local API: saves · Sends the full updated dataset to local persistence.
- Local API → Content JSON: writes · Persists dashboard changes back to the JSON source of truth.
- Home page → Static assets: uses · References project media, images, and static collateral.
- Admin page → Static assets: uploads · Shares image and media assets for editable content.
