How itrm98/namaa-proj works
NAMAA monitors parks through sensor readings, camera frames, and satellite vegetation data; it turns those signals into alerts and maintenance work, then presents status and outcomes in role-specific dashboards. The backend is the hub for ingestion, rules, irrigation control, AI requests, persistence, and live updates. The README documents the broad service connections; sampled backend excerpts additionally show rules-to-alert/pump behavior and camera processing. Other unsampled subsystem links are limited to documented relationships.
Main entry points: api.php Laravel API · RulesEngine.php Rules and irrigation · Park.php Park data models · CameraPipeline.php Camera pipeline
Components 19
Park devices
- Sensor firmware
firmware/node-sensor/src/main.cpp - Park camera
Backend operations
- Laravel API
backend/routes/api.php - Reading ingest
backend/app/Services/ReadingIngestor.php - Camera pipeline
backend/app/Services/CameraPipeline.php - Rules and irrigation
backend/app/Services/RulesEngine.php - Tasks and verification
backend/app/Services/TaskService.php - Park operations
backend/app/Services/ParkStatusService.php - Park data models
backend/app/Models/Park.php
Monitoring insights
- Satellite NDVI
backend/app/Services/NdviService.php - Vision service
vision-service/app/main.py
Dashboard experience
- React dashboard
frontend/src/App.tsx - Admin operations
frontend/src/pages/admin/OverviewPage.tsx - Worker tasks
frontend/src/pages/worker/MyTasksPage.tsx - Municipality view
frontend/src/pages/municipality/OverviewPage.tsx
Runtime services
- MySQL database
- Live updates
backend/app/Support/Realtime.php
Other components
- Park staff
- Sentinel-2 data
Connections 25
- Sensor firmware → Laravel API: posts readings
- Laravel API → Reading ingest: routes readings
- Reading ingest → Park data models: stores readings
- Reading ingest → Rules and irrigation: evaluates readings
- Rules and irrigation → Park operations: recalculates status
backend/app/Services/RulesEngine.php - Rules and irrigation → Tasks and verification: raises work
- Rules and irrigation → Park data models: reads park data
backend/app/Services/RulesEngine.php - Rules and irrigation → Park data models: writes alerts
backend/app/Services/RulesEngine.php - Rules and irrigation → Laravel API: controls pump
backend/app/Services/RulesEngine.php - Park camera → Camera pipeline: supplies frames
- Camera pipeline → Vision service: requests detection
backend/app/Services/CameraPipeline.php - Camera pipeline → Park data models: stores detections
- Camera pipeline → Live updates: publishes detection
backend/app/Services/CameraPipeline.php - Sentinel-2 data → Satellite NDVI: provides imagery
- Satellite NDVI → Vision service: requests NDVI
- Satellite NDVI → Park data models: stores park metrics
- Park data models → MySQL database: persists records
- React dashboard → Laravel API: requests dashboard data
- Laravel API → Admin operations: serves park operations
- Laravel API → Worker tasks: serves assigned tasks
- Laravel API → Municipality view: serves regional overview
- Live updates → React dashboard: pushes live updates
- Park staff → Worker tasks: completes maintenance
- Admin operations → Tasks and verification: manages tasks
- Worker tasks → Tasks and verification: reports task outcome