# shubhamjh4/airsense360 architecture

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

- Interactive diagram: https://gitdiagram.com/shubhamjh4/airsense360
- Repository: https://github.com/shubhamjh4/airsense360

## Overview

##### Project type and purpose
- This is a full-stack web application with a React/Vite front end and a Node.js back end that incorporates a Python-based ML model.
- The front end is built using Vite for bundling and HMR, React for UI, TailwindCSS for styling, and ESLint for linting. The back end exposes an HTTP API (server.js) and invokes a Python ML model (ml_model.py) for prediction or data processing.

##### File structure
- Top-level:
- index.html, public/  → static assets and HTML entry point for the React app
- src/  → React source code (components, styles, assets)
- vite.config.js, tailwind.config.js, postcss.config.js, eslint.config.js  → build and lint configuration
- package.json, package-lock.json  → front-end dependencies and scripts
- backend/:
- server.js  → Node.js HTTP server (likely Express) exposing REST endpoints
- ml_model.py  → Python module for ML inference
- package.json, package-lock.json  → back-end dependencies and scripts

##### README for additional insights
- Confirms minimal setup for React + Vite, mentions official plugins for Fast Refresh, recommends ESLint and TypeScript (not yet used here).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Frontend"
        direction TB
        Browser["Browser"]:::external
        Vite["Vite Dev Server"]:::devtool
        ESLint["ESLint"]:::devtool
        ReactApp["React App"]:::frontend
        MainEntry["main.jsx"]:::frontend
        RootApp["App.jsx"]:::frontend
        AirSense["AirSense360.jsx"]:::frontend
        StylesGlobal["index.css"]:::frontend
        StylesApp["App.css"]:::frontend
        Assets["src/assets/"]:::frontend
        HTML["index.html"]:::frontend
        Public["public/"]:::frontend
        Tailwind["TailwindCSS"]:::devtool
        PostCSS["PostCSS"]:::devtool
        FE_pkg["package.json"]:::devtool
        FE_lock["package-lock.json"]:::devtool
    end

    subgraph "Backend"
        direction TB
        Express["Express API (server.js)"]:::backend
        ML["Python ML Model (ml_model.py)"]:::backend
        BE_pkg["backend/package.json"]:::backend
        BE_lock["backend/package-lock.json"]:::backend
    end

    Browser -->|"loads"| Vite
    Vite -.->|"HMR"| ReactApp
    ESLint -.->|"linting"| ReactApp
    Vite -->|"serves"| HTML
    ReactApp -->|"HTTP Requests"| Express
    Express -->|"invoke ML"| ML
    ML -->|"results"| Express
    Express -->|"HTTP Response"| ReactApp

    classDef frontend fill:#B2F5EA,stroke:#333,stroke-width:1px
    classDef backend fill:#fef2c0,stroke:#333,stroke-width:1px
    classDef devtool fill:#e0e0e0,stroke:#333,stroke-width:1px
    classDef external fill:#c6dbef,stroke:#333,stroke-width:1px

    click ReactApp "https://github.com/shubhamjh4/airsense360/tree/main/src/"
    click MainEntry "https://github.com/shubhamjh4/airsense360/blob/main/src/main.jsx"
    click RootApp "https://github.com/shubhamjh4/airsense360/blob/main/src/App.jsx"
    click AirSense "https://github.com/shubhamjh4/airsense360/blob/main/src/components/AirSense360.jsx"
    click StylesGlobal "https://github.com/shubhamjh4/airsense360/blob/main/src/index.css"
    click StylesApp "https://github.com/shubhamjh4/airsense360/blob/main/src/App.css"
    click Assets "https://github.com/shubhamjh4/airsense360/tree/main/src/assets/"
    click HTML "https://github.com/shubhamjh4/airsense360/blob/main/index.html"
    click Public "https://github.com/shubhamjh4/airsense360/tree/main/public/"
    click Vite "https://github.com/shubhamjh4/airsense360/blob/main/vite.config.js"
    click Tailwind "https://github.com/shubhamjh4/airsense360/blob/main/tailwind.config.js"
    click PostCSS "https://github.com/shubhamjh4/airsense360/blob/main/postcss.config.js"
    click ESLint "https://github.com/shubhamjh4/airsense360/blob/main/eslint.config.js"
    click FE_pkg "https://github.com/shubhamjh4/airsense360/blob/main/package.json"
    click FE_lock "https://github.com/shubhamjh4/airsense360/blob/main/package-lock.json"
    click Express "https://github.com/shubhamjh4/airsense360/blob/main/backend/server.js"
    click ML "https://github.com/shubhamjh4/airsense360/blob/main/backend/ml_model.py"
    click BE_pkg "https://github.com/shubhamjh4/airsense360/blob/main/backend/package.json"
    click BE_lock "https://github.com/shubhamjh4/airsense360/blob/main/backend/package-lock.json"
```
