# dcr-dev-lab/portfolio-f architecture

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

- Interactive diagram: https://gitdiagram.com/dcr-dev-lab/portfolio-f
- Repository: https://github.com/dcr-dev-lab/portfolio-f

## Overview

This is a React portfolio frontend with public profile, project, skills, contact, and policy pages plus a token-protected admin area for editing portfolio content. The main visitor workflow routes to public pages, which present profile sections and fetch profile, project, and skill data; administrators authenticate and manage profile, projects, and skills through the backend API. The graph includes the shared routing and API layers. Several UI and admin implementation files were not excerpted, so their internal behavior is represented only where the source index or README supports it.

Main entry points: [`src/routes/AppRoutes.jsx`](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/routes/AppRoutes.jsx) (Route map), [`src/services/api.js`](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/services/api.js) (HTTP client), [`src/pages/public/Home.jsx`](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/public/Home.jsx) (Home page), [`src/services/profile.service.js`](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/services/profile.service.js) (Profile service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["App and routing"]
  node_app["App shell<br/>[App.jsx]"]
  node_routes["Route map<br/>[AppRoutes.jsx]"]
  node_guard["Protected routes<br/>[ProtectedRoute.jsx]"]
end

subgraph group_public["Public portfolio"]
  node_home["Home page<br/>[Home.jsx]"]
  node_profilesections["Profile sections"]
  node_projectspage["Projects page<br/>[Projects.jsx]"]
  node_skillspage["Skills page<br/>[Skills.jsx]"]
  node_contactpage["Contact page<br/>[Contact.jsx]"]
  node_policy["Policy pages"]
  node_nav["Navigation<br/>[Navbar.jsx]"]
  node_footer["Footer<br/>[Footer.jsx]"]
  node_projectcard["Project cards"]
  node_skillcard["Skill cards<br/>[SkillCard.jsx]"]
end

subgraph group_admin["Admin management"]
  node_login["Admin login<br/>[AdminLogin.jsx]"]
  node_dashboard["Admin dashboard<br/>[Dashboard.jsx]"]
  node_manageprojects["Project management<br/>[ManageProjects.jsx]"]
  node_projectcrud["Project forms and list"]
  node_manageskills["Skill management<br/>[ManageSkills.jsx]"]
  node_skillcrud["Skill forms and list"]
  node_adminprofile["Profile editor<br/>[AdminProfile.jsx]"]
end

subgraph group_data["API and services"]
  node_api["HTTP client<br/>[api.js]"]
  node_profileservice["Profile service<br/>[profile.service.js]"]
  node_projectservice["Project service<br/>[project.service.js]"]
  node_skillservice["Skill service<br/>[skill.service.js]"]
end

node_visitor(("Visitor"))
node_adminuser(("Administrator"))
node_backend["Backend API"]

node_visitor -->|"opens pages"| node_routes
node_adminuser -->|"opens admin"| node_routes
node_app -->|"renders"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_projectspage
node_routes -->|"routes to"| node_skillspage
node_routes -->|"routes to"| node_contactpage
node_routes -->|"routes to"| node_policy
node_routes -->|"routes to"| node_login
node_routes -->|"protects"| node_guard
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_manageprojects
node_routes -->|"routes to"| node_manageskills
node_routes -->|"routes to"| node_adminprofile
node_home -->|"renders"| node_profilesections
node_home -->|"fetches profile"| node_profileservice
node_home -->|"fetches projects"| node_projectservice
node_home -->|"fetches skills"| node_skillservice
node_projectspage -->|"fetches projects"| node_projectservice
node_projectspage -->|"renders"| node_projectcard
node_skillspage -->|"fetches skills"| node_skillservice
node_skillspage -->|"renders"| node_skillcard
node_contactpage -->|"fetches profile"| node_profileservice
node_footer -->|"fetches profile"| node_profileservice
node_manageprojects -->|"uses forms"| node_projectcrud
node_manageskills -->|"uses forms"| node_skillcrud
node_login -->|"calls"| node_api
node_adminprofile -->|"calls"| node_api
node_projectcrud -->|"calls"| node_api
node_projectcrud -->|"calls"| node_api
node_skillcrud -->|"calls"| node_api
node_skillcrud -->|"calls"| node_api
node_profileservice -->|"uses"| node_api
node_projectservice -->|"uses"| node_api
node_skillservice -->|"uses"| node_api
node_api -.->|"sends requests"| node_backend

click node_app "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/App.jsx"
click node_routes "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/routes/AppRoutes.jsx"
click node_guard "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/routes/ProtectedRoute.jsx"
click node_home "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/public/Home.jsx"
click node_profilesections "https://github.com/dcr-dev-lab/portfolio-f/tree/main/src/components/profile"
click node_projectspage "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/public/Projects.jsx"
click node_skillspage "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/public/Skills.jsx"
click node_contactpage "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/public/Contact.jsx"
click node_policy "https://github.com/dcr-dev-lab/portfolio-f/tree/main/src/pages/public"
click node_nav "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/components/common/Navbar.jsx"
click node_footer "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/components/common/Footer.jsx"
click node_projectcard "https://github.com/dcr-dev-lab/portfolio-f/tree/main/src/components/cards"
click node_skillcard "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/components/cards/skill/SkillCard.jsx"
click node_login "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/admin/AdminLogin.jsx"
click node_dashboard "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/admin/Dashboard.jsx"
click node_manageprojects "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/admin/projects/ManageProjects.jsx"
click node_projectcrud "https://github.com/dcr-dev-lab/portfolio-f/tree/main/src/pages/admin/projects"
click node_manageskills "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/admin/skills/ManageSkills.jsx"
click node_skillcrud "https://github.com/dcr-dev-lab/portfolio-f/tree/main/src/pages/admin/skills"
click node_adminprofile "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/admin/AdminProfile.jsx"
click node_api "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/services/api.js"
click node_profileservice "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/services/profile.service.js"
click node_projectservice "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/services/project.service.js"
click node_skillservice "https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/services/skill.service.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_app,node_routes,node_guard toneBlue
class node_home,node_profilesections,node_projectspage,node_skillspage,node_contactpage,node_policy,node_nav,node_footer,node_projectcard,node_skillcard toneAmber
class node_login,node_dashboard,node_manageprojects,node_projectcrud,node_manageskills,node_skillcrud,node_adminprofile,node_backend toneMint
class node_api,node_profileservice,node_projectservice,node_skillservice toneRose
class node_visitor,node_adminuser toneIndigo
```

## Components

### App and routing

- [App shell](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/App.jsx): `src/App.jsx`
- [Route map](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/routes/AppRoutes.jsx): `src/routes/AppRoutes.jsx`
- [Protected routes](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/routes/ProtectedRoute.jsx): `src/routes/ProtectedRoute.jsx`

### Public portfolio

- [Home page](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/public/Home.jsx): `src/pages/public/Home.jsx`
- [Profile sections](https://github.com/dcr-dev-lab/portfolio-f/tree/main/src/components/profile): `src/components/profile`
- [Projects page](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/public/Projects.jsx): `src/pages/public/Projects.jsx`
- [Skills page](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/public/Skills.jsx): `src/pages/public/Skills.jsx`
- [Contact page](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/public/Contact.jsx): `src/pages/public/Contact.jsx`
- [Policy pages](https://github.com/dcr-dev-lab/portfolio-f/tree/main/src/pages/public): `src/pages/public`
- [Navigation](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/components/common/Navbar.jsx): `src/components/common/Navbar.jsx`
- [Footer](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/components/common/Footer.jsx): `src/components/common/Footer.jsx`
- [Project cards](https://github.com/dcr-dev-lab/portfolio-f/tree/main/src/components/cards): `src/components/cards`
- [Skill cards](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/components/cards/skill/SkillCard.jsx): `src/components/cards/skill/SkillCard.jsx`

### Admin management

- [Admin login](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/admin/AdminLogin.jsx): `src/pages/admin/AdminLogin.jsx`
- [Admin dashboard](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/admin/Dashboard.jsx): `src/pages/admin/Dashboard.jsx`
- [Project management](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/admin/projects/ManageProjects.jsx): `src/pages/admin/projects/ManageProjects.jsx`
- [Project forms and list](https://github.com/dcr-dev-lab/portfolio-f/tree/main/src/pages/admin/projects): `src/pages/admin/projects`
- [Skill management](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/admin/skills/ManageSkills.jsx): `src/pages/admin/skills/ManageSkills.jsx`
- [Skill forms and list](https://github.com/dcr-dev-lab/portfolio-f/tree/main/src/pages/admin/skills): `src/pages/admin/skills`
- [Profile editor](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/pages/admin/AdminProfile.jsx): `src/pages/admin/AdminProfile.jsx`

### API and services

- [HTTP client](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/services/api.js): `src/services/api.js`
- [Profile service](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/services/profile.service.js): `src/services/profile.service.js`
- [Project service](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/services/project.service.js): `src/services/project.service.js`
- [Skill service](https://github.com/dcr-dev-lab/portfolio-f/blob/main/src/services/skill.service.js): `src/services/skill.service.js`

### Other components

- **Visitor**
- **Administrator**
- **Backend API**

## Connections

- Visitor → Route map: opens pages (evidence: `src/routes/AppRoutes.jsx`)
- Administrator → Route map: opens admin (evidence: `src/routes/AppRoutes.jsx`)
- App shell → Route map: renders (evidence: `src/App.jsx`)
- Route map → Home page: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route map → Projects page: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route map → Skills page: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route map → Contact page: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route map → Policy pages: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route map → Admin login: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route map → Protected routes: protects (evidence: `src/routes/AppRoutes.jsx`)
- Route map → Admin dashboard: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route map → Project management: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route map → Skill management: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Route map → Profile editor: routes to (evidence: `src/routes/AppRoutes.jsx`)
- Home page → Profile sections: renders (evidence: `src/pages/public/Home.jsx`)
- Home page → Profile service: fetches profile (evidence: `src/pages/public/Home.jsx`)
- Home page → Project service: fetches projects (evidence: `src/pages/public/Home.jsx`)
- Home page → Skill service: fetches skills (evidence: `src/pages/public/Home.jsx`)
- Projects page → Project service: fetches projects (evidence: `src/pages/public/Projects.jsx`)
- Projects page → Project cards: renders (evidence: `src/pages/public/Projects.jsx`)
- Skills page → Skill service: fetches skills (evidence: `src/pages/public/Skills.jsx`)
- Skills page → Skill cards: renders (evidence: `src/pages/public/Skills.jsx`)
- Contact page → Profile service: fetches profile (evidence: `src/pages/public/Contact.jsx`)
- Footer → Profile service: fetches profile (evidence: `src/components/common/Footer.jsx`)
- Project management → Project forms and list: uses forms (evidence: `src/pages/admin/projects/ManageProjects.jsx`)
- Skill management → Skill forms and list: uses forms (evidence: `src/pages/admin/skills/ManageSkills.jsx`)
- Admin login → HTTP client: calls (evidence: `src/pages/admin/AdminLogin.jsx`)
- Profile editor → HTTP client: calls (evidence: `src/pages/admin/AdminProfile.jsx`)
- Project forms and list → HTTP client: calls (evidence: `src/pages/admin/projects/AddProject.jsx`)
- Project forms and list → HTTP client: calls (evidence: `src/pages/admin/projects/EditProject.jsx`)
- Skill forms and list → HTTP client: calls (evidence: `src/pages/admin/skills/AddSkill.jsx`)
- Skill forms and list → HTTP client: calls (evidence: `src/pages/admin/skills/EditSkill.jsx`)
- Profile service → HTTP client: uses (evidence: `src/services/profile.service.js`)
- Project service → HTTP client: uses (evidence: `src/services/project.service.js`)
- Skill service → HTTP client: uses (evidence: `src/services/skill.service.js`)
- HTTP client → Backend API: sends requests (evidence: `README.md`)
