# edubridge-team/edubridge architecture

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

- Interactive diagram: https://gitdiagram.com/edubridge-team/edubridge
- Repository: https://github.com/edubridge-team/edubridge

## Overview

EduBridge is a multi-role learning and support platform for children with special educational needs, comprising a React web client, Laravel API, PostgreSQL data store, and a Flutter mobile app. The main workflow is a parent or educator accessing a child’s learning, recording progress, and coordinating support through role-specific portals. The README also documents identity verification, curriculum review, communication, homework, reports, accessibility, and emergency features. Flutter source and most API controllers were not sampled, so those subsystems are represented at their documented directory level; unverified client-to-API wiring is dashed.

Main entry points: [`edubridge-web/src/AppRoutes.jsx`](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/AppRoutes.jsx) (Web application), [`edubridge-api-laravel/app/Http/Controllers`](https://github.com/edubridge-team/edubridge/tree/main/edubridge-api-laravel/app/Http/Controllers) (Domain API), [`edubridge-web/src/layouts/RolePortalLayout.jsx`](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/layouts/RolePortalLayout.jsx) (Role portal shell), [`edubridge-web/src/pages/Children/ChildLessonsPage.jsx`](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/pages/Children/ChildLessonsPage.jsx) (Child learning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webapp["Web application<br/>[AppRoutes.jsx]"]
  node_portal["Role portal shell"]
  node_roleconfig["Role navigation"]
  node_rolepaths["Role routes<br/>[roleRoutes.js]"]
  node_mobile["Flutter mobile app"]
end

subgraph group_learning["Learning and support"]
  node_childlearning["Child learning"]
  node_teacherportal["Teacher dashboard"]
  node_specialist["Specialist workflow"]
  node_ministry["Curriculum review<br/>[MinistryPage.jsx]"]
  node_conversations["Conversations"]
  node_profile["Account and identity"]
end

subgraph group_backend["API and services"]
  node_webapi["Web API clients<br/>[platform.js]"]
  node_supportapi["Support API clients<br/>[support.js]"]
  node_middleware["Authentication and access"]
  node_controllers["Domain API"]
  node_childaccess["Child access rules<br/>[ChildAccess.php]"]
  node_notifications["Notifications<br/>[Notify.php]"]
  node_files["R2 file storage<br/>[R2Storage.php]"]
end

subgraph group_state["Data and storage"]
  node_database[("PostgreSQL")]
  node_r2[("Cloudflare R2")]
end

node_user(("Learners and staff"))

node_user -->|"uses"| node_webapp
node_webapp -->|"renders role shell"| node_portal
node_webapp -->|"checks role routes"| node_rolepaths
node_portal -->|"uses navigation"| node_roleconfig
node_webapp -->|"routes to"| node_childlearning
node_webapp -->|"routes to"| node_teacherportal
node_webapp -->|"routes to"| node_specialist
node_webapp -->|"routes to"| node_ministry
node_webapp -->|"routes to"| node_conversations
node_webapp -->|"routes to"| node_profile
node_childlearning -.->|"requests learning data"| node_webapi
node_specialist -.->|"requests support data"| node_supportapi
node_mobile -.->|"calls API"| node_controllers
node_webapi -.->|"calls API"| node_controllers
node_supportapi -.->|"calls API"| node_controllers
node_controllers -.->|"reads and writes"| node_database
node_controllers -->|"checks access"| node_childaccess
node_controllers -->|"sends alerts"| node_notifications
node_controllers -.->|"stores uploads"| node_files
node_files -->|"transfers objects"| node_r2
node_middleware -.->|"protects requests"| node_controllers

click node_webapp "https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/AppRoutes.jsx"
click node_portal "https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/layouts/RolePortalLayout.jsx"
click node_roleconfig "https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/layouts/rolePortalNavigation.jsx"
click node_rolepaths "https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/roleRoutes.js"
click node_childlearning "https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/pages/Children/ChildLessonsPage.jsx"
click node_teacherportal "https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/pages/Dashboards/Teacher/TeacherDashboard.jsx"
click node_specialist "https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/pages/Support/SpecialistWorkflowPage.jsx"
click node_ministry "https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/pages/Dashboards/MinistryPage.jsx"
click node_conversations "https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/pages/Communication/ConversationsPage.jsx"
click node_profile "https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/pages/Account/ProfileSections.jsx"
click node_webapi "https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/api/platform.js"
click node_supportapi "https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/api/support.js"
click node_middleware "https://github.com/edubridge-team/edubridge/tree/main/edubridge-api-laravel/app/Http/Middleware"
click node_controllers "https://github.com/edubridge-team/edubridge/tree/main/edubridge-api-laravel/app/Http/Controllers"
click node_childaccess "https://github.com/edubridge-team/edubridge/blob/main/edubridge-api-laravel/app/Support/ChildAccess.php"
click node_notifications "https://github.com/edubridge-team/edubridge/blob/main/edubridge-api-laravel/app/Support/Notify.php"
click node_files "https://github.com/edubridge-team/edubridge/blob/main/edubridge-api-laravel/app/Support/R2Storage.php"
click node_mobile "https://github.com/edubridge-team/edubridge/tree/main/edubridge-app"

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_webapp,node_portal,node_roleconfig,node_rolepaths,node_mobile toneBlue
class node_childlearning,node_teacherportal,node_specialist,node_ministry,node_conversations,node_profile toneAmber
class node_webapi,node_supportapi,node_middleware,node_controllers,node_childaccess,node_notifications,node_files toneMint
class node_database,node_r2 toneRose
class node_user toneIndigo
```

## Components

### Web experience

- [Web application](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/AppRoutes.jsx): `edubridge-web/src/AppRoutes.jsx`
- [Role portal shell](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/layouts/RolePortalLayout.jsx): `edubridge-web/src/layouts/RolePortalLayout.jsx`
- [Role navigation](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/layouts/rolePortalNavigation.jsx): `edubridge-web/src/layouts/rolePortalNavigation.jsx`
- [Role routes](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/roleRoutes.js): `edubridge-web/src/roleRoutes.js`
- [Flutter mobile app](https://github.com/edubridge-team/edubridge/tree/main/edubridge-app): `edubridge-app`

### Learning and support

- [Child learning](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/pages/Children/ChildLessonsPage.jsx): `edubridge-web/src/pages/Children/ChildLessonsPage.jsx`
- [Teacher dashboard](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/pages/Dashboards/Teacher/TeacherDashboard.jsx): `edubridge-web/src/pages/Dashboards/Teacher/TeacherDashboard.jsx`
- [Specialist workflow](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/pages/Support/SpecialistWorkflowPage.jsx): `edubridge-web/src/pages/Support/SpecialistWorkflowPage.jsx`
- [Curriculum review](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/pages/Dashboards/MinistryPage.jsx): `edubridge-web/src/pages/Dashboards/MinistryPage.jsx`
- [Conversations](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/pages/Communication/ConversationsPage.jsx): `edubridge-web/src/pages/Communication/ConversationsPage.jsx`
- [Account and identity](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/pages/Account/ProfileSections.jsx): `edubridge-web/src/pages/Account/ProfileSections.jsx`

### API and services

- [Web API clients](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/api/platform.js): `edubridge-web/src/api/platform.js`
- [Support API clients](https://github.com/edubridge-team/edubridge/blob/main/edubridge-web/src/api/support.js): `edubridge-web/src/api/support.js`
- [Authentication and access](https://github.com/edubridge-team/edubridge/tree/main/edubridge-api-laravel/app/Http/Middleware): `edubridge-api-laravel/app/Http/Middleware`
- [Domain API](https://github.com/edubridge-team/edubridge/tree/main/edubridge-api-laravel/app/Http/Controllers): `edubridge-api-laravel/app/Http/Controllers`
- [Child access rules](https://github.com/edubridge-team/edubridge/blob/main/edubridge-api-laravel/app/Support/ChildAccess.php): `edubridge-api-laravel/app/Support/ChildAccess.php`
- [Notifications](https://github.com/edubridge-team/edubridge/blob/main/edubridge-api-laravel/app/Support/Notify.php): `edubridge-api-laravel/app/Support/Notify.php`
- [R2 file storage](https://github.com/edubridge-team/edubridge/blob/main/edubridge-api-laravel/app/Support/R2Storage.php): `edubridge-api-laravel/app/Support/R2Storage.php`

### Data and storage

- **PostgreSQL**
- **Cloudflare R2**

### Other components

- **Learners and staff**

## Connections

- Learners and staff → Web application: uses (evidence: `edubridge-web/src/AppRoutes.jsx`)
- Web application → Role portal shell: renders role shell (evidence: `edubridge-web/src/AppRoutes.jsx`)
- Web application → Role routes: checks role routes (evidence: `edubridge-web/src/AppRoutes.jsx`)
- Role portal shell → Role navigation: uses navigation (evidence: `edubridge-web/src/layouts/RolePortalLayout.jsx`)
- Web application → Child learning: routes to (evidence: `edubridge-web/src/AppRoutes.jsx`)
- Web application → Teacher dashboard: routes to (evidence: `edubridge-web/src/AppRoutes.jsx`)
- Web application → Specialist workflow: routes to (evidence: `edubridge-web/src/AppRoutes.jsx`)
- Web application → Curriculum review: routes to (evidence: `edubridge-web/src/AppRoutes.jsx`)
- Web application → Conversations: routes to (evidence: `edubridge-web/src/AppRoutes.jsx`)
- Web application → Account and identity: routes to (evidence: `edubridge-web/src/AppRoutes.jsx`)
- Child learning → Web API clients: requests learning data
- Specialist workflow → Support API clients: requests support data
- Flutter mobile app → Domain API: calls API
- Web API clients → Domain API: calls API
- Support API clients → Domain API: calls API
- Domain API → PostgreSQL: reads and writes
- Domain API → Child access rules: checks access (evidence: `edubridge-api-laravel/app/Http/Controllers/EngagementController.php`)
- Domain API → Notifications: sends alerts (evidence: `edubridge-api-laravel/app/Http/Controllers/EmergencyAlertController.php`)
- Domain API → R2 file storage: stores uploads
- R2 file storage → Cloudflare R2: transfers objects
- Authentication and access → Domain API: protects requests
