# mainakverse/dermopathy-ai architecture

> Architecture diagram of the GitHub repository mainakverse/dermopathy-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mainakverse/dermopathy-ai
- Repository: https://github.com/mainakverse/dermopathy-ai

## Overview

##### Project type and purpose
- This is a machine‐learning–driven web application (built on Flask) for detecting and predicting types of skin diseases from uploaded images.
- The core use case is: User uploads an image → server runs inference with a pre‐trained model → returns disease classification.

##### File structure
- Top level:
- Disease Images/       ← directory of sample or training images
- app.py                ← Flask application entry point, defines routes for upload and prediction
- config.toml           ← application and model configuration (paths, parameters)
- requirements.txt      ← Python dependencies (Flask, TensorFlow/Keras, etc.)
- skin disease detection.ipynb ← exploratory/development notebook
- skin.h5               ← pre‐trained Keras model
- README.md             ← project description and dataset reference
- No separate “frontend” folder – likely uses simple HTML templates in Flask or returns JSON for a minimal UI.
- No explicit database; images may be processed in memory or stored in a local directory.

##### README for additional insights
- Confirms purpose: detect and predict skin disease from images.
- References a Kaggle dataset, but no explicit data‐loading code in the Flask app – preprocessing likely in the notebook and model saved as skin.h5.

## Diagram (Mermaid)

```mermaid
flowchart TD
    classDef client fill:#D6EAF8,stroke:#2980B9,color:#154360
    classDef app fill:#AED6F1,stroke:#1F618D,color:#1B4F72
    classDef config fill:#D5F5E3,stroke:#27AE60,color:#145A32
    classDef ml fill:#F9E79F,stroke:#D68910,color:#7D6608
    classDef data fill:#A9DFBF,stroke:#28B463,color:#1E8449
    classDef dev fill:#F5B7B1,stroke:#C0392B,color:#641E16
    classDef future fill:#D7DBDD,stroke:#85929E,color:#566573

    Client["Client/UI"]:::client
    Flask["Flask Web Server<br/>(app.py)"]:::app
    Config["Configuration Store<br/>(config.toml)"]:::config
    Model["ML Model<br/>(skin.h5)"]:::ml
    Storage["File Storage<br/>(Disease Images/)"]:::data

    subgraph "Development/Offline" 
        Notebook["Jupyter Notebook<br/>(skin disease detection.ipynb)"]:::dev
    end

    subgraph "Project Files"
        Req["Dependencies<br/>(requirements.txt)"]:::future
        Readme["Documentation<br/>(README.md)"]:::future
    end

    Client -->|"HTTP POST (image file)"| Flask
    Flask -->|"load config" | Config
    Flask -->|"store/retrieve image" | Storage
    Flask -->|"preprocess & inference request"| Model
    Model -->|"prediction result"| Flask
    Flask -->|"HTTP Response (JSON/HTML)"| Client

    Notebook -.-> Flask
    Req -.-> Flask
    Readme -.-> Flask

    %% Click Events
    click Flask "https://github.com/mainakverse/dermopathy-ai/blob/main/app.py"
    click Config "https://github.com/mainakverse/dermopathy-ai/blob/main/config.toml"
    click Model "https://github.com/mainakverse/dermopathy-ai/blob/main/skin.h5"
    click Storage "https://github.com/mainakverse/dermopathy-ai/tree/main/Disease Images/"
    click Notebook "https://github.com/mainakverse/dermopathy-ai/blob/main/skin disease detection.ipynb"
    click Req "https://github.com/mainakverse/dermopathy-ai/blob/main/requirements.txt"
    click Readme "https://github.com/mainakverse/dermopathy-ai/blob/main/README.md"
```
