# detached-fiber21/discdocknet architecture

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

- Interactive diagram: https://gitdiagram.com/detached-fiber21/discdocknet
- Repository: https://github.com/detached-fiber21/discdocknet

## Overview

DiscDockNet is a research application for exploring nutraceutical compounds and IVDD-associated proteins, importing analysis datasets, and viewing docking, network, enrichment, and report results. Users navigate the React modules, query or upload data through the REST API, and receive database-backed results or explicit pending states; reports can be exported. The backend also seeds reference records and parses compound SDF files for depictions. Edges reflect shown imports, route registration, or documented API behavior; several unsampled route details are intentionally not inferred.

Main entry points: [`frontend/src/App.jsx`](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/App.jsx) (App navigation), [`frontend/src/services/api.js`](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/services/api.js) (REST client), [`backend/main.py`](https://github.com/detached-fiber21/discdocknet/blob/main/backend/main.py) (FastAPI entry), [`backend/models.py`](https://github.com/detached-fiber21/discdocknet/blob/main/backend/models.py) (Research records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Research interface"]
  node_app["App navigation<br/>[App.jsx]"]
  node_dashboard["Dashboard<br/>[DashboardPage.jsx]"]
  node_compound_ui["Compound explorer<br/>[CompoundsPage.jsx]"]
  node_protein_ui["Protein explorer<br/>[ProteinsPage.jsx]"]
  node_docking_ui["Docking view<br/>[DockingPage.jsx]"]
  node_ppi_ui["PPI network<br/>[PpiNetworkPage.jsx]"]
  node_hub_ui["Hub gene analysis<br/>[HubGenesPage.jsx]"]
  node_go_ui["GO analysis<br/>[GoAnalysisPage.jsx]"]
  node_kegg_ui["KEGG analysis"]
  node_search_ui["Global search<br/>[SearchPage.jsx]"]
  node_reports_ui["Reports and datasets<br/>[ReportsPage.jsx]"]
  node_upload_panel["Dataset upload"]
  node_api_client["REST client<br/>[api.js]"]
end

subgraph group_api["API and ingestion"]
  node_api_entry["FastAPI entry<br/>[main.py]"]
  node_compound_routes["Compound routes<br/>[compounds.py]"]
  node_protein_routes["Protein routes<br/>[proteins.py]"]
  node_docking_routes["Docking routes<br/>[docking.py]"]
  node_system_routes["Search and reports<br/>[system_routes.py]"]
  node_import_service["Dataset validation<br/>[import_service.py]"]
  node_report_service["Report generation<br/>[report_service.py]"]
  node_schemas["API schemas<br/>[schemas.py]"]
end

subgraph group_analysis["Research modules"]
  node_network_routes["Network routes<br/>[network.py]"]
  node_enrichment_routes["Enrichment routes<br/>[enrichment.py]"]
end

subgraph group_data["Persistence and reference data"]
  node_db[("SQLite database<br/>[database.py]")]
  node_models["Research records<br/>[models.py]"]
  node_seed["Reference seeding<br/>[seed_data.py]"]
  node_sdf["SDF depiction parser<br/>[sdf_parser.py]"]
end

node_researcher(("Researcher"))

node_researcher -->|"uses"| node_app
node_app -->|"displays"| node_dashboard
node_app -->|"displays"| node_compound_ui
node_app -->|"displays"| node_protein_ui
node_app -->|"displays"| node_docking_ui
node_app -->|"displays"| node_ppi_ui
node_app -->|"displays"| node_hub_ui
node_app -->|"displays"| node_go_ui
node_app -->|"displays"| node_kegg_ui
node_app -->|"displays"| node_search_ui
node_dashboard -->|"requests data"| node_api_client
node_compound_ui -->|"requests data"| node_api_client
node_protein_ui -->|"requests data"| node_api_client
node_docking_ui -->|"requests data"| node_api_client
node_ppi_ui -->|"requests data"| node_api_client
node_hub_ui -->|"requests data"| node_api_client
node_go_ui -->|"requests data"| node_api_client
node_kegg_ui -->|"requests data"| node_api_client
node_search_ui -->|"searches via"| node_api_client
node_upload_panel -->|"uploads via"| node_api_client
node_api_entry -->|"registers"| node_compound_routes
node_api_entry -->|"registers"| node_docking_routes
node_api_entry -->|"registers"| node_protein_routes
node_api_entry -->|"registers"| node_network_routes
node_api_entry -->|"registers"| node_enrichment_routes
node_api_entry -->|"registers"| node_system_routes
node_api_client -->|"calls upload API"| node_system_routes
node_system_routes -->|"imports datasets"| node_import_service
node_enrichment_routes -->|"imports results"| node_import_service
node_system_routes -->|"generates reports"| node_report_service
node_system_routes -->|"queries records"| node_models
node_compound_routes -->|"queries records"| node_models
node_protein_routes -->|"queries records"| node_models
node_docking_routes -->|"queries records"| node_models
node_network_routes -->|"queries records"| node_models
node_enrichment_routes -->|"queries records"| node_models
node_models -->|"uses base"| node_db
node_seed -->|"creates references"| node_models
node_seed -->|"parses compounds"| node_sdf
node_api_entry -->|"initializes database"| node_seed
node_compound_routes -->|"formats responses"| node_schemas
node_docking_routes -->|"formats responses"| node_schemas
node_network_routes -->|"formats responses"| node_schemas
node_enrichment_routes -->|"formats responses"| node_schemas

click node_app "https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/App.jsx"
click node_dashboard "https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/DashboardPage.jsx"
click node_compound_ui "https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/CompoundsPage.jsx"
click node_protein_ui "https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/ProteinsPage.jsx"
click node_docking_ui "https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/DockingPage.jsx"
click node_ppi_ui "https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/PpiNetworkPage.jsx"
click node_hub_ui "https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/HubGenesPage.jsx"
click node_go_ui "https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/GoAnalysisPage.jsx"
click node_kegg_ui "https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/KeggAnalysisPage.jsx"
click node_search_ui "https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/SearchPage.jsx"
click node_reports_ui "https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/ReportsPage.jsx"
click node_upload_panel "https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/components/DatasetUploadPanel.jsx"
click node_api_client "https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/services/api.js"
click node_api_entry "https://github.com/detached-fiber21/discdocknet/blob/main/backend/main.py"
click node_compound_routes "https://github.com/detached-fiber21/discdocknet/blob/main/backend/routes/compounds.py"
click node_protein_routes "https://github.com/detached-fiber21/discdocknet/blob/main/backend/routes/proteins.py"
click node_docking_routes "https://github.com/detached-fiber21/discdocknet/blob/main/backend/routes/docking.py"
click node_network_routes "https://github.com/detached-fiber21/discdocknet/blob/main/backend/routes/network.py"
click node_enrichment_routes "https://github.com/detached-fiber21/discdocknet/blob/main/backend/routes/enrichment.py"
click node_system_routes "https://github.com/detached-fiber21/discdocknet/blob/main/backend/routes/system_routes.py"
click node_import_service "https://github.com/detached-fiber21/discdocknet/blob/main/backend/services/import_service.py"
click node_report_service "https://github.com/detached-fiber21/discdocknet/blob/main/backend/services/report_service.py"
click node_schemas "https://github.com/detached-fiber21/discdocknet/blob/main/backend/schemas.py"
click node_db "https://github.com/detached-fiber21/discdocknet/blob/main/backend/database.py"
click node_models "https://github.com/detached-fiber21/discdocknet/blob/main/backend/models.py"
click node_seed "https://github.com/detached-fiber21/discdocknet/blob/main/backend/services/seed_data.py"
click node_sdf "https://github.com/detached-fiber21/discdocknet/blob/main/backend/services/sdf_parser.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_app,node_dashboard,node_compound_ui,node_protein_ui,node_docking_ui,node_ppi_ui,node_hub_ui,node_go_ui,node_kegg_ui,node_search_ui,node_reports_ui,node_upload_panel,node_api_client toneBlue
class node_api_entry,node_compound_routes,node_protein_routes,node_docking_routes,node_system_routes,node_import_service,node_report_service,node_schemas toneAmber
class node_network_routes,node_enrichment_routes toneMint
class node_db,node_models,node_seed,node_sdf toneRose
class node_researcher toneIndigo
```

## Components

### Research interface

- [App navigation](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Dashboard](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/DashboardPage.jsx): `frontend/src/pages/DashboardPage.jsx`
- [Compound explorer](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/CompoundsPage.jsx): `frontend/src/pages/CompoundsPage.jsx`
- [Protein explorer](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/ProteinsPage.jsx): `frontend/src/pages/ProteinsPage.jsx`
- [Docking view](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/DockingPage.jsx): `frontend/src/pages/DockingPage.jsx`
- [PPI network](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/PpiNetworkPage.jsx): `frontend/src/pages/PpiNetworkPage.jsx`
- [Hub gene analysis](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/HubGenesPage.jsx): `frontend/src/pages/HubGenesPage.jsx`
- [GO analysis](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/GoAnalysisPage.jsx): `frontend/src/pages/GoAnalysisPage.jsx`
- [KEGG analysis](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/KeggAnalysisPage.jsx): `frontend/src/pages/KeggAnalysisPage.jsx`
- [Global search](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/SearchPage.jsx): `frontend/src/pages/SearchPage.jsx`
- [Reports and datasets](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/pages/ReportsPage.jsx): `frontend/src/pages/ReportsPage.jsx`
- [Dataset upload](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/components/DatasetUploadPanel.jsx): `frontend/src/components/DatasetUploadPanel.jsx`
- [REST client](https://github.com/detached-fiber21/discdocknet/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### API and ingestion

- [FastAPI entry](https://github.com/detached-fiber21/discdocknet/blob/main/backend/main.py): `backend/main.py`
- [Compound routes](https://github.com/detached-fiber21/discdocknet/blob/main/backend/routes/compounds.py): `backend/routes/compounds.py`
- [Protein routes](https://github.com/detached-fiber21/discdocknet/blob/main/backend/routes/proteins.py): `backend/routes/proteins.py`
- [Docking routes](https://github.com/detached-fiber21/discdocknet/blob/main/backend/routes/docking.py): `backend/routes/docking.py`
- [Search and reports](https://github.com/detached-fiber21/discdocknet/blob/main/backend/routes/system_routes.py): `backend/routes/system_routes.py`
- [Dataset validation](https://github.com/detached-fiber21/discdocknet/blob/main/backend/services/import_service.py): `backend/services/import_service.py`
- [Report generation](https://github.com/detached-fiber21/discdocknet/blob/main/backend/services/report_service.py): `backend/services/report_service.py`
- [API schemas](https://github.com/detached-fiber21/discdocknet/blob/main/backend/schemas.py): `backend/schemas.py`

### Research modules

- [Network routes](https://github.com/detached-fiber21/discdocknet/blob/main/backend/routes/network.py): `backend/routes/network.py`
- [Enrichment routes](https://github.com/detached-fiber21/discdocknet/blob/main/backend/routes/enrichment.py): `backend/routes/enrichment.py`

### Persistence and reference data

- [SQLite database](https://github.com/detached-fiber21/discdocknet/blob/main/backend/database.py): `backend/database.py`
- [Research records](https://github.com/detached-fiber21/discdocknet/blob/main/backend/models.py): `backend/models.py`
- [Reference seeding](https://github.com/detached-fiber21/discdocknet/blob/main/backend/services/seed_data.py): `backend/services/seed_data.py`
- [SDF depiction parser](https://github.com/detached-fiber21/discdocknet/blob/main/backend/services/sdf_parser.py): `backend/services/sdf_parser.py`

### Other components

- **Researcher**

## Connections

- Researcher → App navigation: uses (evidence: `README.md`)
- App navigation → Dashboard: displays (evidence: `frontend/src/App.jsx`)
- App navigation → Compound explorer: displays (evidence: `frontend/src/App.jsx`)
- App navigation → Protein explorer: displays (evidence: `frontend/src/App.jsx`)
- App navigation → Docking view: displays (evidence: `frontend/src/App.jsx`)
- App navigation → PPI network: displays (evidence: `frontend/src/App.jsx`)
- App navigation → Hub gene analysis: displays (evidence: `frontend/src/App.jsx`)
- App navigation → GO analysis: displays (evidence: `frontend/src/App.jsx`)
- App navigation → KEGG analysis: displays (evidence: `frontend/src/App.jsx`)
- App navigation → Global search: displays (evidence: `frontend/src/App.jsx`)
- Dashboard → REST client: requests data (evidence: `frontend/src/pages/DashboardPage.jsx`)
- Compound explorer → REST client: requests data (evidence: `frontend/src/pages/CompoundsPage.jsx`)
- Protein explorer → REST client: requests data (evidence: `frontend/src/pages/ProteinsPage.jsx`)
- Docking view → REST client: requests data (evidence: `frontend/src/pages/DockingPage.jsx`)
- PPI network → REST client: requests data (evidence: `frontend/src/pages/PpiNetworkPage.jsx`)
- Hub gene analysis → REST client: requests data (evidence: `frontend/src/pages/HubGenesPage.jsx`)
- GO analysis → REST client: requests data (evidence: `frontend/src/pages/GoAnalysisPage.jsx`)
- KEGG analysis → REST client: requests data (evidence: `frontend/src/pages/KeggAnalysisPage.jsx`)
- Global search → REST client: searches via (evidence: `frontend/src/pages/SearchPage.jsx`)
- Dataset upload → REST client: uploads via (evidence: `frontend/src/components/DatasetUploadPanel.jsx`)
- FastAPI entry → Compound routes: registers (evidence: `backend/main.py`)
- FastAPI entry → Docking routes: registers (evidence: `backend/main.py`)
- FastAPI entry → Protein routes: registers (evidence: `backend/main.py`)
- FastAPI entry → Network routes: registers (evidence: `backend/main.py`)
- FastAPI entry → Enrichment routes: registers (evidence: `backend/main.py`)
- FastAPI entry → Search and reports: registers (evidence: `backend/main.py`)
- REST client → Search and reports: calls upload API (evidence: `frontend/src/services/api.js`)
- Search and reports → Dataset validation: imports datasets (evidence: `backend/routes/system_routes.py`)
- Enrichment routes → Dataset validation: imports results (evidence: `backend/routes/enrichment.py`)
- Search and reports → Report generation: generates reports (evidence: `backend/routes/system_routes.py`)
- Search and reports → Research records: queries records (evidence: `backend/routes/system_routes.py`)
- Compound routes → Research records: queries records (evidence: `backend/routes/compounds.py`)
- Protein routes → Research records: queries records (evidence: `backend/routes/proteins.py`)
- Docking routes → Research records: queries records (evidence: `backend/routes/docking.py`)
- Network routes → Research records: queries records (evidence: `backend/routes/network.py`)
- Enrichment routes → Research records: queries records (evidence: `backend/routes/enrichment.py`)
- Research records → SQLite database: uses base (evidence: `backend/models.py`)
- Reference seeding → Research records: creates references (evidence: `backend/services/seed_data.py`)
- Reference seeding → SDF depiction parser: parses compounds (evidence: `backend/services/seed_data.py`)
- FastAPI entry → Reference seeding: initializes database (evidence: `backend/main.py`)
- Compound routes → API schemas: formats responses (evidence: `backend/routes/compounds.py`)
- Docking routes → API schemas: formats responses (evidence: `backend/routes/docking.py`)
- Network routes → API schemas: formats responses (evidence: `backend/routes/network.py`)
- Enrichment routes → API schemas: formats responses (evidence: `backend/routes/enrichment.py`)
