- Overview
- Features
- Technology Stack
- Architecture
- Installation
- Configuration
- API Documentation
- Deployment
- Contact
EcoSync is a robust waste management system developed for the Dhaka North City Corporation (DNCC). It optimizes waste collection, transportation, and processing through advanced technological solutions. As part of the Code Samurai 2024 competition, EcoSync integrates a scalable Express.js backend with a responsive React frontend, offering a full-stack solution tailored for urban waste management logistics.
-
User Management
-
Vehicle and STS Management
-
Role-Based Access Control (RBAC)
- Secure access to application modules based on user roles
-
Authentication and Authorization
- JWT-based secure authentication
- Role-based authorization for API endpoints
-
Real-Time Dashboard
- Interactive maps displaying waste levels, truck locations, and landfill statuses
- Date-based controls for historical data analysis
-
Optimized Routing Algorithms
-
Notification System
- Real-time notifications for truck drivers regarding assignments and routes
-
Environmental Impact Monitoring
- Track and report on waste management efficiency and environmental benefits
- Backend
- Node.js: JavaScript runtime
- Express.js: Web framework
- Prisma ORM: Database ORM
- PostgreSQL: Relational database
- JWT: Authentication
- Nodemailer: Email services
- Frontend
- React.js: User interface library
- Next.js: Server-side rendering
- GeoJSON & ArcGIS: Geospatial data handling
- DevOps
- Docker & Docker Compose: Containerization
- CI/CD Pipelines: Automated testing and deployment
- Other Tools
- Figma: UI/UX design
- Git: Version control
We have also developed a android app to connect all the people of City Corporation to Create Issues, Get Status updates on submitted issues, DNCC authorities has special access to update issues and many more.
EcoSync follows a modular architecture, separating concerns between the frontend, backend, and database layers. The system leverages RESTful APIs for communication between the frontend and backend, ensuring scalability and maintainability.
- Docker: Ensure Docker is installed on your machine.
- Docker Compose: Required for orchestrating multi-container Docker applications.
-
Clone the Repository
git clone https://github.com/jhm69/CS24-p2-quantum_guys.git
-
Navigate to the Project Directory
cd CS24-p2-quantum_guys
-
Set Up Environment Variables
Create a
.env
file based on the provided.env.example
.cp .env.example .env
Update the
.env
file with your specific configurations. -
Build and Start Services with Docker Compose
docker-compose up --build
- Backend: Runs on
http://localhost:5000
- Frontend: Runs on
http://localhost:3000
- Backend: Runs on
-
Clean Up Unused Docker Resources
To remove all unused images and volumes:
docker system prune -a --volumes -f
Configure the application through environment variables specified in the .env
file.
JWT_SECRET
: Secret key for JWT authentication.DATABASE_URL
: PostgreSQL connection string.NODEMAILER_HOST
: SMTP host for Nodemailer.NODEMAILER_PORT
: SMTP port.NODEMAILER_USER
: SMTP user.NODEMAILER_PASS
: SMTP password.
For initial setup, you can create sample users with the following credentials:
# System Admin
TYPE="System Admin"
EMAIL="[email protected]"
PASSWORD="1234"
# STS Manager
TYPE="STS Manager"
EMAIL="[email protected]"
PASSWORD="121212"
# Landfill Manager
TYPE="Landfill Manager"
EMAIL="[email protected]"
PASSWORD="12345678"
The backend API offers endpoints for:
- User Management
POST /api/users
: Create a new userGET /api/users
: Retrieve all usersPUT /api/users/:id
: Update user detailsDELETE /api/users/:id
: Delete a user
- Vehicle Management
POST /api/vehicles
: Add a new vehicleGET /api/vehicles
: Retrieve all vehiclesPUT /api/vehicles/:id
: Update vehicle detailsDELETE /api/vehicles/:id
: Remove a vehicle
- STS Management
POST /api/sts
: Add a new STSGET /api/sts
: Retrieve all STSPUT /api/sts/:id
: Update STS detailsDELETE /api/sts/:id
: Remove an STS
- Authentication
POST /api/auth/login
: User loginPOST /api/auth/register
: User registration
- Waste Collection
GET /api/waste/status
: Get waste statusPOST /api/waste/collect
: Record waste collection
For detailed API specifications, refer to the API Documentation.
EcoSync can be deployed using Docker containers. For production deployment:
-
Build Docker Images
docker-compose build
-
Run Containers in Detached Mode
docker-compose up -d
For inquiries or support, please contact:
- Code Samurai 2024 Organizers
- Dhaka North City Corporation (DNCC)
- Open-Source Community Contributors