TrashSync – Waste Collection Management System with Express.js REST API & React Js
trashsync is a comprehensive waste collection management System built with an Express.js REST API backend and a React frontend. It streamlines waste collection, routing, and operations with role-based access, reporting, and document management. Ideal for municipalities, waste management companies, and environmental organizations. Secured with JWT for stateless authentication.
Key Features
- Waste Management: Track types, quantities, and collection records in real time.
- Bin Management: Monitor and manage waste bins, including location, capacity, and fill-level status.
- Staff & Drivers: Assign staff, manage attendance and documents with role-based access.
- Vehicle Management: Track vehicles, maintenance logs, and documents.
- Routes & Zones: Create zones and assign routes for efficient collections.
- Reports & Analytics: Waste, vehicle, and staff reports with charts and exports (XLSX/PDF).
- Settings: Company branding, SMTP configuration, and system alerts.
- Modern API: Express.js REST API with Drizzle ORM for type-safe SQL.
- Responsive Design: Fully responsive UI, compatible with desktops, tablets, and mobile devices.
- Easy Integration: Clean REST API for third-party integrations.
- Secure Authentication: JWT provides lightweight, stateless authentication for secure API access.
Highlights
- Clean architecture (controllers, services, validators) for maintainability
- Robust validation with Zod (server-side), friendly error messages
- File uploads with magic-number verification (anti-mime spoofing)
- Rate limiting on auth and API endpoints to mitigate abuse
- Charts, CSV/XLSX/PDF export for management reporting
Modules
- Dashboard & KPIs
- Waste Collection (CRUD, schedule, status)
- Bins (CRUD, assignment)
- Zones & Routes (planning, assignments)
- Vehicles (documents, maintenance logs)
- Staff (attendance, documents, route assignment)
- Reports (waste, vehicle, staff, waste types)
- System Settings (company, SMTP, alerts)
Why Choose trashsync?
- Modern stack: Express 5, React, Drizzle ORM, MySQL.
- Secure: JWT auth, validation, rate limiting, XSS sanitization, file signature checks.
- Production ready: clear docs, environment templates, and build steps.
- Extensible: modular services, validators, and routes.
Live Demo
System Requirements
Backend
- Node.js 18+ (LTS) or 20+
- npm 9+ or Yarn
- MySQL 8+
- Express.js 5
- Drizzle ORM
Frontend
- Node.js 18+ or 20+
- npm or Yarn
- React 19
Technology Stack
Backend Technologies
- Express.js: Fast, unopinionated web framework for Node.js
- Drizzle ORM: Modern, performant SQL ORM for JavaScript
- MySQL2: Fast MySQL driver for Node.js
- JWT: JSON Web Tokens for secure authentication
- JavaScript: Modern JavaScript (ES6+) development
Frontend Technologies
- React 19: UI library for building the dashboard
- JavaScript: Modern JavaScript (ES6+)
- Bootstrap: Responsive design
What’s Included
- Full source code: backend (Express) and frontend (React)
- Environment examples and documentation
- SQL dump (database.sql) or Drizzle migration + seed scripts
- Postman collection (API examples)
Quick Installation Overview
- Backend:
npm install → configure .env → import database.sql or run npm run db:migrate & npm run db:seed → npm run dev - Frontend:
npm install → set VITE_API_BASE_URL in .env → npm run dev or npm run build
FAQs
Can I use a different database?
trashsync ships with MySQL. Porting to another SQL engine is possible with Drizzle ORM but not officially supported in this item.
Does it include mobile apps?
No. This item includes a React web admin and an Express API. Mobile apps are not included.
Can I brand it for my client?
Yes. You can change logos, colors, and system name in settings and the UI.
Support
Need help? Contact: [email protected]