# thehanys/electronic-nose-graduation-project architecture

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

- Interactive diagram: https://gitdiagram.com/thehanys/electronic-nose-graduation-project
- Repository: https://github.com/thehanys/electronic-nose-graduation-project

## Overview

The repository describes an electronic-nose system: Arduino-based gas sensing feeds data preparation and odor/motion classification, with abnormality alerts intended for a mobile app. The README documents that end-to-end workflow and model alternatives; the tree also shows separate Processing interfaces, Raspberry Pi smoke detection, and a Socket.IO alert relay. Source excerpts are limited, so app-screen behavior and connections among the mobile app, Firebase, and relay are not asserted beyond the documented alert capability.

Main entry points: [`Processing Codes`](https://github.com/thehanys/electronic-nose-graduation-project/tree/main/Processing%20Codes) (Data preprocessing), [`enos_app/app.js`](https://github.com/thehanys/electronic-nose-graduation-project/blob/main/enos_app/app.js) (Socket.IO alert relay), [`Arduino Uno Codes/All_sensors.ino`](https://github.com/thehanys/electronic-nose-graduation-project/blob/main/Arduino%20Uno%20Codes/All_sensors.ino) (Arduino acquisition), [`ML Model/ML Model.ipynb`](https://github.com/thehanys/electronic-nose-graduation-project/blob/main/ML%20Model/ML%20Model.ipynb) (Model training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Gas sensing"]
  node_gas_sensors{{"Gas sensors"}}
  node_arduino["Arduino acquisition<br/>[All_sensors.ino]"]
  node_pi_smoke["Pi smoke detection<br/>[mq2.py]"]
end

subgraph group_analysis["Data and classification"]
  node_datasets[("Gas datasets")]
  node_preprocessing["Data preprocessing"]
  node_model["Model training<br/>[ML Model.ipynb]"]
  node_classification["Gas and motion classification"]
end

subgraph group_alerts["Alerts and relay"]
  node_abnormality["Abnormality analysis<br/>[Alerts.pde]"]
  node_socket_relay["Socket.IO alert relay<br/>[app.js]"]
end

subgraph group_mobile["Mobile application"]
  node_mobile_app["E-Nose mobile app"]
  node_alert_history["Alert history<br/>[alerthistory.dart]"]
  node_location["Location views<br/>[location_page.dart]"]
  node_profile["User profile<br/>[profile.dart]"]
end

node_user(("User"))
node_mobile_user(("Mobile user"))
node_socket_clients(("Socket clients"))

node_gas_sensors -->|"provide signals"| node_arduino
node_arduino -->|"feeds readings"| node_preprocessing
node_datasets -->|"supplies data"| node_preprocessing
node_preprocessing -->|"prepares data"| node_model
node_model -->|"supports classification"| node_classification
node_classification -->|"checks results"| node_abnormality
node_abnormality -->|"notifies user"| node_mobile_app
node_user -.->|"uses"| node_mobile_app
node_pi_smoke -.->|"may report alerts"| node_socket_relay
node_socket_clients -->|"connect"| node_socket_relay
node_socket_relay -->|"broadcasts alerts"| node_socket_clients
node_mobile_user -.->|"views alerts"| node_alert_history
node_mobile_user -.->|"views location"| node_location
node_mobile_user -.->|"manages profile"| node_profile

click node_arduino "https://github.com/thehanys/electronic-nose-graduation-project/blob/main/Arduino%20Uno%20Codes/All_sensors.ino"
click node_pi_smoke "https://github.com/thehanys/electronic-nose-graduation-project/blob/main/Raspberry%20Pi%20Codes/mq2.py"
click node_datasets "https://github.com/thehanys/electronic-nose-graduation-project/tree/main/Datasets"
click node_preprocessing "https://github.com/thehanys/electronic-nose-graduation-project/tree/main/Processing%20Codes"
click node_model "https://github.com/thehanys/electronic-nose-graduation-project/blob/main/ML%20Model/ML%20Model.ipynb"
click node_classification "https://github.com/thehanys/electronic-nose-graduation-project/tree/main/Processing%20Codes"
click node_abnormality "https://github.com/thehanys/electronic-nose-graduation-project/blob/main/Processing%20Codes/Alerts.pde"
click node_socket_relay "https://github.com/thehanys/electronic-nose-graduation-project/blob/main/enos_app/app.js"
click node_mobile_app "https://github.com/thehanys/electronic-nose-graduation-project/tree/main/enos_app/lib"
click node_alert_history "https://github.com/thehanys/electronic-nose-graduation-project/blob/main/enos_app/lib/screens/alerthistory.dart"
click node_location "https://github.com/thehanys/electronic-nose-graduation-project/blob/main/enos_app/lib/screens/location_page.dart"
click node_profile "https://github.com/thehanys/electronic-nose-graduation-project/blob/main/enos_app/lib/screens/profile.dart"

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_gas_sensors,node_arduino,node_pi_smoke,node_user,node_mobile_user,node_socket_clients toneBlue
class node_datasets,node_preprocessing,node_model,node_classification toneAmber
class node_abnormality,node_socket_relay toneMint
class node_mobile_app,node_alert_history,node_location,node_profile toneRose
```

## Components

### Gas sensing

- **Gas sensors**
- [Arduino acquisition](https://github.com/thehanys/electronic-nose-graduation-project/blob/main/Arduino%20Uno%20Codes/All_sensors.ino): `Arduino Uno Codes/All_sensors.ino`
- [Pi smoke detection](https://github.com/thehanys/electronic-nose-graduation-project/blob/main/Raspberry%20Pi%20Codes/mq2.py): `Raspberry Pi Codes/mq2.py`

### Data and classification

- [Gas datasets](https://github.com/thehanys/electronic-nose-graduation-project/tree/main/Datasets): `Datasets`
- [Data preprocessing](https://github.com/thehanys/electronic-nose-graduation-project/tree/main/Processing%20Codes): `Processing Codes`
- [Model training](https://github.com/thehanys/electronic-nose-graduation-project/blob/main/ML%20Model/ML%20Model.ipynb): `ML Model/ML Model.ipynb`
- [Gas and motion classification](https://github.com/thehanys/electronic-nose-graduation-project/tree/main/Processing%20Codes): `Processing Codes`

### Alerts and relay

- [Abnormality analysis](https://github.com/thehanys/electronic-nose-graduation-project/blob/main/Processing%20Codes/Alerts.pde): `Processing Codes/Alerts.pde`
- [Socket.IO alert relay](https://github.com/thehanys/electronic-nose-graduation-project/blob/main/enos_app/app.js): `enos_app/app.js`

### Mobile application

- [E-Nose mobile app](https://github.com/thehanys/electronic-nose-graduation-project/tree/main/enos_app/lib): `enos_app/lib`
- [Alert history](https://github.com/thehanys/electronic-nose-graduation-project/blob/main/enos_app/lib/screens/alerthistory.dart): `enos_app/lib/screens/alerthistory.dart`
- [Location views](https://github.com/thehanys/electronic-nose-graduation-project/blob/main/enos_app/lib/screens/location_page.dart): `enos_app/lib/screens/location_page.dart`
- [User profile](https://github.com/thehanys/electronic-nose-graduation-project/blob/main/enos_app/lib/screens/profile.dart): `enos_app/lib/screens/profile.dart`

### Other components

- **User**
- **Mobile user**
- **Socket clients**

## Connections

- Gas sensors → Arduino acquisition: provide signals (evidence: `README.md`)
- Arduino acquisition → Data preprocessing: feeds readings (evidence: `README.md`)
- Gas datasets → Data preprocessing: supplies data (evidence: `README.md`)
- Data preprocessing → Model training: prepares data (evidence: `README.md`)
- Model training → Gas and motion classification: supports classification (evidence: `README.md`)
- Gas and motion classification → Abnormality analysis: checks results (evidence: `README.md`)
- Abnormality analysis → E-Nose mobile app: notifies user (evidence: `README.md`)
- User → E-Nose mobile app: uses
- Pi smoke detection → Socket.IO alert relay: may report alerts
- Socket clients → Socket.IO alert relay: connect (evidence: `enos_app/app.js`)
- Socket.IO alert relay → Socket clients: broadcasts alerts (evidence: `enos_app/app.js`)
- Mobile user → Alert history: views alerts
- Mobile user → Location views: views location
- Mobile user → User profile: manages profile
