How destrex271/spmps works
Project type and purpose
• Embedded camera firmware and edge server code
• A machine-learning model for vehicle/plate detection
• A Node.js backend with REST API controllers (ANPR, parking, devices, user)
• A frontend “app” component (likely web or mobile UI)
File structure
• Top-level directories:
• app – UI layer (not expanded here, but houses the user-facing interface)
• backend – Node.js/Express REST API, controllers, Swagger docs, environment/config files, Dockerfile
• embedded – firmware for camera endpoints (camcode.ino) and an edge server sketch (server.ino), static HTML/CSS for the on-device server
• model – Python ML service (detect.py, db.py), serialized model.p, sample videos, requirements.txt
• Patterns:
• Clear separation of concerns: embedded edge code, ML model service, backend API, and frontend app
• RESTful controllers in backend, documented via Swagger
• Dockerfile in backend indicates containerized deployment
• Environment-based configuration (.env.example in backend & model)
Insights from README files
• backend/README and model/README likely describe how to run each service
a. Main components:
1. Embedded Camera Nodes
2. Edge Server on device
3. ML Model Service
4. Backend API Server
5. Database (configured via .env)
6. Frontend Application
7. External Services (e.g., Swagger UI / third-party notifications)
b. Relationships and interactions:
• Cameras capture video → Edge Server hosts endpoint → forwards frames to ML Model
• ML Model Service processes frames → returns detection & ANPR results → stored in Database via Backend API
• Frontend App queries Backend API for parking/vehicle data, displays status to users
• Controllers in Backend interact with Database; Swagger UI attached to Backend
c. Architectural patterns & principles:
• Microservices-style decomposition: separate ML service, API service, edge firmware
• RESTful API layer with clear controllers (parking, ANPR, devices, user)
• Containerization (Dockerfile) of backend for portability
• Environment-based configuration for secrets & endpoints
d. Key technologies & frameworks:
• Embedded: Arduino/C++ (.ino), lightweight HTTP server (app_httpd.cpp)
• ML: Python (detect.py), OpenCV/TensorFlow (via requirements.txt), custom model.p
• Backend: Node.js, Express, Swagger (swagger.js), Docker
• Frontend: (unspecified, in app/) likely React/Angular or mobile SDK