# m-awais-11/clinipaws architecture

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

- Interactive diagram: https://gitdiagram.com/m-awais-11/clinipaws
- Repository: https://github.com/m-awais-11/clinipaws

## Overview

CliniPaws is a Django livestock-disease reporting application. Farm owners and other users submit symptom or animal-image reports; the prediction views invoke the relevant classifier or detector, save report records, and present results. The product also includes account and OTP recovery flows, doctor authentication and comments, report PDFs, chat, and administrative user/message management. The views excerpt and SOURCE INDEX support the main orchestration links; some secondary integrations are documented but their call sites are not fully shown.

Main entry points: [`predictions/views.py`](https://github.com/m-awais-11/clinipaws/blob/main/predictions/views.py) (Prediction workflows), [`accounts/views.py`](https://github.com/m-awais-11/clinipaws/blob/main/accounts/views.py) (Account workflows), [`accounts/admin.py`](https://github.com/m-awais-11/clinipaws/blob/main/accounts/admin.py) (Django admin), [`Roboflow/detector.py`](https://github.com/m-awais-11/clinipaws/blob/main/Roboflow/detector.py) (Image detector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web workflows"]
  node_prediction_views["Prediction workflows<br/>[views.py]"]
  node_prediction_forms["Report forms<br/>[forms.py]"]
  node_chat["AI chat<br/>[views.py]"]
  node_pdf["Bilingual PDFs<br/>[pdf_utils.py]"]
end

subgraph group_diagnosis["Disease analysis"]
  node_symptom_model["Symptom classifier"]
  node_image_detector["Image detector<br/>[detector.py]"]
end

subgraph group_accounts["Accounts and support"]
  node_account_views["Account workflows<br/>[views.py]"]
  node_account_forms["Account forms<br/>[forms.py]"]
  node_otp["Password reset OTP<br/>[otp_models.py]"]
  node_user_data[("Users and activity<br/>[models.py]")]
  node_admin["Django admin<br/>[admin.py]"]
end

subgraph group_data["Reports and persistence"]
  node_report_data[("Disease reports<br/>[models.py]")]
end

node_user(("Application user"))
node_roboflow["Roboflow inference"]
node_email["Email service"]

node_user -.->|"submits reports"| node_prediction_views
node_prediction_views -->|"validates input"| node_prediction_forms
node_prediction_views -->|"classifies symptoms"| node_symptom_model
node_prediction_views -->|"analyzes images"| node_image_detector
node_image_detector -->|"requests inference"| node_roboflow
node_prediction_views -->|"saves reports"| node_report_data
node_prediction_views -->|"generates PDFs"| node_pdf
node_user -.->|"manages account"| node_account_views
node_account_views -->|"validates credentials"| node_account_forms
node_account_views -->|"creates reset codes"| node_otp
node_account_views -->|"reads user"| node_user_data
node_account_views -->|"sends reset email"| node_email
node_user -.->|"sends questions"| node_chat
node_admin -->|"manages accounts"| node_user_data
node_admin -->|"manages reports"| node_report_data

click node_prediction_views "https://github.com/m-awais-11/clinipaws/blob/main/predictions/views.py"
click node_prediction_forms "https://github.com/m-awais-11/clinipaws/blob/main/predictions/forms.py"
click node_chat "https://github.com/m-awais-11/clinipaws/blob/main/predictions/views.py"
click node_pdf "https://github.com/m-awais-11/clinipaws/blob/main/livestock_disease_prediction/pdf_utils.py"
click node_symptom_model "https://github.com/m-awais-11/clinipaws/blob/main/Logistic%20Regression%20classifier/Logistic_Regression.py"
click node_image_detector "https://github.com/m-awais-11/clinipaws/blob/main/Roboflow/detector.py"
click node_account_views "https://github.com/m-awais-11/clinipaws/blob/main/accounts/views.py"
click node_account_forms "https://github.com/m-awais-11/clinipaws/blob/main/accounts/forms.py"
click node_otp "https://github.com/m-awais-11/clinipaws/blob/main/accounts/otp_models.py"
click node_user_data "https://github.com/m-awais-11/clinipaws/blob/main/accounts/models.py"
click node_report_data "https://github.com/m-awais-11/clinipaws/blob/main/predictions/models.py"
click node_admin "https://github.com/m-awais-11/clinipaws/blob/main/accounts/admin.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_prediction_views,node_prediction_forms,node_chat,node_pdf,node_user toneBlue
class node_symptom_model,node_image_detector toneAmber
class node_account_views,node_account_forms,node_otp,node_user_data,node_admin toneMint
class node_report_data toneRose
class node_roboflow,node_email toneIndigo
```

## Components

### Web workflows

- [Prediction workflows](https://github.com/m-awais-11/clinipaws/blob/main/predictions/views.py): `predictions/views.py`
- [Report forms](https://github.com/m-awais-11/clinipaws/blob/main/predictions/forms.py): `predictions/forms.py`
- [AI chat](https://github.com/m-awais-11/clinipaws/blob/main/predictions/views.py): `predictions/views.py`
- [Bilingual PDFs](https://github.com/m-awais-11/clinipaws/blob/main/livestock_disease_prediction/pdf_utils.py): `livestock_disease_prediction/pdf_utils.py`

### Disease analysis

- [Symptom classifier](https://github.com/m-awais-11/clinipaws/blob/main/Logistic%20Regression%20classifier/Logistic_Regression.py): `Logistic Regression classifier/Logistic_Regression.py`
- [Image detector](https://github.com/m-awais-11/clinipaws/blob/main/Roboflow/detector.py): `Roboflow/detector.py`

### Accounts and support

- [Account workflows](https://github.com/m-awais-11/clinipaws/blob/main/accounts/views.py): `accounts/views.py`
- [Account forms](https://github.com/m-awais-11/clinipaws/blob/main/accounts/forms.py): `accounts/forms.py`
- [Password reset OTP](https://github.com/m-awais-11/clinipaws/blob/main/accounts/otp_models.py): `accounts/otp_models.py`
- [Users and activity](https://github.com/m-awais-11/clinipaws/blob/main/accounts/models.py): `accounts/models.py`
- [Django admin](https://github.com/m-awais-11/clinipaws/blob/main/accounts/admin.py): `accounts/admin.py`

### Reports and persistence

- [Disease reports](https://github.com/m-awais-11/clinipaws/blob/main/predictions/models.py): `predictions/models.py`

### Other components

- **Application user**
- **Roboflow inference**
- **Email service**

## Connections

- Application user → Prediction workflows: submits reports
- Prediction workflows → Report forms: validates input (evidence: `predictions/views.py`)
- Prediction workflows → Symptom classifier: classifies symptoms (evidence: `predictions/views.py`)
- Prediction workflows → Image detector: analyzes images (evidence: `predictions/views.py`)
- Image detector → Roboflow inference: requests inference (evidence: `Roboflow/detector.py`)
- Prediction workflows → Disease reports: saves reports (evidence: `predictions/views.py`)
- Prediction workflows → Bilingual PDFs: generates PDFs (evidence: `predictions/views.py`)
- Application user → Account workflows: manages account
- Account workflows → Account forms: validates credentials (evidence: `accounts/views.py`)
- Account workflows → Password reset OTP: creates reset codes (evidence: `accounts/views.py`)
- Account workflows → Users and activity: reads user (evidence: `accounts/views.py`)
- Account workflows → Email service: sends reset email (evidence: `accounts/views.py`)
- Application user → AI chat: sends questions
- Django admin → Users and activity: manages accounts (evidence: `accounts/admin.py`)
- Django admin → Disease reports: manages reports
