Skip to content

Zerocode-sean/drms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš› DRMS - Digital Request Waste Management System

A comprehensive waste collection management platform with smart scheduling, SMS notifications, and real-time tracking.

License: MIT PHP MySQL

๐ŸŒŸ Features

For Residents

  • ๐Ÿ“‹ Easy waste collection request submission
  • ๐Ÿ“ Location-based service
  • ๐Ÿ“ฑ SMS notifications for request status
  • ๐Ÿ“Š Real-time request tracking
  • ๐Ÿ“ž Customer support integration

For Drivers

  • ๐Ÿš› Task dashboard with assigned collections
  • ๐Ÿ—บ๏ธ Route optimization and mapping
  • ๐Ÿ“ฑ SMS communication with customers
  • โœ… Status update capabilities
  • ๐Ÿ“ˆ Performance tracking

For Administrators

  • ๐Ÿ“Š Comprehensive dashboard with metrics
  • โœ… Request approval/rejection workflow
  • ๐Ÿ‘ฅ Driver assignment management
  • ๐Ÿง  Smart scheduling algorithm
  • ๐Ÿ“ฑ Bulk SMS broadcasting
  • ๐Ÿ“ˆ Analytics and reporting

๐Ÿš€ Smart Scheduling Algorithm

  • Geographic Clustering: Groups requests within 2km radius
  • Route Optimization: Nearest neighbor algorithm for fuel efficiency
  • Time Slot Management: Morning (8-12), Afternoon (12-4), Evening (4-8)
  • Fuel Savings: Estimates 30-40% reduction in operational costs

๐Ÿ“ฑ SMS Integration

Powered by Twilio for reliable messaging:

  • โœ… Request lifecycle notifications
  • โœ… Driver assignment alerts
  • โœ… Collection reminders
  • โœ… Admin broadcasting
  • โœ… 99.95% delivery guarantee

๐Ÿ› ๏ธ Tech Stack

  • Frontend: HTML5, CSS3, JavaScript (Vanilla)
  • Backend: PHP 7.4+ with MySQLi/PDO
  • Database: MySQL 5.7+
  • SMS: Twilio API
  • Server: Apache (XAMPP)

๐Ÿ“ฆ Installation

Prerequisites

  • PHP 7.4 or higher
  • MySQL 5.7 or higher
  • Apache web server
  • Twilio account (for SMS features)

Setup Steps

  1. Clone the repository

    git clone https://github.com/yourusername/drms.git
    cd drms
  2. Database Setup

    # Create database
    mysql -u root -p -e "CREATE DATABASE drms2;"
    
    # Import schema
    mysql -u root -p drms2 < database.sql
    mysql -u root -p drms2 < sms_tables.sql
  3. Environment Configuration

    # Copy environment template
    cp .env.example .env
    
    # Edit .env with your credentials
    nano .env
  4. Configure Environment Variables

    # Database
    DB_HOST=localhost
    DB_USER=root
    DB_PASS=your_password
    DB_NAME=drms2
    
    # Twilio (Get from https://console.twilio.com)
    TWILIO_ACCOUNT_SID=your_account_sid
    TWILIO_AUTH_TOKEN=your_auth_token
    TWILIO_PHONE_NUMBER=your_twilio_number
  5. Web Server Setup

    # For XAMPP
    # Copy project to: C:\xampp\htdocs\drms
    
    # Access via: http://localhost/drms

๐ŸŽฏ Quick Start

Default Users

After running the database setup:

  • Admin: admin / admin123
  • Driver: driver1 / driver123
  • Resident: testuser / test123

First Steps

  1. Login as Admin: Access admin dashboard
  2. Test SMS: Visit /src/frontend/assets/test_sms.html
  3. Create Request: Login as resident and submit a request
  4. Manage Workflow: Approve requests and assign drivers

๐Ÿ“ฑ SMS Testing

  1. Configure Twilio credentials in .env
  2. Verify phone numbers in Twilio Console (trial accounts)
  3. Test SMS integration: Visit the SMS test page
  4. Demo workflow: Submit โ†’ Approve โ†’ Assign โ†’ Complete

๐Ÿ”’ Security

This project implements comprehensive security measures:

  • โœ… Environment Variables: No hardcoded credentials
  • โœ… SQL Injection Prevention: Prepared statements
  • โœ… Password Hashing: Bcrypt encryption
  • โœ… Session Management: Secure session handling
  • โœ… Role-Based Access: Admin/Driver/Resident permissions

See SECURITY.md for detailed security information.

๐Ÿ“Š Database Schema

Core Tables

  • users: Authentication and role management
  • requests1: Waste collection requests
  • drivers: Driver profiles and capacity
  • assignments: Request-driver relationships
  • schedules: Optimized route data
  • notifications: System notifications
  • sms_logs: SMS delivery tracking

๐ŸŽจ Screenshots

Admin Dashboard

  • Real-time metrics and analytics
  • Request management workflow
  • Driver assignment interface
  • Smart scheduling controls

Driver Interface

  • Task dashboard with assignments
  • Route optimization display
  • Customer communication tools

Resident Portal

  • Simple request submission
  • Status tracking
  • Notification history

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ“ž Support

๐ŸŽ‰ Acknowledgments

  • Twilio: For reliable SMS API
  • PHP Community: For excellent documentation
  • Open Source: For making development accessible

Built with โค๏ธ for efficient waste management

๐Ÿ”ฎ Future Roadmap

  • ๐Ÿ“ฑ Mobile applications (iOS/Android)
  • ๐Ÿ—บ๏ธ Real-time GPS tracking
  • ๐Ÿค– AI-powered route optimization
  • ๐ŸŒ Multi-location support
  • โ˜๏ธ Cloud deployment options
  • ๐Ÿ“Š Advanced analytics dashboard

About

A digital platform where urban residents can request for waste collection digitally. This a got automated features that eneble user to manage waste collection efficiently

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors