# byreddyrohanreddy/park architecture

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

- Interactive diagram: https://gitdiagram.com/byreddyrohanreddy/park
- Repository: https://github.com/byreddyrohanreddy/park

## Overview

VoiceCare AI lets a user register or sign in, record or upload voice audio, and receive a Parkinson’s screening result; authenticated users can review recordings and request explanations or clinical reports. The documented inference workflow normalizes audio, extracts SSL and acoustic features, fuses them for calibrated and conformal prediction, and supports explainability. The graph also includes account and recording persistence, dashboard/history, and report generation. The README documents several ML stages not fully visible in the sampled excerpts, so their internal wiring follows that documentation; unsampled frontend service details are not expanded.

Main entry points: [`backend/server.js`](https://github.com/byreddyrohanreddy/park/blob/main/backend/server.js) (Express server), [`backend/routes/recordingRoutes.js`](https://github.com/byreddyrohanreddy/park/blob/main/backend/routes/recordingRoutes.js) (Recording routes), [`backend/controllers/recordingController.js`](https://github.com/byreddyrohanreddy/park/blob/main/backend/controllers/recordingController.js) (Recording controller), [`backend/routes/reportRoutes.js`](https://github.com/byreddyrohanreddy/park/blob/main/backend/routes/reportRoutes.js) (Report routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_frontend["Web application<br/>[App.jsx]"]
  node_api_service["API client<br/>[api.js]"]
end

subgraph group_api["Node API"]
  node_server["Express server<br/>[server.js]"]
  node_auth_routes["Auth routes<br/>[authRoutes.js]"]
  node_auth_controller["Account controller<br/>[authController.js]"]
  node_auth_middleware["Auth middleware<br/>[authMiddleware.js]"]
  node_recording_routes["Recording routes<br/>[recordingRoutes.js]"]
  node_recording_controller["Recording controller"]
  node_report_routes["Report routes<br/>[reportRoutes.js]"]
end

subgraph group_screening["Voice screening"]
  node_ml_service["Inference API<br/>[app.py]"]
  node_audio_normalizer["Audio normalization<br/>[app.py]"]
  node_feature_extraction["Feature extraction"]
  node_pd_model["PD-VoiceNet<br/>[model.py]"]
  node_calibration["Risk calibration<br/>[calibration.py]"]
end

subgraph group_insights["Clinical insights"]
  node_explainability["Explainability suite"]
  node_report_service["Report generation"]
  node_retriever["Knowledge retrieval<br/>[retriever.py]"]
  node_llm_provider["LLM provider<br/>[llm_provider.py]"]
end

subgraph group_data["Application data"]
  node_user_store[("User records<br/>[User.js]")]
  node_recording_store[("Recording records<br/>[Recording.js]")]
end

node_user(("User"))
node_mongo[("MongoDB")]

node_user -->|"uses"| node_frontend
node_frontend -->|"requests"| node_api_service
node_api_service -->|"calls API"| node_server
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_recording_routes
node_server -->|"mounts"| node_report_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_auth_controller -->|"reads and writes"| node_user_store
node_recording_routes -->|"authorizes"| node_auth_middleware
node_report_routes -->|"authorizes"| node_auth_middleware
node_recording_routes -->|"dispatches"| node_recording_controller
node_recording_controller -->|"forwards audio"| node_ml_service
node_ml_service -->|"normalizes"| node_audio_normalizer
node_audio_normalizer -->|"supplies audio"| node_feature_extraction
node_feature_extraction -->|"supplies features"| node_pd_model
node_pd_model -->|"provides scores"| node_calibration
node_ml_service -->|"serves explanations"| node_explainability
node_report_routes -->|"proxies report request"| node_report_service
node_report_service -->|"retrieves context"| node_retriever
node_report_service -.->|"requests generation"| node_llm_provider
node_recording_controller -->|"creates and queries"| node_recording_store
node_recording_store -->|"persists"| node_mongo
node_user_store -->|"persists"| node_mongo

click node_frontend "https://github.com/byreddyrohanreddy/park/blob/main/frontend/src/App.jsx"
click node_api_service "https://github.com/byreddyrohanreddy/park/blob/main/frontend/src/services/api.js"
click node_server "https://github.com/byreddyrohanreddy/park/blob/main/backend/server.js"
click node_auth_routes "https://github.com/byreddyrohanreddy/park/blob/main/backend/routes/authRoutes.js"
click node_auth_controller "https://github.com/byreddyrohanreddy/park/blob/main/backend/controllers/authController.js"
click node_auth_middleware "https://github.com/byreddyrohanreddy/park/blob/main/backend/middleware/authMiddleware.js"
click node_recording_routes "https://github.com/byreddyrohanreddy/park/blob/main/backend/routes/recordingRoutes.js"
click node_recording_controller "https://github.com/byreddyrohanreddy/park/blob/main/backend/controllers/recordingController.js"
click node_report_routes "https://github.com/byreddyrohanreddy/park/blob/main/backend/routes/reportRoutes.js"
click node_ml_service "https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/app.py"
click node_audio_normalizer "https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/app.py"
click node_feature_extraction "https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/feature_extraction.py"
click node_pd_model "https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/pd_voicenet/model.py"
click node_calibration "https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/pd_voicenet/calibration.py"
click node_explainability "https://github.com/byreddyrohanreddy/park/tree/main/backend/ml/pd_voicenet/explainability"
click node_report_service "https://github.com/byreddyrohanreddy/park/tree/main/backend/ml/report_generator"
click node_retriever "https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/report_generator/retriever.py"
click node_llm_provider "https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/report_generator/llm_provider.py"
click node_user_store "https://github.com/byreddyrohanreddy/park/blob/main/backend/models/User.js"
click node_recording_store "https://github.com/byreddyrohanreddy/park/blob/main/backend/models/Recording.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_frontend,node_api_service,node_user toneBlue
class node_server,node_auth_routes,node_auth_controller,node_auth_middleware,node_recording_routes,node_recording_controller,node_report_routes,node_mongo toneAmber
class node_ml_service,node_audio_normalizer,node_feature_extraction,node_pd_model,node_calibration toneMint
class node_explainability,node_report_service,node_retriever,node_llm_provider toneRose
class node_user_store,node_recording_store toneIndigo
```

## Components

### Client experience

- [Web application](https://github.com/byreddyrohanreddy/park/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API client](https://github.com/byreddyrohanreddy/park/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Node API

- [Express server](https://github.com/byreddyrohanreddy/park/blob/main/backend/server.js): `backend/server.js`
- [Auth routes](https://github.com/byreddyrohanreddy/park/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Account controller](https://github.com/byreddyrohanreddy/park/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Auth middleware](https://github.com/byreddyrohanreddy/park/blob/main/backend/middleware/authMiddleware.js): `backend/middleware/authMiddleware.js`
- [Recording routes](https://github.com/byreddyrohanreddy/park/blob/main/backend/routes/recordingRoutes.js): `backend/routes/recordingRoutes.js`
- [Recording controller](https://github.com/byreddyrohanreddy/park/blob/main/backend/controllers/recordingController.js): `backend/controllers/recordingController.js`
- [Report routes](https://github.com/byreddyrohanreddy/park/blob/main/backend/routes/reportRoutes.js): `backend/routes/reportRoutes.js`

### Voice screening

- [Inference API](https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/app.py): `backend/ml/app.py`
- [Audio normalization](https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/app.py): `backend/ml/app.py`
- [Feature extraction](https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/feature_extraction.py): `backend/ml/feature_extraction.py`
- [PD-VoiceNet](https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/pd_voicenet/model.py): `backend/ml/pd_voicenet/model.py`
- [Risk calibration](https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/pd_voicenet/calibration.py): `backend/ml/pd_voicenet/calibration.py`

### Clinical insights

- [Explainability suite](https://github.com/byreddyrohanreddy/park/tree/main/backend/ml/pd_voicenet/explainability): `backend/ml/pd_voicenet/explainability`
- [Report generation](https://github.com/byreddyrohanreddy/park/tree/main/backend/ml/report_generator): `backend/ml/report_generator`
- [Knowledge retrieval](https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/report_generator/retriever.py): `backend/ml/report_generator/retriever.py`
- [LLM provider](https://github.com/byreddyrohanreddy/park/blob/main/backend/ml/report_generator/llm_provider.py): `backend/ml/report_generator/llm_provider.py`

### Application data

- [User records](https://github.com/byreddyrohanreddy/park/blob/main/backend/models/User.js): `backend/models/User.js`
- [Recording records](https://github.com/byreddyrohanreddy/park/blob/main/backend/models/Recording.js): `backend/models/Recording.js`

### Other components

- **User**
- **MongoDB**

## Connections

- User → Web application: uses
- Web application → API client: requests
- API client → Express server: calls API
- Express server → Auth routes: mounts
- Express server → Recording routes: mounts
- Express server → Report routes: mounts
- Auth routes → Account controller: dispatches
- Account controller → User records: reads and writes
- Recording routes → Auth middleware: authorizes
- Report routes → Auth middleware: authorizes
- Recording routes → Recording controller: dispatches
- Recording controller → Inference API: forwards audio
- Inference API → Audio normalization: normalizes
- Audio normalization → Feature extraction: supplies audio
- Feature extraction → PD-VoiceNet: supplies features
- PD-VoiceNet → Risk calibration: provides scores
- Inference API → Explainability suite: serves explanations
- Report routes → Report generation: proxies report request
- Report generation → Knowledge retrieval: retrieves context
- Report generation → LLM provider: requests generation
- Recording controller → Recording records: creates and queries
- Recording records → MongoDB: persists
- User records → MongoDB: persists
