# stcdenys19/epilepsy-research-platform architecture

> Architecture diagram of the GitHub repository stcdenys19/epilepsy-research-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/stcdenys19/epilepsy-research-platform
- Repository: https://github.com/stcdenys19/epilepsy-research-platform

## Overview

This is an early-stage epilepsy patient-management and neuroscience research platform. The visible user journey is registration or login, followed by role-specific dashboards and navigation into patient, appointment, record, research, and Virtual Lab areas. The README documents backend authentication, persistence, proposal/document handling, email, and prediction forwarding, while cautioning that frontend screens may be scaffolding. Backend implementation files were not present in the supplied tree, so those nodes use the documented backend source directory; unsampled frontend capabilities are represented without speculative internal call edges.

Main entry points: [`frontend/src/App.jsx`](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/App.jsx) (Application routes), [`backend/src`](https://github.com/stcdenys19/epilepsy-research-platform/tree/main/backend/src) (REST services), [`frontend/src/register/Register.jsx`](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/register/Register.jsx) (Registration), [`frontend/src/login/Login.jsx`](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/login/Login.jsx) (Login)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_register["Registration<br/>[Register.jsx]"]
  node_login["Login<br/>[Login.jsx]"]
  node_authctx["Auth context<br/>[AuthContext.jsx]"]
  node_router["Application routes<br/>[App.jsx]"]
  node_dashboard["Role dashboards"]
  node_shell["Dashboard shell<br/>[Dashboard.jsx]"]
  node_sidebar["Role navigation<br/>[Sidebar.jsx]"]
end

subgraph group_care["Clinical workflows"]
  node_appointments["Appointments"]
  node_patients["Patient management"]
  node_records["Medical records"]
  node_analytics["Analytics<br/>[Analytics.jsx]"]
end

subgraph group_research["Research workspace"]
  node_projects["Research projects<br/>[Projects.jsx]"]
  node_datasets["Research datasets<br/>[Datasets.jsx]"]
  node_people["Research community"]
  node_proposals["Proposal workflow<br/>[ProposalCard.tsx]"]
  node_virtual_lab["Virtual Lab<br/>[VirtualLab.jsx]"]
  node_social["Social and chat<br/>[Social.jsx]"]
  node_notifications["Notifications<br/>[Notifications.jsx]"]
end

subgraph group_services["Platform services"]
  node_backend["REST services"]
  node_persistence[("PostgreSQL persistence")]
  node_email["Email delivery"]
  node_documents["Proposal documents"]
  node_prediction["Prediction endpoint"]
end

subgraph group_computing["Computational work"]
  node_python_service["Python prediction service"]
  node_deep_learning["Deep-learning work<br/>[main.py]"]
end

node_user(("Platform user"))

node_user -->|"signs up"| node_register
node_user -->|"signs in"| node_login
node_register -->|"registers via HTTP"| node_backend
node_login -->|"authenticates via HTTP"| node_backend
node_register -->|"sets authenticated"| node_authctx
node_login -->|"sets authenticated"| node_authctx
node_router -->|"wraps routes"| node_authctx
node_router -->|"routes by role"| node_dashboard
node_dashboard -->|"renders shell"| node_shell
node_shell -->|"renders navigation"| node_sidebar
node_router -->|"routes to"| node_appointments
node_router -->|"routes to"| node_patients
node_router -->|"routes to"| node_records
node_router -->|"routes to"| node_analytics
node_router -->|"routes to"| node_projects
node_router -->|"routes to"| node_datasets
node_router -->|"routes to"| node_people
node_router -->|"routes to"| node_virtual_lab
node_router -->|"routes to"| node_social
node_router -->|"routes to"| node_notifications
node_backend -->|"persists records"| node_persistence
node_backend -->|"sends verification email"| node_email
node_backend -->|"handles proposal PDFs"| node_documents
node_backend -->|"exposes endpoint"| node_prediction
node_prediction -->|"forwards request"| node_python_service

click node_register "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/register/Register.jsx"
click node_login "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/login/Login.jsx"
click node_authctx "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/AuthContext.jsx"
click node_router "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/App.jsx"
click node_dashboard "https://github.com/stcdenys19/epilepsy-research-platform/tree/main/frontend/src/components/dashboard"
click node_shell "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/dashboard/Dashboard.jsx"
click node_sidebar "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/layout/Sidebar.jsx"
click node_appointments "https://github.com/stcdenys19/epilepsy-research-platform/tree/main/frontend/src/components/appointments"
click node_patients "https://github.com/stcdenys19/epilepsy-research-platform/tree/main/frontend/src/components/patients"
click node_records "https://github.com/stcdenys19/epilepsy-research-platform/tree/main/frontend/src/components/medical_records"
click node_analytics "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/analytics/Analytics.jsx"
click node_projects "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/research/projects/Projects.jsx"
click node_datasets "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/research/datasets/Datasets.jsx"
click node_people "https://github.com/stcdenys19/epilepsy-research-platform/tree/main/frontend/src/components/research"
click node_proposals "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/ProposalCard.tsx"
click node_virtual_lab "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/virtual_lab/VirtualLab.jsx"
click node_social "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/social/Social.jsx"
click node_notifications "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/notifications/Notifications.jsx"
click node_backend "https://github.com/stcdenys19/epilepsy-research-platform/tree/main/backend/src"
click node_persistence "https://github.com/stcdenys19/epilepsy-research-platform/tree/main/backend/src"
click node_email "https://github.com/stcdenys19/epilepsy-research-platform/tree/main/backend/src"
click node_documents "https://github.com/stcdenys19/epilepsy-research-platform/tree/main/backend/src"
click node_prediction "https://github.com/stcdenys19/epilepsy-research-platform/tree/main/backend/src"
click node_deep_learning "https://github.com/stcdenys19/epilepsy-research-platform/blob/main/deep_learning/main.py"

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_register,node_login,node_authctx,node_router,node_dashboard,node_shell,node_sidebar,node_user toneBlue
class node_appointments,node_patients,node_records,node_analytics toneAmber
class node_projects,node_datasets,node_people,node_proposals,node_virtual_lab,node_social,node_notifications toneMint
class node_backend,node_persistence,node_email,node_documents,node_prediction toneRose
class node_python_service,node_deep_learning toneIndigo
```

## Components

### Access and navigation

- [Registration](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/register/Register.jsx): `frontend/src/register/Register.jsx`
- [Login](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/login/Login.jsx): `frontend/src/login/Login.jsx`
- [Auth context](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/AuthContext.jsx): `frontend/src/components/AuthContext.jsx`
- [Application routes](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Role dashboards](https://github.com/stcdenys19/epilepsy-research-platform/tree/main/frontend/src/components/dashboard): `frontend/src/components/dashboard`
- [Dashboard shell](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/dashboard/Dashboard.jsx): `frontend/src/components/dashboard/Dashboard.jsx`
- [Role navigation](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/layout/Sidebar.jsx): `frontend/src/components/layout/Sidebar.jsx`

### Clinical workflows

- [Appointments](https://github.com/stcdenys19/epilepsy-research-platform/tree/main/frontend/src/components/appointments): `frontend/src/components/appointments`
- [Patient management](https://github.com/stcdenys19/epilepsy-research-platform/tree/main/frontend/src/components/patients): `frontend/src/components/patients`
- [Medical records](https://github.com/stcdenys19/epilepsy-research-platform/tree/main/frontend/src/components/medical_records): `frontend/src/components/medical_records`
- [Analytics](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/analytics/Analytics.jsx): `frontend/src/components/analytics/Analytics.jsx`

### Research workspace

- [Research projects](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/research/projects/Projects.jsx): `frontend/src/components/research/projects/Projects.jsx`
- [Research datasets](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/research/datasets/Datasets.jsx): `frontend/src/components/research/datasets/Datasets.jsx`
- [Research community](https://github.com/stcdenys19/epilepsy-research-platform/tree/main/frontend/src/components/research): `frontend/src/components/research`
- [Proposal workflow](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/ProposalCard.tsx): `frontend/src/components/ProposalCard.tsx`
- [Virtual Lab](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/virtual_lab/VirtualLab.jsx): `frontend/src/components/virtual_lab/VirtualLab.jsx`
- [Social and chat](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/social/Social.jsx): `frontend/src/components/social/Social.jsx`
- [Notifications](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/frontend/src/components/notifications/Notifications.jsx): `frontend/src/components/notifications/Notifications.jsx`

### Platform services

- [REST services](https://github.com/stcdenys19/epilepsy-research-platform/tree/main/backend/src): `backend/src`
- [PostgreSQL persistence](https://github.com/stcdenys19/epilepsy-research-platform/tree/main/backend/src): `backend/src`
- [Email delivery](https://github.com/stcdenys19/epilepsy-research-platform/tree/main/backend/src): `backend/src`
- [Proposal documents](https://github.com/stcdenys19/epilepsy-research-platform/tree/main/backend/src): `backend/src`
- [Prediction endpoint](https://github.com/stcdenys19/epilepsy-research-platform/tree/main/backend/src): `backend/src`

### Computational work

- **Python prediction service**
- [Deep-learning work](https://github.com/stcdenys19/epilepsy-research-platform/blob/main/deep_learning/main.py): `deep_learning/main.py`

### Other components

- **Platform user**

## Connections

- Platform user → Registration: signs up
- Platform user → Login: signs in
- Registration → REST services: registers via HTTP (evidence: `frontend/src/register/Register.jsx`)
- Login → REST services: authenticates via HTTP (evidence: `frontend/src/login/Login.jsx`)
- Registration → Auth context: sets authenticated (evidence: `frontend/src/register/Register.jsx`)
- Login → Auth context: sets authenticated (evidence: `frontend/src/login/Login.jsx`)
- Application routes → Auth context: wraps routes (evidence: `frontend/src/App.jsx`)
- Application routes → Role dashboards: routes by role (evidence: `frontend/src/App.jsx`)
- Role dashboards → Dashboard shell: renders shell (evidence: `frontend/src/components/dashboard/researcher_dashboard/ResearcherDashboard.jsx`)
- Dashboard shell → Role navigation: renders navigation (evidence: `frontend/src/components/dashboard/Dashboard.jsx`)
- Application routes → Appointments: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Patient management: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Medical records: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Analytics: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Research projects: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Research datasets: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Research community: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Virtual Lab: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Social and chat: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Notifications: routes to (evidence: `frontend/src/App.jsx`)
- REST services → PostgreSQL persistence: persists records (evidence: `README.md`)
- REST services → Email delivery: sends verification email (evidence: `README.md`)
- REST services → Proposal documents: handles proposal PDFs (evidence: `README.md`)
- REST services → Prediction endpoint: exposes endpoint (evidence: `README.md`)
- Prediction endpoint → Python prediction service: forwards request (evidence: `README.md`)
