How iktisad/portfolio-iktisad works
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: AdminPage.tsx Admin page · HomePage.tsx Home page · App.tsx App shell · AppRoutes.tsx Routes
Components 17
React frontend
Static Vite app that serves both the public portfolio and the admin dashboard.
- Vite app · App bootstrap and production shell for the single-page site.
src/main.tsx - App shell · Top-level composition for routing and global providers.
src/App.tsx - Routes · Splits the frontend into public and admin surfaces.
src/routes/AppRoutes.tsx - Theme · Global theme state shared across the UI.
src/context/ThemeContext.tsx
Public site
Content-driven landing experience rendered from shared portfolio data.
- Home page · Page shell for the public scrolling portfolio.
src/pages/HomePage.tsx - Hero · Introductory top section for the portfolio site.
src/components/Hero.tsx - Portfolio sections · Main content sections such as experience, education, projects, skills, publications, hackathon, volunteering, and contact.
src/components/Experience.tsx - Nav UI · Shared navigation and floating interaction controls.
src/components/Navbar.tsx
Admin dashboard
Local structured editor for updating portfolio content.
- Admin page · Page shell for the local content editor.
src/pages/AdminPage.tsx - Sidebar · Section navigator for the dashboard.
src/components/admin/AdminSidebar.tsx - Section view · Main editing surface for one content section at a time.
src/components/admin/SectionView.tsx - Edit modal · Popup editor used to create or modify individual items.
src/components/admin/EditModal.tsx - Forms · Section-specific forms for experiences, projects, skills, education, publications, hackathons, volunteering, and contact.
src/components/admin/forms/ProjectForm.tsx - Field blocks · 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 · 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 · Editable portfolio content shared by the public site and admin editor.
src/data/data.json - Static assets · Project media, images, CSS, and downloadable collateral such as the resume.
public/resume.html
Connections 19
- 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.