# lokesh701449/resist-ai architecture

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

- Interactive diagram: https://gitdiagram.com/lokesh701449/resist-ai
- Repository: https://github.com/lokesh701449/resist-ai

## Overview

ResistAI combines a browser frontend for antibiotic-resistance predictions and dataset administration with Python ML utilities. The user signs in, submits a single or batch prediction, and views results; doctors can also manage dataset entries and inspect metrics. The frontend’s `/api` calls are explicit, but the Python excerpts do not show how those requests are served or how training modules connect, so those links are marked unverified. The README is empty.

Main entry points: [`AI-powered Web App Frontend 3/src/app/routes.jsx`](https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/routes.jsx) (Route Guarding), [`AI-powered Web App Frontend 3/src/app/context/AuthContext.jsx`](https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/context/AuthContext.jsx) (Authentication State), [`AI-powered Web App Frontend 3/src/app/api.js`](https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/api.js) (API Client), [`antibiotic-resistance/ml_api.py`](https://github.com/lokesh701449/resist-ai/blob/main/antibiotic-resistance/ml_api.py) (ML API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend Application"]
  node_app["Application Shell<br/>[App.tsx]"]
  node_routes["Route Guarding<br/>[routes.jsx]"]
  node_auth["Authentication State<br/>[AuthContext.jsx]"]
  node_signin["Sign In<br/>[SignIn.jsx]"]
  node_signup["Sign Up<br/>[SignUp.jsx]"]
  node_navbar["Dashboard Navigation"]
  node_api["API Client<br/>[api.js]"]
end

subgraph group_prediction["Prediction Workflows"]
  node_prediction["Single Prediction<br/>[Prediction.jsx]"]
  node_batch["Batch Processing"]
end

subgraph group_admin["Doctor Administration"]
  node_dashboard["Doctor Dashboard"]
end

subgraph group_ml["ML Toolkit"]
  node_model_api["ML API<br/>[ml_api.py]"]
  node_gui["Desktop GUI<br/>[app_gui.py]"]
  node_preparation["Data Preparation<br/>[data_prep.py]"]
  node_features["Feature Extraction<br/>[features.py]"]
  node_training["Model Training<br/>[train_model.py]"]
  node_benchmark["Model Benchmarking<br/>[model_benchmark.py]"]
end

subgraph group_ui["Interface Components"]
  node_ui_components["Reusable UI Kit"]
end

node_user(("User"))
node_backend{{"ResistAI API"}}

node_user -->|"uses"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"loads routes"| node_routes
node_routes -->|"routes to"| node_signin
node_routes -->|"routes to"| node_signup
node_routes -->|"routes to"| node_prediction
node_routes -->|"routes to"| node_batch
node_routes -->|"routes to"| node_dashboard
node_routes -->|"checks session"| node_auth
node_signin -->|"signs in"| node_auth
node_signup -->|"registers"| node_auth
node_auth -->|"calls auth"| node_api
node_api -->|"sends requests"| node_backend
node_prediction -->|"requests prediction"| node_api
node_batch -->|"requests batch"| node_api
node_dashboard -->|"manages entries"| node_api
node_dashboard -->|"renders"| node_navbar
node_prediction -->|"renders"| node_navbar
node_backend -.->|"may dispatch to"| node_model_api
node_model_api -.->|"may use"| node_preparation
node_model_api -.->|"may use"| node_features
node_model_api -.->|"may load model from"| node_training

click node_app "https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/App.tsx"
click node_routes "https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/routes.jsx"
click node_auth "https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/context/AuthContext.jsx"
click node_signin "https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/pages/SignIn.jsx"
click node_signup "https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/pages/SignUp.jsx"
click node_navbar "https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/components/DashboardNavbar.jsx"
click node_api "https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/api.js"
click node_prediction "https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/pages/Prediction.jsx"
click node_batch "https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/pages/BatchProcessing.jsx"
click node_dashboard "https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/pages/DoctorDashboard.jsx"
click node_model_api "https://github.com/lokesh701449/resist-ai/blob/main/antibiotic-resistance/ml_api.py"
click node_gui "https://github.com/lokesh701449/resist-ai/blob/main/app_gui.py"
click node_preparation "https://github.com/lokesh701449/resist-ai/blob/main/data_prep.py"
click node_features "https://github.com/lokesh701449/resist-ai/blob/main/features.py"
click node_training "https://github.com/lokesh701449/resist-ai/blob/main/train_model.py"
click node_benchmark "https://github.com/lokesh701449/resist-ai/blob/main/model_benchmark.py"
click node_ui_components "https://github.com/lokesh701449/resist-ai/tree/main/AI-powered%20Web%20App%20Frontend%203/src/app/components/ui"

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_routes,node_auth,node_signin,node_signup,node_navbar,node_api,node_user toneBlue
class node_prediction,node_batch toneAmber
class node_dashboard,node_backend toneMint
class node_model_api,node_gui,node_preparation,node_features,node_training,node_benchmark toneRose
class node_ui_components toneIndigo
```

## Components

### Frontend Application

- [Application Shell](https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/App.tsx): `AI-powered Web App Frontend 3/src/app/App.tsx`
- [Route Guarding](https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/routes.jsx): `AI-powered Web App Frontend 3/src/app/routes.jsx`
- [Authentication State](https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/context/AuthContext.jsx): `AI-powered Web App Frontend 3/src/app/context/AuthContext.jsx`
- [Sign In](https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/pages/SignIn.jsx): `AI-powered Web App Frontend 3/src/app/pages/SignIn.jsx`
- [Sign Up](https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/pages/SignUp.jsx): `AI-powered Web App Frontend 3/src/app/pages/SignUp.jsx`
- [Dashboard Navigation](https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/components/DashboardNavbar.jsx): `AI-powered Web App Frontend 3/src/app/components/DashboardNavbar.jsx`
- [API Client](https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/api.js): `AI-powered Web App Frontend 3/src/app/api.js`

### Prediction Workflows

- [Single Prediction](https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/pages/Prediction.jsx): `AI-powered Web App Frontend 3/src/app/pages/Prediction.jsx`
- [Batch Processing](https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/pages/BatchProcessing.jsx): `AI-powered Web App Frontend 3/src/app/pages/BatchProcessing.jsx`

### Doctor Administration

- [Doctor Dashboard](https://github.com/lokesh701449/resist-ai/blob/main/AI-powered%20Web%20App%20Frontend%203/src/app/pages/DoctorDashboard.jsx): `AI-powered Web App Frontend 3/src/app/pages/DoctorDashboard.jsx`

### ML Toolkit

- [ML API](https://github.com/lokesh701449/resist-ai/blob/main/antibiotic-resistance/ml_api.py): `antibiotic-resistance/ml_api.py`
- [Desktop GUI](https://github.com/lokesh701449/resist-ai/blob/main/app_gui.py): `app_gui.py`
- [Data Preparation](https://github.com/lokesh701449/resist-ai/blob/main/data_prep.py): `data_prep.py`
- [Feature Extraction](https://github.com/lokesh701449/resist-ai/blob/main/features.py): `features.py`
- [Model Training](https://github.com/lokesh701449/resist-ai/blob/main/train_model.py): `train_model.py`
- [Model Benchmarking](https://github.com/lokesh701449/resist-ai/blob/main/model_benchmark.py): `model_benchmark.py`

### Interface Components

- [Reusable UI Kit](https://github.com/lokesh701449/resist-ai/tree/main/AI-powered%20Web%20App%20Frontend%203/src/app/components/ui): `AI-powered Web App Frontend 3/src/app/components/ui`

### Other components

- **User**
- **ResistAI API**

## Connections

- User → Application Shell: uses
- Application Shell → Authentication State: provides auth (evidence: `AI-powered Web App Frontend 3/src/app/App.tsx`)
- Application Shell → Route Guarding: loads routes (evidence: `AI-powered Web App Frontend 3/src/app/App.tsx`)
- Route Guarding → Sign In: routes to (evidence: `AI-powered Web App Frontend 3/src/app/routes.jsx`)
- Route Guarding → Sign Up: routes to (evidence: `AI-powered Web App Frontend 3/src/app/routes.jsx`)
- Route Guarding → Single Prediction: routes to (evidence: `AI-powered Web App Frontend 3/src/app/routes.jsx`)
- Route Guarding → Batch Processing: routes to (evidence: `AI-powered Web App Frontend 3/src/app/routes.jsx`)
- Route Guarding → Doctor Dashboard: routes to (evidence: `AI-powered Web App Frontend 3/src/app/routes.jsx`)
- Route Guarding → Authentication State: checks session (evidence: `AI-powered Web App Frontend 3/src/app/routes.jsx`)
- Sign In → Authentication State: signs in (evidence: `AI-powered Web App Frontend 3/src/app/pages/SignIn.jsx`)
- Sign Up → Authentication State: registers (evidence: `AI-powered Web App Frontend 3/src/app/pages/SignUp.jsx`)
- Authentication State → API Client: calls auth (evidence: `AI-powered Web App Frontend 3/src/app/context/AuthContext.jsx`)
- API Client → ResistAI API: sends requests (evidence: `AI-powered Web App Frontend 3/src/app/api.js`)
- Single Prediction → API Client: requests prediction (evidence: `AI-powered Web App Frontend 3/src/app/pages/Prediction.jsx`)
- Batch Processing → API Client: requests batch (evidence: `AI-powered Web App Frontend 3/src/app/pages/BatchProcessing.jsx`)
- Doctor Dashboard → API Client: manages entries (evidence: `AI-powered Web App Frontend 3/src/app/pages/DoctorDashboard.jsx`)
- Doctor Dashboard → Dashboard Navigation: renders (evidence: `AI-powered Web App Frontend 3/src/app/pages/DoctorDashboard.jsx`)
- Single Prediction → Dashboard Navigation: renders (evidence: `AI-powered Web App Frontend 3/src/app/pages/Prediction.jsx`)
- ResistAI API → ML API: may dispatch to
- ML API → Data Preparation: may use
- ML API → Feature Extraction: may use
- ML API → Model Training: may load model from
