0% found this document useful (0 votes)
6 views30 pages

WasteMart System Architecture Proposal

The WasteMart Advanced System Architecture Proposal outlines a comprehensive waste management service with features for clients, admins, drivers, and super admins. Key functionalities include service booking, quotation management, job tracking, and advanced analytics, along with future AI-powered enhancements. The proposal emphasizes a user-friendly interface with cross-panel features and mobile responsiveness to improve service efficiency.

Uploaded by

Joseph Shumba
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views30 pages

WasteMart System Architecture Proposal

The WasteMart Advanced System Architecture Proposal outlines a comprehensive waste management service with features for clients, admins, drivers, and super admins. Key functionalities include service booking, quotation management, job tracking, and advanced analytics, along with future AI-powered enhancements. The proposal emphasizes a user-friendly interface with cross-panel features and mobile responsiveness to improve service efficiency.

Uploaded by

Joseph Shumba
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

WasteMart Advanced System

Architecture Proposal
🧾 WasteMart Services Overview
WasteMart offers:
1. Domestic Refuse & Recycling Collection – Door-to-door collection of general and
recyclable waste for households.
2. Commercial & Industrial Waste Management – Custom waste solutions using skips, roll-
on roll-off containers, compactors, and bottle banks.
3. Glass Recycling (Cullet) – Collection and processing of crushed glass for recycling.

🧠 Advanced System Architecture Proposal


System Panels:
1. Client Panel
2. Admin Panel
3. Driver Panel
4. SuperAdmin Panel

1. 👤 Client Panel
Features:
- Account Creation & Login
- Service Booking (Choose service type, waste type, quantity, pickup date/time, upload
images/documents)
- Quotation Management (View, Accept/Reject quotation)
- Booking Status Tracking (Pending → Quotation Sent → Accepted/Rejected → Scheduled →
In Transit → Completed)
- Notifications (Email + in-app alerts)
- Document Export (PDF, Excel, Word)

2. Admin Panel
Features:
- View & Manage Bookings
- Quotation Generator (Auto-calculate, attach PDF, send via system + email)
- Client Communication (In-app messaging or email)
- Approve/Reject Bookings
- Assign Driver & Schedule Pickup
- Track Driver Progress
- Document Export
- Analytics Dashboard (Bookings per region, Revenue reports, Service type breakdown)
3. 🚛 Driver Panel
Features:
- Login & View Assigned Jobs
- Job Status Toggle (On My Way, Goods Fetched, In Transit, Delivered)
- Navigation Integration (Google Maps/Waze)
- Proof of Collection (Upload photos, Digital signature)
- Job History & Schedule
- Notifications
- Document Export

4. 🧠 SuperAdmin Panel
Features:
- Full Access to All Panels
- User Management (Add/remove admins, drivers, clients)
- System Logs & Audit Trails
- Advanced Analytics (Heatmaps, Driver performance, Quotation conversion rates)
- Data Export & Backup
- Custom Report Builder
- AI Insights (Predict peak service times, Suggest route optimizations, Detect anomalies)

🔄 Cross-Panel Features
- Real-Time Status Sync
- Automated Email & SMS Alerts
- Role-Based Access Control
- Mobile-Responsive Design
- Multi-Language Support
- Offline Mode for Drivers

🧠 Future Enhancements (AI-Powered)


- Smart Quotation Engine – Learns from past data to suggest optimal pricing
- Route Optimization AI – Minimizes fuel usage and time
- Client Chatbot – Handles FAQs and booking assistance
- Sustainability Tracker – Shows clients their recycling impact
CODES FOR THE CURRENT FILES

LOGIN
[Link]
<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>WasteMart | Client Login</title>

<link rel="stylesheet" href="[Link]">

<link rel = "[Link]


family=Inter:wght@400;600&display=swap">

</head>

<body>

<div class="login-container">

<div class="login-box">

<div class="logo">

<img src="../assets/images/[Link]" alt="WasteMart Logo">

</div>

<h2>Client Login</h2>

<!-- Error message display -->

<?php if (isset($_GET['error'])): ?>

<div class="error-message">

<?php echo htmlspecialchars($_GET['error']); ?>

</div>

<?php endif; ?>


<form action="../includes/login_process.php" method="POST">

<div class="input-group">

<label for="email">Email Address</label>

<input type="email" id="email" name="email" required


placeholder="you@[Link]">

</div>

<div class="input-group">

<label for="password">Password</label>

<input type="password" id="password" name="password"


required placeholder="Enter your password">

</div>

<div class="actions">

<button type="submit">Login</button>

<a href="#">Forgot Password?</a>

</div>

<p class="register-link">Don't have an account? <a


href="../register/[Link]">Create one</a></p>

</form>

</div>

</div>

<script src="../scripts/[Link]"></script>

</body>

</html>

[Link]
body {

margin: 0;

font-family: 'Inter', sans-serif;

background: #f4f6f8;

display: flex;

justify-content: center;

align-items: center;

height: 100vh;

.login-container {

width: 100%;

max-width: 400px;

padding: 20px;

.login-box {

background: #ffffff;

padding: 30px;

border-radius: 10px;

box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);

text-align: center;

.logo img {
width: 120px;

margin-bottom: 20px;

h2 {

margin-bottom: 20px;

color: #333;

.input-group {

margin-bottom: 15px;

text-align: left;

.input-group label {

display: block;

margin-bottom: 5px;

font-weight: 600;

color: #555;

.input-group input {

width: 100%;

padding: 10px;

border: 1px solid #ccc;


border-radius: 6px;

font-size: 14px;

.actions {

display: flex;

justify-content: space-between;

align-items: center;

margin-top: 15px;

.actions button {

background-color: #007b5e;

color: white;

border: none;

padding: 10px 20px;

border-radius: 6px;

cursor: pointer;

font-weight: 600;

.actions a {

font-size: 13px;

color: #007b5e;

text-decoration: none;
}

.register-link {

margin-top: 20px;

font-size: 14px;

.register-link a {

color: #007b5e;

text-decoration: none;

font-weight: 600;

Login_process.php

<?php

session_start();

require_once '[Link]';

if ($_SERVER["REQUEST_METHOD"] === "POST") {

$email = trim($_POST["email"]);

$password = trim($_POST["password"]);

// Validate email format

if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$_SESSION['error'] = "Invalid email format.";

header("Location: ../login/[Link]");

exit();

// Prepare and execute query

$stmt = $conn->prepare("SELECT id, email, password, account_type,


full_name, company_name FROM users WHERE email = ?");

$stmt->bind_param("s", $email);

$stmt->execute();

$result = $stmt->get_result();

// Check if user exists

if ($result->num_rows === 1) {

$user = $result->fetch_assoc();

// Verify password

if (password_verify($password, $user['password'])) {

// Set session variables

$_SESSION['user_id'] = $user['id'];

$_SESSION['email'] = $user['email'];

$_SESSION['account_type'] = $user['account_type'];

$_SESSION['name'] = $user['account_type'] === 'company' ?


$user['company_name'] : $user['full_name'];

// Update last login timestamp


$update = $conn->prepare("UPDATE users SET last_login = NOW()
WHERE id = ?");

$update->bind_param("i", $user['id']);

$update->execute();

// Redirect to dashboard

header("Location: ../dashboard/[Link]");

exit();

} else {

$_SESSION['error'] = "Incorrect password.";

header("Location: ../login/[Link]");

exit();

} else {

$_SESSION['error'] = "No account found with that email.";

header("Location: ../login/[Link]");

exit();

?>

[Link]

<?php

session_start();
?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>WasteMart | Create Account</title>

<link rel="stylesheet" href="assets/css/[Link]">

<link rel="stylesheet" href="[Link]


family=Inter:wght@400;600&display=swap">

</head>

<body>

<?php

if (isset($_SESSION['error'])) {

echo "<div class='alert error'>" . $_SESSION['error'] . "</div>";

unset($_SESSION['error']);

if (isset($_SESSION['success'])) {

echo "<div class='alert success'>" . $_SESSION['success'] . "</div>";

unset($_SESSION['success']);

?>

<div class="container">

<h2>Create Account</h2>

<form id="registerForm" action="../includes/register_process.php"


method="POST" enctype="multipart/form-data">

<label for="accountType">Account Type</label>


<select id="accountType" name="account_type" required>

<option value="">Select</option>

<option value="individual">Individual</option>

<option value="company">Company</option>

</select>

<div id="individualFields" class="account-section">

<label for="fullName">Full Name</label>

<input type="text" name="full_name" id="fullName">

<label for="idNumber">ID/Passport Number</label>

<input type="text" name="id_number" id="idNumber">

<label for="individualAddress">Physical Address</label>

<input type="text" name="physical_address" id="individualAddress">

<label for="individualPhone">Phone Number</label>

<input type="text" name="phone_number" id="individualPhone">

<label for="individualEmail">Email Address</label>

<input type="email" name="email" id="individualEmail">

<label for="preferredServices">Preferred Waste Services</label>

<input type="text" name="preferred_services"


id="preferredServices">
<label for="idDocument">Upload ID/Proof of Residence</label>

<input type="file" name="id_document" id="idDocument">

</div>

<div id="companyFields" class="account-section">

<label for="companyName">Company Name</label>

<input type="text" name="company_name" id="companyName">

<label for="registrationNumber">Company Registration


Number</label>

<input type="text" name="registration_number"


id="registrationNumber">

<label for="vatNumber">VAT Number</label>

<input type="text" name="vat_number" id="vatNumber">

<label for="companyAddress">Physical Address</label>

<input type="text" name="physical_address" id="companyAddress">

<label for="contactPerson">Contact Person Name</label>

<input type="text" name="contact_person_name" id="contactPerson">

<label for="companyPhone">Phone Number</label>

<input type="text" name="phone_number" id="companyPhone">


<label for="companyEmail">Email Address</label>

<input type="email" name="email" id="companyEmail">

<label for="industryType">Industry Type</label>

<input type="text" name="industry_type" id="industryType">

<label for="wasteTypes">Waste Types Handled</label>

<input type="text" name="waste_types" id="wasteTypes">

<label for="companyDocuments">Upload Company


Documents</label>

<input type="file" name="company_documents"


id="companyDocuments">

</div>

<label for="password">Password</label>

<input type="password" name="password" id="password" required>

<label for="confirmPassword">Confirm Password</label>

<input type="password" name="confirm_password"


id="confirmPassword" required>

<button type="submit">Create Account</button>

</form>

</div>

<script src="assets/js/[Link]"></script>
</body>

</html>

Register_process.php

<?php

session_start();

require_once '[Link]';

function sanitize($data) {

return htmlspecialchars(strip_tags(trim($data)));

if ($_SERVER["REQUEST_METHOD"] === "POST") {

$account_type = $_POST['account_type'];

$email = sanitize($_POST['email']);

$password = $_POST['password'];

$confirm_password = $_POST['confirm_password'];

$phone = sanitize($_POST['phone_number']);

$address = sanitize($_POST['physical_address']);

if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {

$_SESSION['error'] = "Invalid email format.";

header("Location: ../register/[Link]");

exit();
}

if ($password !== $confirm_password) {

$_SESSION['error'] = "Passwords do not match.";

header("Location: ../register/[Link]");

exit();

$hashed_password = password_hash($password, PASSWORD_DEFAULT);

$stmt = $conn->prepare("SELECT id FROM users WHERE email = ?");

$stmt->bind_param("s", $email);

$stmt->execute();

$stmt->store_result();

if ($stmt->num_rows > 0) {

$_SESSION['error'] = "Email already exists.";

header("Location: ../register/[Link]");

exit();

$stmt->close();

if ($account_type === "individual") {

$full_name = sanitize($_POST['full_name']);

$id_number = sanitize($_POST['id_number']);

$preferred_services = sanitize($_POST['preferred_services']);
$id_document_path = "";

if (isset($_FILES['id_document']) && $_FILES['id_document']['error'] ===


0) {

$target_dir = "../uploads/individuals/";

$filename = basename($_FILES["id_document"]["name"]);

$target_file = $target_dir . time() . "_" . $filename;

if (move_uploaded_file($_FILES["id_document"]["tmp_name"],
$target_file)) {

$id_document_path = $target_file;

$stmt = $conn->prepare("INSERT INTO users (account_type, email,


password, phone_number, physical_address, full_name, id_number,
preferred_services, id_document_path) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");

$stmt->bind_param("sssssssss", $account_type, $email,


$hashed_password, $phone, $address, $full_name, $id_number, $preferred_services,
$id_document_path);

} else {

$company_name = sanitize($_POST['company_name']);

$registration_number = sanitize($_POST['registration_number']);

$vat_number = sanitize($_POST['vat_number']);

$contact_person_name = sanitize($_POST['contact_person_name']);

$industry_type = sanitize($_POST['industry_type']);

$waste_types = sanitize($_POST['waste_types']);

$company_documents_path = "";
if (isset($_FILES['company_documents']) &&
$_FILES['company_documents']['error'] === 0) {

$target_dir = "../uploads/companies/";

$filename = basename($_FILES["company_documents"]["name"]);

$target_file = $target_dir . time() . "_" . $filename;

if (move_uploaded_file($_FILES["company_documents"]["tmp_name"],
$target_file)) {

$company_documents_path = $target_file;

$stmt = $conn->prepare("INSERT INTO users (account_type, email,


password, phone_number, physical_address, company_name, registration_number,
vat_number, contact_person_name, industry_type, waste_types,
company_documents_path) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");

$stmt->bind_param("ssssssssssss", $account_type, $email,


$hashed_password, $phone, $address, $company_name, $registration_number,
$vat_number, $contact_person_name, $industry_type, $waste_types,
$company_documents_path);

if ($stmt->execute()) {

$_SESSION['success'] = "Account created successfully. Please login.";

header("Location: ../login/[Link]");

exit();

} else {

$_SESSION['error'] = "Error creating account.";


header("Location: ../register/[Link]");

exit();

?>

[Link]

<?php

session_start();

// Redirect to login if not authenticated

if (!isset($_SESSION['user_id'])) {

header("Location: ../login/[Link]");

exit();

// Get user details from session

$name = $_SESSION['name'] ?? 'Client';

$accountType = ucfirst($_SESSION['account_type'] ?? 'Unknown');

?>

<!DOCTYPE html>

<html lang="en">

<head>
<meta charset="UTF-8">

<title>WasteMart Client Dashboard</title>

<link rel="stylesheet" href="[Link]">

<style>

body {

font-family: 'Segoe UI', sans-serif;

background-color: #f4f6f8;

margin: 0;

padding: 0;

.dashboard-container {

max-width: 900px;

margin: 50px auto;

background: #fff;

padding: 40px;

border-radius: 12px;

box-shadow: 0 10px 30px rgba(0,0,0,0.1);

h1 {

color: #2c3e50;

.user-info {
margin-bottom: 30px;

.nav-links {

display: flex;

flex-wrap: wrap;

gap: 20px;

.nav-links a {

flex: 1 1 200px;

text-align: center;

background-color: #007b5e;

color: white;

padding: 15px;

border-radius: 8px;

text-decoration: none;

font-weight: bold;

transition: background-color 0.3s ease;

.nav-links a:hover {

background-color: #005f47;

</style>
</head>

<body>

<div class="dashboard-container">

<h1>Welcome, <?php echo htmlspecialchars($name); ?>!</h1>

<div class="user-info">

<p><strong>Account Type:</strong> <?php echo


htmlspecialchars($accountType); ?></p>

</div>

<div class="nav-links">

<a href="../services/[Link]">📦 Book a Service</a>

<a href="../quotations/[Link]">📄 View Quotations</a>

<a href="../history/[Link]">📚 Service History</a>

<a href="../[Link]">🚪 Logout</a>

</div>

</div>

</body>

</html>

[Link]

<?php

$host = "localhost";

$db_user = "root";

$db_pass = "";

$db_name = "wastemart";
$conn = new mysqli($host, $db_user, $db_pass, $db_name);

// Check connection

if ($conn->connect_error) {

die("Database connection failed: " . $conn->connect_error);

?>

[Link]

body {

font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

background-color: #f4f6f8;

margin: 0;

padding: 0;

.container {

max-width: 700px;

margin: 50px auto;

background: #ffffff;

padding: 40px;

border-radius: 12px;

box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);

}
h2 {

text-align: center;

color: #2c3e50;

margin-bottom: 30px;

form {

display: flex;

flex-direction: column;

label {

margin-top: 15px;

font-weight: 600;

color: #34495e;

input, select {

padding: 12px;

margin-top: 5px;

border-radius: 6px;

border: 1px solid #ccc;

font-size: 15px;

transition: border-color 0.3s ease;

}
input:focus, select:focus {

border-color: #007b5e;

outline: none;

button {

margin-top: 25px;

padding: 14px;

background-color: #007b5e;

color: white;

border: none;

border-radius: 6px;

font-size: 16px;

font-weight: bold;

cursor: pointer;

transition: background-color 0.3s ease;

button:hover {

background-color: #005f47;

.account-section {

display: none;
margin-top: 20px;

padding: 15px;

background-color: #f9f9f9;

border-left: 4px solid #007b5e;

border-radius: 6px;

input[type="file"] {

padding: 5px;

background-color: #f0f0f0;

border: none;

.alert {

max-width: 600px;

margin: 20px auto;

padding: 15px;

border-radius: 6px;

font-weight: bold;

text-align: center;

.[Link] {

background-color: #d4edda;

color: #155724;
border: 1px solid #c3e6cb;

.[Link] {

background-color: #f8d7da;

color: #721c24;

border: 1px solid #f5c6cb;

[Link]

[Link]("DOMContentLoaded", function () {

const accountType = [Link]("accountType");

const individualFields = [Link]("individualFields");

const companyFields = [Link]("companyFields");

function toggleAccountType() {

const selected = [Link];

[Link] = selected === "individual" ? "block" :


"none";

[Link] = selected === "company" ? "block" : "none";

[Link]("change", toggleAccountType);
const form = [Link]("registerForm");

[Link]("submit", function (e) {

const password = [Link]("password").value;

const confirmPassword =
[Link]("confirmPassword").value;

if (password !== confirmPassword) {

[Link]();

alert("Passwords do not match. Please try again.");

});

});

You might also like