# hugoborrego/edureport-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/hugoborrego/edureport-frontend
- Repository: https://github.com/hugoborrego/edureport-frontend

## Overview

EduReport is a role-based React application for school feedback and complaints. Users sign up or log in, then access role-specific profiles and panels; students can register complaints, schools can create feedback, and users can view registered or public feedback. The app routes requests through shared authentication and an API client to an external backend. The README is only a Vite template, so product capabilities are inferred from route names and sampled API methods; several page implementations were not sampled, and their detailed wiring is therefore not asserted.

Main entry points: [`src/api/api.js`](https://github.com/hugoborrego/edureport-frontend/blob/main/src/api/api.js) (API Client), [`src/App.jsx`](https://github.com/hugoborrego/edureport-frontend/blob/main/src/App.jsx) (Application Router), [`src/Security/ProtectedRoute.jsx`](https://github.com/hugoborrego/edureport-frontend/blob/main/src/Security/ProtectedRoute.jsx) (Role Route Guard), [`src/pages/RegisteredFeedbacks.jsx`](https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/RegisteredFeedbacks.jsx) (Registered Feedbacks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App Shell"]
  node_app["Application Router<br/>[App.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_panels["Role Control Panels"]
  node_api["API Client<br/>[api.js]"]
  node_home["Home &amp; How It Works<br/>[HomePage.jsx]"]
end

subgraph group_identity["Identity &amp; Profiles"]
  node_auth["Auth Context<br/>[AuthContext.jsx]"]
  node_guard["Role Route Guard<br/>[ProtectedRoute.jsx]"]
  node_login["Login<br/>[LoginPage.jsx]"]
  node_signup["Signup Routes<br/>[SignUpPage.jsx]"]
  node_signupforms["Role Signup Forms<br/>[SignUpFormUser.jsx]"]
  node_profiles["Role Profiles<br/>[StudentProfile.jsx]"]
  node_schoolprofile["School Profile<br/>[SchoolProfile.jsx]"]
end

subgraph group_feedback["Feedback &amp; Complaints"]
  node_complaint["Complaint Registration"]
  node_schoolcreate["School Feedback Creation"]
  node_registered["Registered Feedbacks"]
  node_feedbackviews["Role Feedback Views"]
  node_adminview["Admin Feedback View"]
end

subgraph group_insights["Public Views &amp; Insights"]
  node_public["Public Complaints"]
  node_details["School Feedback Analytics"]
  node_stats["Landing Statistics"]
end

node_visitor(("Visitor / User"))
node_backend{{"EduReport Backend"}}

node_visitor -->|"opens"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"routes"| node_login
node_app -->|"routes"| node_signup
node_app -->|"routes"| node_home
node_app -->|"routes"| node_public
node_app -->|"protects routes"| node_guard
node_guard -->|"allows role"| node_profiles
node_guard -->|"allows role"| node_panels
node_guard -->|"allows student"| node_complaint
node_guard -->|"allows school"| node_schoolcreate
node_guard -->|"allows roles"| node_registered
node_login -->|"signs in"| node_auth
node_signup -->|"selects form"| node_signupforms
node_signupforms -->|"registers student"| node_api
node_auth -->|"requests identity"| node_api
node_profiles -->|"updates profile"| node_api
node_schoolprofile -->|"updates profile"| node_api
node_navbar -->|"reads session"| node_auth
node_complaint -->|"submits complaint"| node_api
node_schoolcreate -->|"creates feedback"| node_api
node_registered -->|"selects view"| node_feedbackviews
node_registered -->|"selects view"| node_adminview
node_registered -->|"loads feedback"| node_api
node_public -->|"loads complaints"| node_api
node_details -->|"loads tag data"| node_api
node_home -->|"renders statistics"| node_stats
node_api -->|"sends API requests"| node_backend

click node_app "https://github.com/hugoborrego/edureport-frontend/blob/main/src/App.jsx"
click node_auth "https://github.com/hugoborrego/edureport-frontend/blob/main/src/Security/AuthContext.jsx"
click node_guard "https://github.com/hugoborrego/edureport-frontend/blob/main/src/Security/ProtectedRoute.jsx"
click node_navbar "https://github.com/hugoborrego/edureport-frontend/blob/main/src/components/Navbar.jsx"
click node_login "https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/LoginPage.jsx"
click node_signup "https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/SignUpPage.jsx"
click node_signupforms "https://github.com/hugoborrego/edureport-frontend/blob/main/src/components/signup/SignUpFormUser.jsx"
click node_profiles "https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/StudentProfile.jsx"
click node_schoolprofile "https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/SchoolProfile.jsx"
click node_panels "https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/StudentControlPanel.jsx"
click node_api "https://github.com/hugoborrego/edureport-frontend/blob/main/src/api/api.js"
click node_complaint "https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/ComplaintRegister.jsx"
click node_schoolcreate "https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/CreateFeedbackBySchool.jsx"
click node_registered "https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/RegisteredFeedbacks.jsx"
click node_feedbackviews "https://github.com/hugoborrego/edureport-frontend/blob/main/src/components/RegisteredFeedbacks/StudentFeedbackView.jsx"
click node_adminview "https://github.com/hugoborrego/edureport-frontend/blob/main/src/components/RegisteredFeedbacks/AdminFeedbackView.jsx"
click node_public "https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/SeePublicComplaints.jsx"
click node_details "https://github.com/hugoborrego/edureport-frontend/blob/main/src/components/RegisteredFeedbacks/SchoolDetailsModal.jsx"
click node_stats "https://github.com/hugoborrego/edureport-frontend/blob/main/src/components/StatisticsSection.jsx"
click node_home "https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/HomePage.jsx"

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_navbar,node_panels,node_api,node_home,node_visitor toneBlue
class node_auth,node_guard,node_login,node_signup,node_signupforms,node_profiles,node_schoolprofile toneAmber
class node_complaint,node_schoolcreate,node_registered,node_feedbackviews,node_adminview toneMint
class node_public,node_details,node_stats toneRose
class node_backend toneIndigo
```

## Components

### App Shell

- [Application Router](https://github.com/hugoborrego/edureport-frontend/blob/main/src/App.jsx): `src/App.jsx`
- [Navigation](https://github.com/hugoborrego/edureport-frontend/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`
- [Role Control Panels](https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/StudentControlPanel.jsx): `src/pages/StudentControlPanel.jsx`
- [API Client](https://github.com/hugoborrego/edureport-frontend/blob/main/src/api/api.js): `src/api/api.js`
- [Home & How It Works](https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/HomePage.jsx): `src/pages/HomePage.jsx`

### Identity & Profiles

- [Auth Context](https://github.com/hugoborrego/edureport-frontend/blob/main/src/Security/AuthContext.jsx): `src/Security/AuthContext.jsx`
- [Role Route Guard](https://github.com/hugoborrego/edureport-frontend/blob/main/src/Security/ProtectedRoute.jsx): `src/Security/ProtectedRoute.jsx`
- [Login](https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/LoginPage.jsx): `src/pages/LoginPage.jsx`
- [Signup Routes](https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/SignUpPage.jsx): `src/pages/SignUpPage.jsx`
- [Role Signup Forms](https://github.com/hugoborrego/edureport-frontend/blob/main/src/components/signup/SignUpFormUser.jsx): `src/components/signup/SignUpFormUser.jsx`
- [Role Profiles](https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/StudentProfile.jsx): `src/pages/StudentProfile.jsx`
- [School Profile](https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/SchoolProfile.jsx): `src/pages/SchoolProfile.jsx`

### Feedback & Complaints

- [Complaint Registration](https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/ComplaintRegister.jsx): `src/pages/ComplaintRegister.jsx`
- [School Feedback Creation](https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/CreateFeedbackBySchool.jsx): `src/pages/CreateFeedbackBySchool.jsx`
- [Registered Feedbacks](https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/RegisteredFeedbacks.jsx): `src/pages/RegisteredFeedbacks.jsx`
- [Role Feedback Views](https://github.com/hugoborrego/edureport-frontend/blob/main/src/components/RegisteredFeedbacks/StudentFeedbackView.jsx): `src/components/RegisteredFeedbacks/StudentFeedbackView.jsx`
- [Admin Feedback View](https://github.com/hugoborrego/edureport-frontend/blob/main/src/components/RegisteredFeedbacks/AdminFeedbackView.jsx): `src/components/RegisteredFeedbacks/AdminFeedbackView.jsx`

### Public Views & Insights

- [Public Complaints](https://github.com/hugoborrego/edureport-frontend/blob/main/src/pages/SeePublicComplaints.jsx): `src/pages/SeePublicComplaints.jsx`
- [School Feedback Analytics](https://github.com/hugoborrego/edureport-frontend/blob/main/src/components/RegisteredFeedbacks/SchoolDetailsModal.jsx): `src/components/RegisteredFeedbacks/SchoolDetailsModal.jsx`
- [Landing Statistics](https://github.com/hugoborrego/edureport-frontend/blob/main/src/components/StatisticsSection.jsx): `src/components/StatisticsSection.jsx`

### Other components

- **Visitor / User**
- **EduReport Backend**

## Connections

- Visitor / User → Application Router: opens
- Application Router → Navigation: renders
- Application Router → Login: routes
- Application Router → Signup Routes: routes
- Application Router → Home & How It Works: routes
- Application Router → Public Complaints: routes
- Application Router → Role Route Guard: protects routes
- Role Route Guard → Role Profiles: allows role
- Role Route Guard → Role Control Panels: allows role
- Role Route Guard → Complaint Registration: allows student
- Role Route Guard → School Feedback Creation: allows school
- Role Route Guard → Registered Feedbacks: allows roles
- Login → Auth Context: signs in
- Signup Routes → Role Signup Forms: selects form
- Role Signup Forms → API Client: registers student
- Auth Context → API Client: requests identity
- Role Profiles → API Client: updates profile
- School Profile → API Client: updates profile
- Navigation → Auth Context: reads session
- Complaint Registration → API Client: submits complaint
- School Feedback Creation → API Client: creates feedback
- Registered Feedbacks → Role Feedback Views: selects view
- Registered Feedbacks → Admin Feedback View: selects view
- Registered Feedbacks → API Client: loads feedback
- Public Complaints → API Client: loads complaints
- School Feedback Analytics → API Client: loads tag data
- Home & How It Works → Landing Statistics: renders statistics
- API Client → EduReport Backend: sends API requests
