This is an AI-powered waste classification application that uses computer vision to detect and categorize different types of waste materials. The system combines a React frontend with a Node.js/Express backend and a Python FastAPI service for AI processing, utilizing YOLO models for real-time object detection.
- Framework: React 18 with TypeScript
- Build Tool: Vite for fast development and optimized builds
- UI Framework: Shadcn/ui components built on Radix UI primitives
- Styling: Tailwind CSS with CSS variables for theming
- State Management: TanStack Query for server state management
- Routing: Wouter for lightweight client-side routing
- Primary Backend: Node.js with Express server
- AI Processing: Separate Python FastAPI service for YOLO model inference
- Communication: WebSocket connections for real-time data streaming
- Session Management: In-memory storage with plans for database integration
- ORM: Drizzle with PostgreSQL support
- Schema: Comprehensive tables for users, detection sessions, results, and model configurations
- Migration Strategy: Drizzle Kit for schema management
- CameraFeed: Handles webcam access and real-time video streaming
- ControlPanel: Configuration interface for detection parameters and model settings
- PerformanceMetrics: Real-time system performance monitoring
- UI Components: Complete Shadcn/ui component library for consistent interface
- Express Server: Main application server handling HTTP requests and WebSocket connections
- Python Backend: FastAPI service with YOLO model integration
- WebSocket Manager: Real-time communication between frontend and AI processing
- Performance Monitor: System resource monitoring (CPU, memory, GPU usage)
- File Handler: Manages model uploads and data exports
- YOLO Detector: Ultralytics YOLO implementation for waste classification
- Model Configuration: Configurable confidence thresholds and class filtering
- Real-time Processing: Frame-by-frame analysis with performance optimization
- Camera Feed: User webcam captures video frames
- Frame Processing: Frames sent via WebSocket to Python backend
- AI Inference: YOLO model processes frames and detects waste objects
- Results Streaming: Detection results sent back to frontend via WebSocket
- Data Storage: Results optionally stored in PostgreSQL database
- Performance Monitoring: System metrics continuously monitored and displayed
- Plastic (Plastik)
- Glass (Kaca)
- Cans (Kaleng)
- React Ecosystem: React, React DOM, React Router (Wouter)
- UI Framework: Radix UI primitives, Lucide icons
- State Management: TanStack Query
- Styling: Tailwind CSS, class-variance-authority
- Build Tools: Vite, TypeScript
- Server Framework: Express.js, WebSocket support
- Database: Drizzle ORM, PostgreSQL driver (@neondatabase/serverless)
- Validation: Zod for schema validation
- Session Management: Connect-pg-simple for PostgreSQL sessions
- Web Framework: FastAPI with uvicorn
- Computer Vision: OpenCV, Ultralytics YOLO
- Performance: NumPy, psutil for system monitoring
- File Handling: aiofiles for async file operations
- Frontend: Vite dev server with HMR
- Backend: tsx for TypeScript execution with hot reload
- Database: Neon PostgreSQL or local PostgreSQL instance
- AI Service: FastAPI with uvicorn in development mode
- Frontend: Static build output served by Express
- Backend: Compiled TypeScript bundle with ESBuild
- Database: Production PostgreSQL instance
- AI Service: Production FastAPI deployment
- Environment: NODE_ENV-based configuration
- Command:
npm run db:pushfor schema deployment - Drizzle Kit handles PostgreSQL schema synchronization
- Migration files stored in
./migrationsdirectory
- July 07, 2025 - Theme and Camera Selection Added
- Added dark/light mode toggle with theme provider
- Implemented camera selection dropdown for multiple cameras
- Updated all components to use theme-aware styling (surface/muted colors)
- Enhanced camera hook to support device enumeration and switching
- Improved responsive design for better light/dark mode contrast
- July 07, 2025. Initial setup with AI waste classification system
- July 07, 2025. Added theme toggle and camera selection features
Preferred communication style: Simple, everyday language. UI Preferences: Dark/light theme toggle, camera selection support, theme-aware styling
