A comprehensive waste management solution built with Django REST API backend and Flutter frontend. Sankalan helps track, manage, and optimize waste collection with real-time bin monitoring and analytics.
- RESTful API with Django REST Framework
- Real-time bin tracking and monitoring
- Analytics dashboard for waste statistics
- Admin notifications for full bins
- Waste incident reporting system
- CORS enabled for cross-origin requests
- Admin panel for management operations
- Interactive map view using flutter_map
- Analytics dashboard with charts (fl_chart)
- Material Design 3 UI/UX
- Responsive design (Desktop, Tablet, Mobile)
- Real-time updates with HTTP requests
- Beautiful animations with Lottie
- Request new bins functionality
- Report waste issues functionality
Sankalan/
βββ backend/ # Django REST API
β βββ trash_tracker_backend/ # Main Django project
β βββ wastebins/ # Waste bin management app
β βββ admin_side/ # Admin interface
β βββ map/ # Map functionality
β βββ manage.py # Django management
β βββ requirements.txt # Python dependencies
β βββ db.sqlite3 # Database
β βββ templates/ # HTML templates
β
βββ frontend/ # Flutter app
β βββ lib/
β β βββ main.dart # Main entry point
β β βββ mapscreen.dart # Map screen
β β βββ analytics/ # Analytics module
β β βββ pages/ # Page screens
β β βββ requestbin/ # Request bin forms
β β βββ fohor/ # Report forms
β βββ pubspec.yaml # Flutter dependencies
β βββ android/ # Android configuration
β βββ ios/ # iOS configuration
β βββ web/ # Web build
β
βββ UPGRADE_SUMMARY.md # Dependency upgrade details
βββ README.md # This file
- Python 3.10+ (Backend)
- Flutter 3.38.7+ (Frontend)
- Dart 3.10.7+ (Frontend)
- Git
- Clone the repository
git clone https://github.com/Upendra48/Sankalan.git
cd Sankalan/backend- Create virtual environment
python -m venv .venv
# Windows
.\.venv\Scripts\Activate.ps1
# Linux/Mac
source .venv/bin/activate- Install dependencies
pip install -r requirements.txt- Run migrations
python manage.py migrate- Start server
python manage.py runserverServer runs at: http://127.0.0.1:8000/
- Navigate to frontend
cd ../frontend- Install dependencies
flutter pub get- Run the app
# Web (Chrome)
flutter run -d chrome
# Android
flutter run -d android
# iOS
flutter run -d ios
# Windows
flutter run -d windowshttp://127.0.0.1:8000/api/
Currently no authentication required (for development). Production setup should include token-based auth.
GET /api/wastebins/ # List all waste bins
POST /api/wastebins/ # Create new waste bin
GET /api/wastebins/{id}/ # Get specific bin details
PUT /api/wastebins/{id}/ # Update bin
DELETE /api/wastebins/{id}/ # Delete bin
PUT /api/wastebins/{id}/change_fill_level/ # Update fill level
POST /api/wastebins/{id}/report_full/ # Report bin as full
Bin Fill Levels: Empty, Half-Filled, Full
Example Request:
curl http://127.0.0.1:8000/api/wastebins/GET /api/requests/ # List all requests
POST /api/requests/ # Create new request
GET /api/requests/{id}/ # Get request details
PUT /api/requests/{id}/ # Update request
DELETE /api/requests/{id}/ # Delete request
GET /api/admin-notifications/ # List all notifications
POST /api/admin-notifications/ # Create notification
GET /api/admin-notifications/{id}/ # Get notification
PUT /api/admin-notifications/{id}/ # Update notification
DELETE /api/admin-notifications/{id}/ # Delete notification
GET /api/report-waste/ # List all reports
POST /api/report-waste/ # Submit waste report
GET /api/report-waste/{id}/ # Get report details
PUT /api/report-waste/{id}/ # Update report
DELETE /api/report-waste/{id}/ # Delete report
Report Fields:
description: Issue descriptionlatitude: Location latitudelongitude: Location longitudeimage: Optional photo (if supported)
GET /api/waste-bin-analytics/ # Get bin statistics
Response Example:
{
"total_bins": 150,
"empty_bins": 45,
"half_filled_bins": 80,
"full_bins": 25
}GET / # API landing page (HTML)
GET /api/ # API root (JSON)
GET /admin/ # Django admin panel
| Technology | Version | Purpose |
|---|---|---|
| Django | 6.1.1 | Web framework |
| Django REST Framework | 3.18.0 | API framework |
| django-cors-headers | 4.10.0 | CORS support |
| Python | 3.10+ | Language |
| SQLite | Latest | Database |
| Package | Version | Purpose |
|---|---|---|
| Flutter | 3.38.7+ | Framework |
| Dart | 3.10.7+ | Language |
| flutter_map | 8.0.0 | Map integration |
| fl_chart | 0.69.2 | Charts/Analytics |
| http | 1.3.0 | HTTP requests |
| lottie | 3.1.3 | Animations |
| latlong2 | 0.9.1 | Location data |
- Map View: Interactive waste bin location map
- Analytics: Statistics and charts dashboard
- Request Bin: Submit new waste bin requests
- Report Issue: Report waste-related problems
- Modern Material Design 3 interface
- Navigation Rail (Desktop) / Bottom Navigation (Mobile)
- Floating Action Buttons for quick access
- Responsive layouts for all screen sizes
- Desktop (>600px width): Side navigation with labeled destinations
- Mobile (β€600px width): Floating action buttons with full-screen content
Edit backend/trash_tracker_backend/settings.py:
DEBUG = True # Set to False for production
ALLOWED_HOSTS = ['*'] # Specify hosts for production
CORS_ALLOWED_ORIGINS = [
"http://localhost:3000",
# Add your frontend URL
]Edit frontend/lib/main.dart:
const String API_BASE_URL = 'http://127.0.0.1:8000/api/';id: Unique identifiername: Bin name/locationlatitude: GPS latitudelongitude: GPS longitudefill_level: Empty, Half-Filled, Fullcreated_at: Creation timestampupdated_at: Last update timestamp
id: Unique identifierlocation: Requested locationdescription: Request detailsstatus: Pending, Approved, Completedcreated_at: Creation timestamp
id: Unique identifierdescription: Issue descriptionlatitude: Location latitudelongitude: Location longitudecreated_at: Report timestamp
id: Unique identifierwaste_bin: Associated binstatus: Full (bin status)created_at: Notification timestamp
# Using curl
curl http://127.0.0.1:8000/api/wastebins/
# Using Python
python -c "
import requests
response = requests.get('http://127.0.0.1:8000/api/wastebins/')
print(response.json())
"{
"id": 1,
"name": "Bin Location 1",
"latitude": 28.5355,
"longitude": 77.391,
"fill_level": "Half-Filled",
"created_at": "2026-05-02T10:30:00Z",
"updated_at": "2026-05-02T10:30:00Z"
}{
"error": "Invalid fill level",
"detail": "fill_level must be one of: Empty, Half-Filled, Full"
}- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see LICENSE file for details.
Upendra - GitHub
- User authentication (JWT tokens)
- Real-time notifications (WebSocket)
- Mobile app improvements
- Advanced analytics dashboard
- Machine learning for route optimization
- Multi-language support
- Dark mode UI
- Offline mode support
- Push notifications
- IoT sensor integration
- Django REST Framework Docs
- Flutter Documentation
- Material Design 3 Guide
- OpenStreetMap (flutter_map)
- β Initial project setup
- β Django REST API with basic endpoints
- β Flutter app with Material Design 3
- β Map integration with flutter_map
- β Analytics dashboard
- β Request and report functionality
- β GitHub repository setup
- β Comprehensive API documentation
Last Updated: May 2, 2026
Status: Active Development π