# iot-wizard/parkingproject architecture

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

- Interactive diagram: https://gitdiagram.com/iot-wizard/parkingproject
- Repository: https://github.com/iot-wizard/parkingproject

## Overview

##### Project Type and Purpose
- Name: “parkingProject”
- Purpose: The project appears to be a full-stack parking management solution. It likely handles user registration, car and badge management, and parking monitoring. In addition, there is an integration with camera-based services and Arduino-based scripts that may work with hardware (such as sensors or camera modules).

##### Analysis of the File Structure
- Client (Frontend):
– Located within the “client” directory, it is built with JavaScript (React given the .jsx files) and styling (SCSS/CSS).
– Contains several pages (e.g., signIn, signUp, home, profile, admin, AddBadgeForm) suggesting user interface views for different roles and functionalities.
– Vite’s configuration indicates a modern frontend build tool setup.
- Service (Backend):
– The “service” directory contains Python modules (e.g., Car.py, ParkingHistory.py, Subscription.py, user.py) with a main.py serving as the entry point.
– There is a “database” folder and table definitions (tables.py), hinting at persistent storage (likely a relational database).
- serviceCam (Camera Service):
– This directory contains code (mainC.py and additional scripts under “test”) which likely deals with handling camera input, image processing, or text recognition (as seen from textReconCam.py and textReconImg.py).
- Arduino:
– Although typically Arduino sketches are in C/C++, here you have Python files (CameraMain.py and arduinoMain.py) which perhaps interface with hardware or simulate Arduino behavior, relating to sensor or camera control in a parking context.

##### Final Recommendations
- Being detailed means capturing all flows and dependencies – list key endpoints, middleware interactions, and any configuration nuances that are apparent from file names and directory structure.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Frontend Layer
    subgraph "Frontend Layer"
        FE["Client (React UI)"]:::frontend
    end

    %% Backend API Subgraph
    subgraph "Backend API"
        BE_Main["Main (Entry Point)"]:::backend
        BE_Car["Car Module"]:::backend
        BE_Parking["ParkingHistory Module"]:::backend
        BE_Sub["Subscription Module"]:::backend
        BE_User["User Module"]:::backend
    end

    %% Database Subgraph
    subgraph "Database"
        DB_Folder["Database Folder"]:::database
        DB_Tables["Tables Definition"]:::database
    end

    %% Camera Service Subgraph
    subgraph "Camera Service"
        CAM["Main Camera Service"]:::cameras
    end

    %% Arduino Module Subgraph
    subgraph "Arduino Module"
        ARD_Cam["CameraMain"]:::hardware
        ARD_Ard["arduinoMain"]:::hardware
    end

    %% Connections
    FE -->|"HTTP"| BE_Main
    BE_Main -->|"CRUD"| DB_Folder
    BE_Main -->|"CRUD"| DB_Tables
    BE_Main -->|"calls"| CAM
    BE_Main -->|"delegatesTo"| BE_Car
    BE_Main -->|"delegatesTo"| BE_Parking
    BE_Main -->|"delegatesTo"| BE_Sub
    BE_Main -->|"delegatesTo"| BE_User
    ARD_Cam -->|"sendsData"| BE_Main
    ARD_Ard -->|"sendsData"| BE_Main
    ARD_Cam -->|"sendsFeed"| CAM
    ARD_Ard -->|"sendsFeed"| CAM

    %% Click Events
    click FE "https://github.com/iot-wizard/parkingproject/tree/main/client/"
    click BE_Main "https://github.com/iot-wizard/parkingproject/blob/main/service/main.py"
    click BE_Car "https://github.com/iot-wizard/parkingproject/blob/main/service/Car.py"
    click BE_Parking "https://github.com/iot-wizard/parkingproject/blob/main/service/ParkingHistory.py"
    click BE_Sub "https://github.com/iot-wizard/parkingproject/blob/main/service/Subscription.py"
    click BE_User "https://github.com/iot-wizard/parkingproject/blob/main/service/user.py"
    click DB_Folder "https://github.com/iot-wizard/parkingproject/tree/main/service/database/"
    click DB_Tables "https://github.com/iot-wizard/parkingproject/blob/main/service/tables.py"
    click CAM "https://github.com/iot-wizard/parkingproject/blob/main/serviceCam/mainC.py"
    click ARD_Cam "https://github.com/iot-wizard/parkingproject/blob/main/Arduino/CameraMain.py"
    click ARD_Ard "https://github.com/iot-wizard/parkingproject/blob/main/Arduino/arduinoMain.py"

    %% Styles
    classDef frontend fill:#DDEEFF,stroke:#333,stroke-width:2px;
    classDef backend fill:#FFF2CC,stroke:#333,stroke-width:2px;
    classDef database fill:#C1E1C1,stroke:#333,stroke-width:2px;
    classDef cameras fill:#FFD700,stroke:#333,stroke-width:2px;
    classDef hardware fill:#FFCCCB,stroke:#333,stroke-width:2px;
```
