# mkarthikeya866-ops/bioactive-molecule-intelligence architecture

> Architecture diagram of the GitHub repository mkarthikeya866-ops/bioactive-molecule-intelligence, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mkarthikeya866-ops/bioactive-molecule-intelligence
- Repository: https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence

## Overview

XGBioactive is a browser-based molecular bioactivity application. Users sign in, enter a molecule as SMILES (or resolve a name), and receive COX-2/EGFR predictions, batch-screening results, or drug-likeness analysis. The API also documents model comparison/data and clinical-use lookup capabilities. The sampled backend excerpt omits much of its route implementation, so internal model and route-level calls are shown only where README evidence supports them; the graph does not infer connections among backend helpers.

Main entry points: [`Backend/app/main.py`](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py) (FastAPI routes), [`Frontend/script.js`](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Frontend/script.js) (Prediction dashboard), [`Frontend/drug-likeness.js`](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Frontend/drug-likeness.js) (Drug-likeness UI), [`Frontend/auth.js`](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Frontend/auth.js) (Login and registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_dashboard["Prediction dashboard<br/>[script.js]"]
  node_batch["Batch screening<br/>[batch-screening.js]"]
  node_drugui["Drug-likeness UI<br/>[drug-likeness.js]"]
end

subgraph group_backend["Prediction API"]
  node_api["FastAPI routes<br/>[main.py]"]
  node_cox2["COX-2 prediction<br/>[main.py]"]
  node_egfr["EGFR prediction<br/>[main.py]"]
  node_batchroute["Batch prediction<br/>[main.py]"]
  node_drugroute["Drug-likeness analysis<br/>[main.py]"]
  node_clinical["Clinical-use lookup<br/>[main.py]"]
  node_modeldata["Model data and metrics<br/>[main.py]"]
end

subgraph group_identity["Identity"]
  node_authui["Login and registration<br/>[auth.js]"]
  node_firebaseconfig["Firebase config loader<br/>[firebase-config.js]"]
end

subgraph group_modeling["Modeling"]
  node_comparison["Classifier comparison<br/>[compare_models.py]"]
  node_rbf["RBF classifier<br/>[rbf_network.py]"]
end

node_user(("Molecule user"))
node_firebase{{"Firebase Authentication"}}
node_pubchem{{"PubChem"}}

node_user -->|"enters molecule"| node_dashboard
node_user -->|"submits batch"| node_batch
node_user -->|"requests analysis"| node_drugui
node_authui -->|"loads config"| node_firebaseconfig
node_firebaseconfig -->|"fetches config"| node_api
node_authui -->|"authenticates user"| node_firebase
node_dashboard -->|"sends prediction"| node_api
node_batch -->|"posts batch"| node_batchroute
node_drugui -->|"posts analysis"| node_drugroute
node_drugui -->|"resolves names"| node_pubchem
node_dashboard -->|"resolves compounds"| node_pubchem
node_api -->|"serves predictions"| node_cox2
node_api -->|"serves predictions"| node_egfr
node_batchroute -->|"reuses inference"| node_cox2
node_batchroute -->|"reuses inference"| node_egfr
node_api -->|"serves analysis"| node_drugroute
node_api -->|"serves lookup"| node_clinical
node_api -->|"serves model data"| node_modeldata
node_comparison -->|"uses classifier"| node_rbf

click node_dashboard "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Frontend/script.js"
click node_batch "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Frontend/batch-screening.js"
click node_drugui "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Frontend/drug-likeness.js"
click node_authui "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Frontend/auth.js"
click node_firebaseconfig "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Frontend/firebase-config.js"
click node_api "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py"
click node_cox2 "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py"
click node_egfr "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py"
click node_batchroute "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py"
click node_drugroute "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py"
click node_clinical "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py"
click node_modeldata "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py"
click node_comparison "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/models/compare_models.py"
click node_rbf "https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/models/rbf_network.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_dashboard,node_batch,node_drugui,node_user toneBlue
class node_api,node_cox2,node_egfr,node_batchroute,node_drugroute,node_clinical,node_modeldata toneAmber
class node_authui,node_firebaseconfig toneMint
class node_comparison,node_rbf toneRose
class node_firebase,node_pubchem toneIndigo
```

## Components

### Web application

- [Prediction dashboard](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Frontend/script.js): `Frontend/script.js`
- [Batch screening](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Frontend/batch-screening.js): `Frontend/batch-screening.js`
- [Drug-likeness UI](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Frontend/drug-likeness.js): `Frontend/drug-likeness.js`

### Prediction API

- [FastAPI routes](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py): `Backend/app/main.py`
- [COX-2 prediction](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py): `Backend/app/main.py`
- [EGFR prediction](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py): `Backend/app/main.py`
- [Batch prediction](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py): `Backend/app/main.py`
- [Drug-likeness analysis](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py): `Backend/app/main.py`
- [Clinical-use lookup](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py): `Backend/app/main.py`
- [Model data and metrics](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/main.py): `Backend/app/main.py`

### Identity

- [Login and registration](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Frontend/auth.js): `Frontend/auth.js`
- [Firebase config loader](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Frontend/firebase-config.js): `Frontend/firebase-config.js`

### Modeling

- [Classifier comparison](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/models/compare_models.py): `Backend/app/models/compare_models.py`
- [RBF classifier](https://github.com/mkarthikeya866-ops/bioactive-molecule-intelligence/blob/main/Backend/app/models/rbf_network.py): `Backend/app/models/rbf_network.py`

### Other components

- **Molecule user**
- **Firebase Authentication**
- **PubChem**

## Connections

- Molecule user → Prediction dashboard: enters molecule (evidence: `README.md`)
- Molecule user → Batch screening: submits batch (evidence: `README.md`)
- Molecule user → Drug-likeness UI: requests analysis (evidence: `README.md`)
- Login and registration → Firebase config loader: loads config (evidence: `Frontend/auth.js`)
- Firebase config loader → FastAPI routes: fetches config (evidence: `Frontend/firebase-config.js`)
- Login and registration → Firebase Authentication: authenticates user (evidence: `Frontend/auth.js`)
- Prediction dashboard → FastAPI routes: sends prediction (evidence: `Frontend/script.js`)
- Batch screening → Batch prediction: posts batch (evidence: `Frontend/batch-screening.js`)
- Drug-likeness UI → Drug-likeness analysis: posts analysis (evidence: `Frontend/drug-likeness.js`)
- Drug-likeness UI → PubChem: resolves names (evidence: `Frontend/drug-likeness.js`)
- Prediction dashboard → PubChem: resolves compounds (evidence: `Frontend/script.js`)
- FastAPI routes → COX-2 prediction: serves predictions (evidence: `README.md`)
- FastAPI routes → EGFR prediction: serves predictions (evidence: `README.md`)
- Batch prediction → COX-2 prediction: reuses inference (evidence: `README.md`)
- Batch prediction → EGFR prediction: reuses inference (evidence: `README.md`)
- FastAPI routes → Drug-likeness analysis: serves analysis (evidence: `README.md`)
- FastAPI routes → Clinical-use lookup: serves lookup (evidence: `README.md`)
- FastAPI routes → Model data and metrics: serves model data (evidence: `README.md`)
- Classifier comparison → RBF classifier: uses classifier (evidence: `Backend/app/models/compare_models.py`)
