How inescherif/frontendpfe works
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: Apierror.js API error · App.jsx App · StudentPage.jsx Student · MyProjectPage.jsx My Project
Components 30
App shell
Bootstrap and top-level composition
Pages
Role-based screens and route-level views
- Auth · Authentication screen
src/pages/auth/AuthPage.jsx - Dashboard · General dashboard view
src/pages/dashboard/Dashboardpage.jsx - Company · Company-facing workspace
src/pages/company/CompanyPage.jsx - Supervisor · Supervisor workspace
src/pages/supervisor/SupervisorPage.jsx
Student workspace
Student-specific pages and nested My Project area
- Student · Student workspace hub
src/pages/student/StudentPage.jsx - My Project · Nested student project area
src/pages/student/myproject/MyProjectPage.jsx - Project tab · Project overview tab
src/pages/student/myproject/tabs/TabProject.jsx - Reports tab · Report tab inside My Project
src/pages/student/myproject/tabs/TabReports.jsx - Sprints tab · Sprint tab inside My Project
src/pages/student/myproject/tabs/TabSprints.jsx
Feature components
Domain UI building blocks
- Meetings · Meeting board and record actions
src/components/meetings/MeetingBoard.jsx - User stories · User story board and cards
src/components/userStory/UserStoryBoard.jsx - Sprints · Sprint presentation and progress
src/components/sprint/SprintCard.jsx - Tasks · Task evaluation and validation modals
src/components/tasks/Taskmodals.jsx - Validations · Validation board
src/components/validations/ValidationsBoard.jsx
Shared UI
Cross-cutting navigation, feedback, hooks, and utilities
- Navbar · Global navigation
src/components/Navbar.jsx - Toast · Reusable notification UI
src/components/message/Toast.jsx - Confirm · Confirmation toast UI
src/components/message/ToastConfirm.jsx - useToast · Shared toast helper
src/hooks/Usetoast.js - API error · Error normalization helper
src/utils/Apierror.js - Report gen · Report generation helper
src/utils/Reportgenerator.js
Services
API integration boundary
- Meeting API · Meeting backend contract
src/services/meetingService.js - Story API · User story backend contract
src/services/userStoryService.js - Sprint API · Sprint backend contract
src/services/sprintService.js - Task API · Task backend contract
src/services/taskService.js - Validation API · Validation backend contract
src/services/validationService.js - Report API · Report backend contract
src/services/reportService.js - Project API · Project backend contract
src/services/projectService.js - Auth API · Authentication backend contract
src/services/authService.js
Connections 35
- 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