C-S-F/CyberCollect
<h1 align="center"> <br> <img src="https://img.icons8.com/nolan/256/satellite.png" alt="CyberCollect" width="120"> <br> CyberCollect 🛰️ </h1>
<h4 align="center">A Production-Grade Cyberpunk 3D Route Optimization & Waste Management Platform</h4>
<p align="center"> <a href="#key-features">Features</a> • <a href="#architecture">Architecture</a> • <a href="#the-5-levels-of-optimization">The 5 Levels</a> • <a href="#quick-start">Quick Start</a> • <a href="#deployment">Deployment</a> </p>
🌌 Overview
CyberCollect transforms a multi-tiered waste collection optimization project into a stunning, interactive, cyberpunk-themed Web application.
Built with FastAPI on the backend and native Three.js + HTML/JS/CSS on the frontend, the application visualizes complex algorithmic data—ranging from Dijkstra graphing to VRP Tabu searches—on a glowing 3D WebGL satellite map. It also features an integrated Local LLM AI Assistant to analyze data and operations in real-time.
🚀 Key Features
- Cyberpunk 3D Visualization: Natively rendered Three.js scene mimicking a high-tech tracking satellite. Includes neon grids, bloom effects, animated routes, and pulsing alert nodes.
- Multi-Level Algorithmic APIs: 5 distinct Python optimization engines exposed via RESTful APIs.
- Live Dashboard & Visualizers: Real-time generation of Gantt charts, radial utilization bars, and distance convergence curves synced to 3D map animations.
- Local AI Assistance (Ollama): Slide-in chat panel with Server-Sent Events (SSE) streaming. The AI is automatically injected with the contextual state of whatever algorithm is currently running on-screen.
- Zero-Cost Native Deployment: Configured via Docker & Render Blueprints to run completely free ($0/mo) in the cloud.
🧠 The 5 Levels of Optimization
The backend handles five distinct, progressively complex operational tiers of municipal waste logic:
- Level 1 (Shortest Path): Constructs the road mesh using Dijkstra's algorithm to analyze raw travel distance and constraints between collection nodes.
- Level 2 (Greedy Assignments & Load Balancing): Triages incoming zone demands and optimally assigns them to truck pools using greedy capacities and variance minimization.
- Level 3 (Tri-partite Schedule Planning): Solves time-window constraints (traffic congestion, legal driving hours, night restrictions) and generates full weekly truck collection schedules.
- Level 4 (Vehicle Routing Problem - VRP): Uses 2-Opt & Tabu Search heuristics to generate exact stop-by-stop sequencing and turn-by-turn routing for each truck in the fleet.
- Level 5 (Real-time IoT Simulation): A live streaming engine ticking by the minute. Simulated IoT bin sensors trigger
ALERTE_REMPLISSAGEevents, forcing live tactical dashboard updates.
🏗 Architecture
graph TD
A["Browser: Cyberpunk SPA"] -->|REST/SSE| B["FastAPI Backend"]
B -->|Python Backend| C["L1: Dijkstra"]
B -->|Python Backend| D["L2: Truck Assignment"]
B -->|Python Backend| E["L3: Weekly Planner"]
B -->|Python Backend| F["L4: VRP Opt"]
B -->|Python Backend| G["L5: IoT Simulation"]
B -->|HTTP SSE| H["Ollama LLM (local)"]
B -->|Serves static files| A
subgraph "Frontend (Three.js)"
A --> I["3D Satellite Map"]
A --> J["Algorithm visualizers L1-L5"]
A --> K["AI Chat Drawer"]
end📦 Quick Start (Local Run)
You can run CyberCollect directly on your local machine using Python or Docker.
Option A: Python / Uvicorn (Recommended)
- Clone the repo:
git clone https://github.com/desagencydes-rgb/CYBERCOLLECT.git
cd CYBERCOLLECT- Install requirements:
pip install fastapi uvicorn httpx python-multipart- Run the server:
cd projet_collecte_dechets
uvicorn webapp.backend.main:app --host 0.0.0.0 --port 8000 --reload- Open Application at
http://localhost:8000
Option B: Docker Compose
docker-compose up --build🤖 Activating the AI Assistant
The AI chat is an optional progressive enhancement. The app dynamically pings for an LLM on startup. If found, the chat interface is unlocked.
- Download Ollama for your OS.
- Pull a lightweight model in your terminal:
ollama pull llama3.2:3b- Ensure the Ollama daemon is running (
ollama serve). - Hard Refresh the CyberCollect Web App. The AI Badge will flip to Green and the system will greet you!
☁️ Free Deployment ($0)
This project has been explicitly engineered for $0 free-tier cloud deployment using Render.com.
- Fork this repository.
- Go to Render Dashboard.
- Click New + > Web Service.
- Connect your GitHub fork.
- Render will automatically detect the
render.yamlBlueprint file and deploy both the FastAPI Backend and the Web UI in seconds.
Note: Render's free tier instances do not possess the GPU/Memory to run the Ollama LLM docker image. Consequently, the cloud-deployed version of CyberCollect will auto-detect the lack of an LLM and display a graceful local-fallback message in the AI Drawer.
<p align="center"> <i>"Efficiency is just data organized correctly."</i><br> <b>— CyberCollect OS</b> </p>
