How trashtrackteam/trashtrack works
Main Components Identification
a. Mobile Application (apps/app)
• Frontend UI built with React, Ionic, and Capacitor
• User-facing interface for waste bin locations and complaints
• Operator dashboard for management
b. Backend Server (apps/api)
• NestJS-based REST API
• Prisma ORM with PostgreSQL database
• Authentication and business logic handling
c. IoT Devices (apps/iot)
• ESP-based hardware implementation
• Sensor integration for waste monitoring
• Real-time data collection
[Mobile Application Layer]
• Public User Interface
• Waste Bin Locator
• Complaint System
• Report Viewer
• Operator Dashboard
• Waste Management
• Analytics
• User Management
• ↕️ REST API Calls
[Backend Server Layer]
• API Controllers
• User Management
• Trash Bin Management
• Reports & Feedback
• History Tracking
• Database (PostgreSQL)
• User Data
• Trash Bin Data
• Reports
• Analytics
• IoT Integration Service
• ↕️ IoT Communication
[IoT Device Layer]
• Sensors
• Capacity Sensors
• Other Monitoring Sensors
• Control Systems
• Data Transmission Module
Key Interactions to Highlight
a. Data Flow:
• IoT devices → Backend Server (real-time monitoring)
• Backend Server → Mobile App (status updates)
• Mobile App → Backend Server (user actions)
b. Authentication Flow:
• User login/registration process
• Operator authentication
• API security layer
c. Real-time Operations:
• Waste bin status monitoring
• Report submission and tracking
• Analytics data collection
Additional Elements
a. External Services:
• File storage for images
• Push notification system
• Maps integration
b. Security Layers:
• API authentication
• Data encryption
• User role management
Implementation Details
• NestJS modular architecture
• Prisma ORM integration
• React/Ionic frontend structure
• IoT device communication protocols
• RESTful API endpoints organization