# inescherif/frontendpfe architecture

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

- Interactive diagram: https://gitdiagram.com/inescherif/frontendpfe
- Repository: https://github.com/inescherif/frontendpfe

## Overview

1. This repository is a **React + Vite single-page frontend**. The app boots from `src/main.jsx`, with `src/App.jsx` likely acting as the top-level composition and routing shell. There is no backend code in the repo, so the main architectural boundary is **UI/client code vs. external API services**.

2. The application is organized around **role-based pages** under `src/pages`: `auth`, `student`, `supervisor`, `company`, and `dashboard`. That structure suggests the UI is segmented by user type and access context, with separate screens for each audience rather than one generic workspace.

3. The dominant business domain appears to be **project/work management**. Feature areas include **meetings**, **tasks**, **user stories**, **sprints**, **validations**, and **reports**. These are not isolated widgets; they represent the core workflows the frontend orchestrates across the role-specific pages.

4. The architecture follows a clear **page → feature component → service** flow. Pages such as `StudentPage.jsx`, `SupervisorPage.jsx`, `CompanyPage.jsx`, and the various `*Page.jsx` files likely assemble feature boards and modals. Feature components live in `src/components/*` and are grouped by domain, while `src/services/*` contains the API integration layer.

5. Each domain has its own **presentation subcomponents**:
   - `meetings`: board, list/card, header, modal, validation modal, status badge
   - `userStory`: board, card, header, modal, status badge
   - `sprint`: card, modal, progress, status badge
   - `tasks`: evaluation and validation history modals
   - `validations`: board
   This indicates a **card/board/modal-centric UI model** for managing records and state transitions.

6. The **shared UI boundary** is intentionally separated. `src/components/Navbar.jsx` provides global navigation, while `src/components/message` contains reusable feedback UI like `Toast` and `ToastConfirm`. Modal styling is centralized in `src/styles/modal.css`, which suggests the app relies heavily on overlay-driven interactions for CRUD and approval flows.

7. The **stateful customization layer** is split between reusable hooks and page-local hooks. `src/hooks/Usetoast.js` is a shared toast helper, while `src/pages/student/myproject/hooks/useMyProject.js` is scoped to the student “My Project” experience. That implies global cross-cutting notification behavior plus feature-specific state management for complex screens.

8. The **student My Project area** is a notable sub-application. It has its own page, local hook, and tabbed views in `tabs/TabProject.jsx`, `TabReports.jsx`, and `TabSprints.jsx`. Architecturally, this is a nested workspace inside the student role with its own internal navigation and domain-specific panels.

9. The `src/services` layer is the main **network/data access boundary**. Separate modules exist for `auth`, `meeting`, `project`, `report`, `sprint`, `task`, `user`, `userStory`, and `validation`, which implies each domain has its own backend contract. This separation is important for diagramming because the UI does not appear to call APIs directly from components; services are the integration layer.

10. Cross-cutting utilities support the app’s operational concerns:
   - `src/utils/Apierror.js` likely normalizes or classifies API failures
   - `src/utils/Reportgenerator.js` suggests report creation/export behavior
   These utilities sit beneath the UI and above the service layer, handling error shaping and output generation.

11. Styling is **feature-scoped rather than monolithic**. Alongside global styles (`index.css`, `App.css`), there are domain stylesheets like `meeting.css`, `tasks.css`, `userstory.css`, `student.css`, `supervisor.css`, `auth.css`, and `myproject.css`. That layout suggests each major workflow has its own visual rules, which is useful to reflect in an architecture diagram as a presentation-layer concern.

12. Overall, the repository is best diagrammed as a **frontend shell with role-based route pages, feature-oriented UI modules, a service-driven API boundary, and shared feedback/navigation primitives**. The key data flow is: user interacts with a role page → page composes domain components/modals → components invoke service modules → utilities normalize errors or generate reports → UI updates via toasts/modals/status badges.

Main entry points: [`src/utils/Apierror.js`](https://github.com/inescherif/frontendpfe/blob/main/src/utils/Apierror.js) (API error), [`src/App.jsx`](https://github.com/inescherif/frontendpfe/blob/main/src/App.jsx) (App), [`src/pages/student/StudentPage.jsx`](https://github.com/inescherif/frontendpfe/blob/main/src/pages/student/StudentPage.jsx) (Student), [`src/pages/student/myproject/MyProjectPage.jsx`](https://github.com/inescherif/frontendpfe/blob/main/src/pages/student/myproject/MyProjectPage.jsx) (My Project)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_main(("main<br/>entry<br/>[main.jsx]"))
  node_app["App<br/>shell<br/>[App.jsx]"]
end

subgraph group_pages["Pages"]
  node_authpage["Auth<br/>page<br/>[AuthPage.jsx]"]
  node_dashboardpage["Dashboard<br/>page<br/>[Dashboardpage.jsx]"]
  node_companypage["Company<br/>page<br/>[CompanyPage.jsx]"]
  node_supervisorpage["Supervisor<br/>page<br/>[SupervisorPage.jsx]"]
end

subgraph group_student["Student workspace"]
  node_studentpage["Student<br/>page<br/>[StudentPage.jsx]"]
  node_myproject["My Project<br/>workspace<br/>[MyProjectPage.jsx]"]
  node_tabproject["Project tab<br/>view<br/>[TabProject.jsx]"]
  node_tabreports["Reports tab<br/>view<br/>[TabReports.jsx]"]
  node_tabsprints["Sprints tab<br/>view<br/>[TabSprints.jsx]"]
end

subgraph group_features["Feature components"]
  node_meetingboard["Meetings<br/>domain UI<br/>[MeetingBoard.jsx]"]
  node_userstoryboard["User stories<br/>domain UI<br/>[UserStoryBoard.jsx]"]
  node_sprintcard["Sprints<br/>domain UI<br/>[SprintCard.jsx]"]
  node_taskmodals["Tasks<br/>domain UI<br/>[Taskmodals.jsx]"]
  node_validationsboard["Validations<br/>domain UI"]
end

subgraph group_shared["Shared UI"]
  node_navbar["Navbar<br/>navigation<br/>[Navbar.jsx]"]
  node_toast["Toast<br/>feedback<br/>[Toast.jsx]"]
  node_toastconfirm["Confirm<br/>feedback<br/>[ToastConfirm.jsx]"]
  node_usetoast{{"useToast<br/>hook<br/>[Usetoast.js]"}}
  node_apierror{{"API error<br/>[Apierror.js]"}}
  node_reportgen{{"Report gen<br/>[Reportgenerator.js]"}}
end

subgraph group_services["Services"]
  node_meetingservice[("Meeting API<br/>[meetingService.js]")]
  node_userstoryservice[("Story API")]
  node_sprintservice[("Sprint API<br/>[sprintService.js]")]
  node_taskservice[("Task API<br/>[taskService.js]")]
  node_validationservice[("Validation API")]
  node_reportservice[("Report API<br/>[reportService.js]")]
  node_projectservice[("Project API<br/>[projectService.js]")]
  node_authservice[("Auth API<br/>[authService.js]")]
end

node_main -->|"boots"| node_app
node_app -->|"shares nav"| node_navbar
node_app -->|"routes to"| node_authpage
node_app -->|"routes to"| node_dashboardpage
node_app -->|"routes to"| node_companypage
node_app -->|"routes to"| node_supervisorpage
node_app -->|"routes to"| node_studentpage
node_studentpage -->|"contains"| node_myproject
node_myproject -->|"switches"| node_tabproject
node_myproject -->|"switches"| node_tabreports
node_myproject -->|"switches"| node_tabsprints
node_studentpage -->|"uses"| node_meetingboard
node_studentpage -->|"uses"| node_userstoryboard
node_studentpage -->|"uses"| node_taskmodals
node_studentpage -->|"uses"| node_validationsboard
node_companypage -->|"uses"| node_meetingboard
node_companypage -->|"uses"| node_validationsboard
node_supervisorpage -->|"uses"| node_meetingboard
node_supervisorpage -->|"uses"| node_validationsboard
node_meetingboard -->|"calls"| node_meetingservice
node_userstoryboard -->|"calls"| node_userstoryservice
node_sprintcard -->|"calls"| node_sprintservice
node_taskmodals -->|"calls"| node_taskservice
node_validationsboard -->|"calls"| node_validationservice
node_reportgen -.->|"supports"| node_reportservice
node_usetoast -->|"drives"| node_toast
node_toast -.->|"pairs with"| node_toastconfirm
node_apierror -.->|"normalizes"| node_meetingservice
node_apierror -.->|"normalizes"| node_userstoryservice
node_apierror -.->|"normalizes"| node_sprintservice
node_apierror -.->|"normalizes"| node_taskservice
node_apierror -.->|"normalizes"| node_validationservice
node_apierror -.->|"normalizes"| node_reportservice
node_apierror -.->|"normalizes"| node_projectservice
node_apierror -.->|"normalizes"| node_authservice

click node_main "https://github.com/inescherif/frontendpfe/blob/main/src/main.jsx"
click node_app "https://github.com/inescherif/frontendpfe/blob/main/src/App.jsx"
click node_authpage "https://github.com/inescherif/frontendpfe/blob/main/src/pages/auth/AuthPage.jsx"
click node_dashboardpage "https://github.com/inescherif/frontendpfe/blob/main/src/pages/dashboard/Dashboardpage.jsx"
click node_companypage "https://github.com/inescherif/frontendpfe/blob/main/src/pages/company/CompanyPage.jsx"
click node_supervisorpage "https://github.com/inescherif/frontendpfe/blob/main/src/pages/supervisor/SupervisorPage.jsx"
click node_studentpage "https://github.com/inescherif/frontendpfe/blob/main/src/pages/student/StudentPage.jsx"
click node_myproject "https://github.com/inescherif/frontendpfe/blob/main/src/pages/student/myproject/MyProjectPage.jsx"
click node_tabproject "https://github.com/inescherif/frontendpfe/blob/main/src/pages/student/myproject/tabs/TabProject.jsx"
click node_tabreports "https://github.com/inescherif/frontendpfe/blob/main/src/pages/student/myproject/tabs/TabReports.jsx"
click node_tabsprints "https://github.com/inescherif/frontendpfe/blob/main/src/pages/student/myproject/tabs/TabSprints.jsx"
click node_navbar "https://github.com/inescherif/frontendpfe/blob/main/src/components/Navbar.jsx"
click node_toast "https://github.com/inescherif/frontendpfe/blob/main/src/components/message/Toast.jsx"
click node_toastconfirm "https://github.com/inescherif/frontendpfe/blob/main/src/components/message/ToastConfirm.jsx"
click node_usetoast "https://github.com/inescherif/frontendpfe/blob/main/src/hooks/Usetoast.js"
click node_apierror "https://github.com/inescherif/frontendpfe/blob/main/src/utils/Apierror.js"
click node_reportgen "https://github.com/inescherif/frontendpfe/blob/main/src/utils/Reportgenerator.js"
click node_meetingboard "https://github.com/inescherif/frontendpfe/blob/main/src/components/meetings/MeetingBoard.jsx"
click node_userstoryboard "https://github.com/inescherif/frontendpfe/blob/main/src/components/userStory/UserStoryBoard.jsx"
click node_sprintcard "https://github.com/inescherif/frontendpfe/blob/main/src/components/sprint/SprintCard.jsx"
click node_taskmodals "https://github.com/inescherif/frontendpfe/blob/main/src/components/tasks/Taskmodals.jsx"
click node_validationsboard "https://github.com/inescherif/frontendpfe/blob/main/src/components/validations/ValidationsBoard.jsx"
click node_meetingservice "https://github.com/inescherif/frontendpfe/blob/main/src/services/meetingService.js"
click node_userstoryservice "https://github.com/inescherif/frontendpfe/blob/main/src/services/userStoryService.js"
click node_sprintservice "https://github.com/inescherif/frontendpfe/blob/main/src/services/sprintService.js"
click node_taskservice "https://github.com/inescherif/frontendpfe/blob/main/src/services/taskService.js"
click node_validationservice "https://github.com/inescherif/frontendpfe/blob/main/src/services/validationService.js"
click node_reportservice "https://github.com/inescherif/frontendpfe/blob/main/src/services/reportService.js"
click node_projectservice "https://github.com/inescherif/frontendpfe/blob/main/src/services/projectService.js"
click node_authservice "https://github.com/inescherif/frontendpfe/blob/main/src/services/authService.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_main,node_app toneBlue
class node_authpage,node_dashboardpage,node_companypage,node_supervisorpage toneAmber
class node_studentpage,node_myproject,node_tabproject,node_tabreports,node_tabsprints toneMint
class node_meetingboard,node_userstoryboard,node_sprintcard,node_taskmodals,node_validationsboard toneRose
class node_navbar,node_toast,node_toastconfirm,node_usetoast,node_apierror,node_reportgen toneIndigo
class node_meetingservice,node_userstoryservice,node_sprintservice,node_taskservice,node_validationservice,node_reportservice,node_projectservice,node_authservice toneTeal
```

## Components

### App shell

Bootstrap and top-level composition

- [main](https://github.com/inescherif/frontendpfe/blob/main/src/main.jsx): entry · Vite entry point · `src/main.jsx`
- [App](https://github.com/inescherif/frontendpfe/blob/main/src/App.jsx): shell · Top-level UI composition and routing shell · `src/App.jsx`

### Pages

Role-based screens and route-level views

- [Auth](https://github.com/inescherif/frontendpfe/blob/main/src/pages/auth/AuthPage.jsx): page · Authentication screen · `src/pages/auth/AuthPage.jsx`
- [Dashboard](https://github.com/inescherif/frontendpfe/blob/main/src/pages/dashboard/Dashboardpage.jsx): page · General dashboard view · `src/pages/dashboard/Dashboardpage.jsx`
- [Company](https://github.com/inescherif/frontendpfe/blob/main/src/pages/company/CompanyPage.jsx): page · Company-facing workspace · `src/pages/company/CompanyPage.jsx`
- [Supervisor](https://github.com/inescherif/frontendpfe/blob/main/src/pages/supervisor/SupervisorPage.jsx): page · Supervisor workspace · `src/pages/supervisor/SupervisorPage.jsx`

### Student workspace

Student-specific pages and nested My Project area

- [Student](https://github.com/inescherif/frontendpfe/blob/main/src/pages/student/StudentPage.jsx): page · Student workspace hub · `src/pages/student/StudentPage.jsx`
- [My Project](https://github.com/inescherif/frontendpfe/blob/main/src/pages/student/myproject/MyProjectPage.jsx): workspace · Nested student project area · `src/pages/student/myproject/MyProjectPage.jsx`
- [Project tab](https://github.com/inescherif/frontendpfe/blob/main/src/pages/student/myproject/tabs/TabProject.jsx): view · Project overview tab · `src/pages/student/myproject/tabs/TabProject.jsx`
- [Reports tab](https://github.com/inescherif/frontendpfe/blob/main/src/pages/student/myproject/tabs/TabReports.jsx): view · Report tab inside My Project · `src/pages/student/myproject/tabs/TabReports.jsx`
- [Sprints tab](https://github.com/inescherif/frontendpfe/blob/main/src/pages/student/myproject/tabs/TabSprints.jsx): view · Sprint tab inside My Project · `src/pages/student/myproject/tabs/TabSprints.jsx`

### Feature components

Domain UI building blocks

- [Meetings](https://github.com/inescherif/frontendpfe/blob/main/src/components/meetings/MeetingBoard.jsx): domain UI · Meeting board and record actions · `src/components/meetings/MeetingBoard.jsx`
- [User stories](https://github.com/inescherif/frontendpfe/blob/main/src/components/userStory/UserStoryBoard.jsx): domain UI · User story board and cards · `src/components/userStory/UserStoryBoard.jsx`
- [Sprints](https://github.com/inescherif/frontendpfe/blob/main/src/components/sprint/SprintCard.jsx): domain UI · Sprint presentation and progress · `src/components/sprint/SprintCard.jsx`
- [Tasks](https://github.com/inescherif/frontendpfe/blob/main/src/components/tasks/Taskmodals.jsx): domain UI · Task evaluation and validation modals · `src/components/tasks/Taskmodals.jsx`
- [Validations](https://github.com/inescherif/frontendpfe/blob/main/src/components/validations/ValidationsBoard.jsx): domain UI · Validation board · `src/components/validations/ValidationsBoard.jsx`

### Shared UI

Cross-cutting navigation, feedback, hooks, and utilities

- [Navbar](https://github.com/inescherif/frontendpfe/blob/main/src/components/Navbar.jsx): navigation · Global navigation · `src/components/Navbar.jsx`
- [Toast](https://github.com/inescherif/frontendpfe/blob/main/src/components/message/Toast.jsx): feedback · Reusable notification UI · `src/components/message/Toast.jsx`
- [Confirm](https://github.com/inescherif/frontendpfe/blob/main/src/components/message/ToastConfirm.jsx): feedback · Confirmation toast UI · `src/components/message/ToastConfirm.jsx`
- [useToast](https://github.com/inescherif/frontendpfe/blob/main/src/hooks/Usetoast.js): hook · Shared toast helper · `src/hooks/Usetoast.js`
- [API error](https://github.com/inescherif/frontendpfe/blob/main/src/utils/Apierror.js): utility · Error normalization helper · `src/utils/Apierror.js`
- [Report gen](https://github.com/inescherif/frontendpfe/blob/main/src/utils/Reportgenerator.js): utility · Report generation helper · `src/utils/Reportgenerator.js`

### Services

API integration boundary

- [Meeting API](https://github.com/inescherif/frontendpfe/blob/main/src/services/meetingService.js): service · Meeting backend contract · `src/services/meetingService.js`
- [Story API](https://github.com/inescherif/frontendpfe/blob/main/src/services/userStoryService.js): service · User story backend contract · `src/services/userStoryService.js`
- [Sprint API](https://github.com/inescherif/frontendpfe/blob/main/src/services/sprintService.js): service · Sprint backend contract · `src/services/sprintService.js`
- [Task API](https://github.com/inescherif/frontendpfe/blob/main/src/services/taskService.js): service · Task backend contract · `src/services/taskService.js`
- [Validation API](https://github.com/inescherif/frontendpfe/blob/main/src/services/validationService.js): service · Validation backend contract · `src/services/validationService.js`
- [Report API](https://github.com/inescherif/frontendpfe/blob/main/src/services/reportService.js): service · Report backend contract · `src/services/reportService.js`
- [Project API](https://github.com/inescherif/frontendpfe/blob/main/src/services/projectService.js): service · Project backend contract · `src/services/projectService.js`
- [Auth API](https://github.com/inescherif/frontendpfe/blob/main/src/services/authService.js): service · Authentication backend contract · `src/services/authService.js`

## Connections

- main → App: boots · Application entry mounts top-level shell
- App → Navbar: shares nav · Shell provides global navigation
- App → Auth: routes to · Authentication entry screen
- App → Dashboard: routes to · General dashboard route
- App → Company: routes to · Company workspace route
- App → Supervisor: routes to · Supervisor workspace route
- App → Student: routes to · Student workspace route
- Student → My Project: contains · Student hub opens nested project workspace
- My Project → Project tab: switches · Tabbed project overview
- My Project → Reports tab: switches · Tabbed reports view
- My Project → Sprints tab: switches · Tabbed sprint view
- Student → Meetings: uses · Student meetings workflow
- Student → User stories: uses · Student user story workflow
- Student → Tasks: uses · Student task workflow
- Student → Validations: uses · Student validations workflow
- Company → Meetings: uses · Company meetings workflow
- Company → Validations: uses · Company validations workflow
- Supervisor → Meetings: uses · Supervisor meetings workflow
- Supervisor → Validations: uses · Supervisor validations workflow
- Meetings → Meeting API: calls · Meeting UI talks to meeting API
- User stories → Story API: calls · User story UI talks to story API
- Sprints → Sprint API: calls · Sprint UI talks to sprint API
- Tasks → Task API: calls · Task UI talks to task API
- Validations → Validation API: calls · Validation UI talks to validation API
- Report gen → Report API: supports · Report generation aligns with report integration
- useToast → Toast: drives · Shared hook powers notification UI
- Toast → Confirm: pairs with · Feedback and confirmation overlays
- API error → Meeting API: normalizes · Shared error handling across services
- API error → Story API: normalizes · Shared error handling across services
- API error → Sprint API: normalizes · Shared error handling across services
- API error → Task API: normalizes · Shared error handling across services
- API error → Validation API: normalizes · Shared error handling across services
- API error → Report API: normalizes · Shared error handling across services
- API error → Project API: normalizes · Shared error handling across services
- API error → Auth API: normalizes · Shared error handling across services
