# mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning architecture

> Architecture diagram of the GitHub repository mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning
- Repository: https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning

## Overview

This is a fruit-ripeness web application: users sign up or log in, upload an image, receive a fruit/ripeness classification with confidence, and can view prediction history. The Django API also supports user administration and prediction-record management; the React app exposes these features through routed screens. The README documents the image preprocessing and MobileNetV2 workflow, but the sampled backend excerpt shows only part of that implementation. Frontend-to-backend links are shown where an excerpt exposes the API request; other unsampled wiring is omitted.

Main entry points: [`Front-End/Fruits_ripeness_object_detection_project/src/index.tsx`](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/index.tsx) (Screen router), [`Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/views.py`](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/views.py) (Prediction endpoints), [`Back-End/Fruits_ripeness_object_detection_project/myproject/accounts/views.py`](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/accounts/views.py) (Account endpoints), [`Front-End/Fruits_ripeness_object_detection_project/src/components/dashboard.tsx`](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/dashboard.tsx) (User dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React application"]
  node_router["Screen router<br/>[index.tsx]"]
  node_login["Login<br/>[Login.tsx]"]
  node_signup["Sign up<br/>[signup.tsx]"]
  node_home["Home<br/>[home.tsx]"]
  node_upload["Image upload<br/>[imageupload.tsx]"]
  node_prediction_ui["Prediction view<br/>[Prediction.tsx]"]
  node_records_ui["Prediction history<br/>[records.tsx]"]
  node_about["About<br/>[about.tsx]"]
  node_dashboard["User dashboard<br/>[dashboard.tsx]"]
  node_admin_panel["Record management<br/>[admin_panel.tsx]"]
end

subgraph group_api["Django API"]
  node_accounts_api["Account endpoints<br/>[views.py]"]
  node_account_routes["Account routes<br/>[urls.py]"]
  node_prediction_api["Prediction endpoints<br/>[views.py]"]
  node_prediction_routes["Prediction routes<br/>[urls.py]"]
  node_project_config["API configuration<br/>[settings.py]"]
  node_classifier["MobileNetV2 classifier<br/>[views.py]"]
end

subgraph group_data["Models and persistence"]
  node_user_model["User model<br/>[models.py]"]
  node_prediction_model["Prediction records<br/>[models.py]"]
  node_sqlite[("SQLite database<br/>[settings.py]")]
end

node_user(("User"))
node_mail["Email service"]

node_user -->|"opens"| node_router
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_signup
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_upload
node_router -->|"routes to"| node_prediction_ui
node_router -->|"routes to"| node_records_ui
node_router -->|"routes to"| node_about
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_admin_panel
node_signup -.->|"registers via"| node_accounts_api
node_login -.->|"authenticates via"| node_accounts_api
node_dashboard -.->|"manages users via"| node_accounts_api
node_upload -->|"posts image"| node_prediction_api
node_prediction_ui -->|"posts image"| node_prediction_api
node_records_ui -->|"fetches history"| node_prediction_api
node_dashboard -->|"fetches count"| node_prediction_api
node_admin_panel -.->|"manages records via"| node_prediction_api
node_account_routes -->|"routes requests"| node_accounts_api
node_prediction_routes -->|"routes requests"| node_prediction_api
node_accounts_api -->|"reads and writes"| node_user_model
node_prediction_api -->|"reads and writes"| node_prediction_model
node_prediction_api -->|"classifies image"| node_classifier
node_classifier -->|"stores result"| node_prediction_model
node_user_model -.->|"persists in"| node_sqlite
node_prediction_model -.->|"persists in"| node_sqlite
node_project_config -->|"configures"| node_sqlite
node_accounts_api -.->|"sends reset email"| node_mail

click node_router "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/index.tsx"
click node_login "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/Login.tsx"
click node_signup "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/signup.tsx"
click node_home "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/home.tsx"
click node_upload "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/imageupload.tsx"
click node_prediction_ui "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/Prediction.tsx"
click node_records_ui "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/records.tsx"
click node_about "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/about.tsx"
click node_dashboard "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/dashboard.tsx"
click node_admin_panel "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/admin_panel.tsx"
click node_accounts_api "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/accounts/views.py"
click node_account_routes "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/accounts/urls.py"
click node_prediction_api "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/views.py"
click node_prediction_routes "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/urls.py"
click node_project_config "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/myproject/settings.py"
click node_user_model "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/accounts/models.py"
click node_prediction_model "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/models.py"
click node_sqlite "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/myproject/settings.py"
click node_classifier "https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/views.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_router,node_login,node_signup,node_home,node_upload,node_prediction_ui,node_records_ui,node_about,node_dashboard,node_admin_panel,node_user toneBlue
class node_accounts_api,node_account_routes,node_prediction_api,node_prediction_routes,node_project_config,node_classifier toneAmber
class node_user_model,node_prediction_model,node_sqlite toneMint
class node_mail toneIndigo
```

## Components

### React application

- [Screen router](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/index.tsx): `Front-End/Fruits_ripeness_object_detection_project/src/index.tsx`
- [Login](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/Login.tsx): `Front-End/Fruits_ripeness_object_detection_project/src/components/Login.tsx`
- [Sign up](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/signup.tsx): `Front-End/Fruits_ripeness_object_detection_project/src/components/signup.tsx`
- [Home](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/home.tsx): `Front-End/Fruits_ripeness_object_detection_project/src/components/home.tsx`
- [Image upload](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/imageupload.tsx): `Front-End/Fruits_ripeness_object_detection_project/src/components/imageupload.tsx`
- [Prediction view](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/Prediction.tsx): `Front-End/Fruits_ripeness_object_detection_project/src/components/Prediction.tsx`
- [Prediction history](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/records.tsx): `Front-End/Fruits_ripeness_object_detection_project/src/components/records.tsx`
- [About](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/about.tsx): `Front-End/Fruits_ripeness_object_detection_project/src/components/about.tsx`
- [User dashboard](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/dashboard.tsx): `Front-End/Fruits_ripeness_object_detection_project/src/components/dashboard.tsx`
- [Record management](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Front-End/Fruits_ripeness_object_detection_project/src/components/admin_panel.tsx): `Front-End/Fruits_ripeness_object_detection_project/src/components/admin_panel.tsx`

### Django API

- [Account endpoints](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/accounts/views.py): `Back-End/Fruits_ripeness_object_detection_project/myproject/accounts/views.py`
- [Account routes](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/accounts/urls.py): `Back-End/Fruits_ripeness_object_detection_project/myproject/accounts/urls.py`
- [Prediction endpoints](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/views.py): `Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/views.py`
- [Prediction routes](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/urls.py): `Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/urls.py`
- [API configuration](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/myproject/settings.py): `Back-End/Fruits_ripeness_object_detection_project/myproject/myproject/settings.py`
- [MobileNetV2 classifier](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/views.py): `Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/views.py`

### Models and persistence

- [User model](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/accounts/models.py): `Back-End/Fruits_ripeness_object_detection_project/myproject/accounts/models.py`
- [Prediction records](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/models.py): `Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/models.py`
- [SQLite database](https://github.com/mtoqeer-shahzad/fruit-ripeness-object-detection-using-deep-learning/blob/main/Back-End/Fruits_ripeness_object_detection_project/myproject/myproject/settings.py): `Back-End/Fruits_ripeness_object_detection_project/myproject/myproject/settings.py`

### Other components

- **User**
- **Email service**

## Connections

- User → Screen router: opens (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/index.tsx`)
- Screen router → Login: routes to (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/index.tsx`)
- Screen router → Sign up: routes to (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/index.tsx`)
- Screen router → Home: routes to (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/index.tsx`)
- Screen router → Image upload: routes to (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/index.tsx`)
- Screen router → Prediction view: routes to (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/index.tsx`)
- Screen router → Prediction history: routes to (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/index.tsx`)
- Screen router → About: routes to (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/index.tsx`)
- Screen router → User dashboard: routes to (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/index.tsx`)
- Screen router → Record management: routes to (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/index.tsx`)
- Sign up → Account endpoints: registers via
- Login → Account endpoints: authenticates via
- User dashboard → Account endpoints: manages users via
- Image upload → Prediction endpoints: posts image (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/components/imageupload.tsx`)
- Prediction view → Prediction endpoints: posts image (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/components/Prediction.tsx`)
- Prediction history → Prediction endpoints: fetches history (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/components/records.tsx`)
- User dashboard → Prediction endpoints: fetches count (evidence: `Front-End/Fruits_ripeness_object_detection_project/src/components/dashboard.tsx`)
- Record management → Prediction endpoints: manages records via
- Account routes → Account endpoints: routes requests (evidence: `Back-End/Fruits_ripeness_object_detection_project/myproject/accounts/urls.py`)
- Prediction routes → Prediction endpoints: routes requests (evidence: `Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/urls.py`)
- Account endpoints → User model: reads and writes (evidence: `Back-End/Fruits_ripeness_object_detection_project/myproject/accounts/views.py`)
- Prediction endpoints → Prediction records: reads and writes (evidence: `Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/views.py`)
- Prediction endpoints → MobileNetV2 classifier: classifies image (evidence: `Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/views.py`)
- MobileNetV2 classifier → Prediction records: stores result (evidence: `Back-End/Fruits_ripeness_object_detection_project/myproject/prediction/views.py`)
- User model → SQLite database: persists in
- Prediction records → SQLite database: persists in
- API configuration → SQLite database: configures (evidence: `Back-End/Fruits_ripeness_object_detection_project/myproject/myproject/settings.py`)
- Account endpoints → Email service: sends reset email
