# rohan271004/skin-disease-prediction-cnn architecture

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

- Interactive diagram: https://gitdiagram.com/rohan271004/skin-disease-prediction-cnn
- Repository: https://github.com/rohan271004/skin-disease-prediction-cnn

## Overview

This is a full-stack skin-disease image classifier. A user selects an image in the React interface, which submits it to a Django prediction endpoint; the interface then presents a result. The README describes CNN inference, but backend views and model-training code were not sampled, and the tree does not show a trained model file. Accordingly, backend inference connections are marked unverified rather than presenting an assumed internal pipeline.

Main entry points: [`backend/api/views.py`](https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/backend/api/views.py) (Prediction handler), [`frontend/cnn/src/components/Disease.jsx`](https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/frontend/cnn/src/components/Disease.jsx) (Image upload), [`frontend/cnn/src/App.jsx`](https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/frontend/cnn/src/App.jsx) (React app routes), [`backend/api/urls.py`](https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/backend/api/urls.py) (API endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User interface"]
  node_app["React app routes<br/>[App.jsx]"]
  node_upload["Image upload<br/>[Disease.jsx]"]
  node_result["Prediction result<br/>[Result.jsx]"]
end

subgraph group_backend["Django backend"]
  node_project_routes["API routing<br/>[urls.py]"]
  node_api_routes["API endpoints<br/>[urls.py]"]
  node_predict["Prediction handler<br/>[views.py]"]
end

subgraph group_ml["Classification"]
  node_classifier["CNN classifier"]
  node_training["Model training<br/>[train_model.py]"]
end

node_user(("Image submitter"))

node_user -->|"selects image"| node_upload
node_app -->|"routes to"| node_upload
node_app -->|"routes to"| node_result
node_upload -->|"posts image"| node_predict
node_predict -.->|"returns prediction"| node_upload
node_project_routes -->|"includes routes"| node_api_routes
node_api_routes -.->|"dispatches to"| node_predict
node_predict -.->|"runs inference"| node_classifier
node_training -.->|"trains model"| node_classifier

click node_app "https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/frontend/cnn/src/App.jsx"
click node_upload "https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/frontend/cnn/src/components/Disease.jsx"
click node_result "https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/frontend/cnn/src/components/Result.jsx"
click node_project_routes "https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/backend/skin_disease_backend/urls.py"
click node_api_routes "https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/backend/api/urls.py"
click node_predict "https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/backend/api/views.py"
click node_training "https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/backend/train_model.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_upload,node_result toneBlue
class node_project_routes,node_api_routes,node_predict toneAmber
class node_classifier,node_training toneMint
class node_user toneIndigo
```

## Components

### User interface

- [React app routes](https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/frontend/cnn/src/App.jsx): `frontend/cnn/src/App.jsx`
- [Image upload](https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/frontend/cnn/src/components/Disease.jsx): `frontend/cnn/src/components/Disease.jsx`
- [Prediction result](https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/frontend/cnn/src/components/Result.jsx): `frontend/cnn/src/components/Result.jsx`

### Django backend

- [API routing](https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/backend/skin_disease_backend/urls.py): `backend/skin_disease_backend/urls.py`
- [API endpoints](https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/backend/api/urls.py): `backend/api/urls.py`
- [Prediction handler](https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/backend/api/views.py): `backend/api/views.py`

### Classification

- **CNN classifier**
- [Model training](https://github.com/rohan271004/skin-disease-prediction-cnn/blob/main/backend/train_model.py): `backend/train_model.py`

### Other components

- **Image submitter**

## Connections

- Image submitter → Image upload: selects image (evidence: `frontend/cnn/src/components/Disease.jsx`)
- React app routes → Image upload: routes to (evidence: `frontend/cnn/src/App.jsx`)
- React app routes → Prediction result: routes to (evidence: `frontend/cnn/src/App.jsx`)
- Image upload → Prediction handler: posts image (evidence: `frontend/cnn/src/components/Disease.jsx`)
- Prediction handler → Image upload: returns prediction
- API routing → API endpoints: includes routes (evidence: `backend/skin_disease_backend/urls.py`)
- API endpoints → Prediction handler: dispatches to
- Prediction handler → CNN classifier: runs inference
- Model training → CNN classifier: trains model
