SwiftSend Documentation
Everything you need to know about the project — setup, features, and viva prep.
What is SwiftSend?
SwiftSend is a web-based courier delivery management system. It lets customers book deliveries and track their packages, drivers manage and update delivery status, and admins oversee the entire system. Built with PHP, Tailwind CSS, and JavaScript — no frameworks, just clean code.
Features
Registration & Profile
Sign up, login, edit profile, change password. Works for all user roles.
Booking & Dispatch
Customers create bookings with pickup/drop details. Admin assigns a driver.
Tracking System
Status-based tracking: Pending → In Transit → Delivered. Public tracking page available.
Notifications
Toast notifications for actions. Inline messages show delivery status updates.
Payment System
Dummy payment with card, mobile, or cash. Includes printable receipt.
Feedback & Ratings
Customers rate deliveries 1–5 stars. Visible to both driver and admin.
Tech Stack
Setup Guide
What You Need
Install XAMPP, WAMP, or MAMP. This gives you Apache, PHP, and MySQL — all in one.
Copy the Files
Extract the courier-app folder into your web server root.
For XAMPP, that's xampp/htdocs/courier-app/
Create the Database
Open phpMyAdmin at http://localhost/phpmyadmin.
Click Import, choose the file database/schema.sql, and run it. Done — all tables are created.
Enable Clean URLs
In XAMPP, open httpd.conf and make sure this line is NOT commented out:
LoadModule rewrite_module modules/mod_rewrite.so
Also set AllowOverride All for your htdocs folder. Restart Apache.
Open the App
Go to http://localhost/courier-app/ in your browser. That's it!
Default Accounts
| Role | Password | |
|---|---|---|
| Admin | admin@swiftsend.com | admin@swiftsend.com |
| Customer | john.williams34@gmail.com |
john.williams34@gmail.com
|
| Customer | mary.green84@protonmail.com |
mary.green84@protonmail.com
|
| Customer | james.jackson70@gmail.com |
james.jackson70@gmail.com
|
| Customer | richard.johnson36@gmail.com |
richard.johnson36@gmail.com
|
| Customer | robert.wright90@protonmail.com |
robert.wright90@protonmail.com
|
| Driver | elizabeth.davis84@yahoo.com |
elizabeth.davis84@yahoo.com
|
| Driver | sarah.scott26@icloud.com |
sarah.scott26@icloud.com
|
| Driver | michael.lewis61@outlook.com |
michael.lewis61@outlook.com
|
| Driver | susan.clark21@gmail.com |
susan.clark21@gmail.com
|
| Driver | ava.white38@protonmail.com |
ava.white38@protonmail.com
|
Register new customer and driver accounts from the sign up page.
Project Structure
courier-app/ ├── config/ │ ├── app.php ← All app settings in one place │ └── db.php ← Database connection + helper functions ├── includes/ │ ├── header.php ← Shared navbar and page head │ └── footer.php ← Shared footer, toast system, modal ├── customer/ │ ├── dashboard.php ← Book, track, view orders │ ├── payment.php ← Pay for deliveries │ ├── feedback.php ← Rate completed deliveries │ └── profile.php ← Edit account info ├── driver/ │ └── dashboard.php ← View assigned orders, update status ├── admin/ │ └── dashboard.php ← Manage users, bookings, feedback ├── assets/ │ └── app.js ← Form validation, toasts, modals ├── database/ │ └── schema.sql ← MySQL tables + default admin ├── index.php ← Landing page ├── register.php ← Login and sign up ├── track.php ← Public package tracking ├── logout.php ← Ends session safely ├── docs.php ← This documentation page ├── .htaccess ← Clean URLs and security rules └── README.md ← Text version of this doc
Security Measures
SQL Injection Protection
All database queries use prepared statements. User input is never put directly into SQL.
XSS Protection
Every piece of output is escaped with htmlspecialchars() to stop script injection.
CSRF Protection
Every form has a hidden token. The server checks this token before doing anything. Stops fake requests from other sites.
Password Hashing
Passwords are hashed with bcrypt. Even if someone sees the database, they can't read the passwords.
Secure Sessions
Session cookies are HTTP-only (JavaScript can't touch them), and session IDs are regenerated to stop fixation attacks.
Role-Based Access
Every page checks if you're logged in AND if your role is allowed. A customer can't open admin pages.
HTTP Security Headers
Headers like X-Frame-Options and X-XSS-Protection are set to block clickjacking and other browser-level attacks.
File & Directory Protection
The .htaccess file blocks access to config files, SQL files, and directory listings.
Database Design
Four tables, all connected with foreign keys:
users
Stores all accounts — customers, drivers, and admins. The role column tells them apart. Passwords are hashed.
bookings
Each delivery request. Links to a customer (who made it) and a driver (who delivers it). Status goes: pending → in_transit → delivered.
payments
One payment per booking. Stores the amount, method (cash/card/mobile), and whether it's been paid.
feedback
Customer ratings (1–5 stars) with optional comments. One review per completed delivery.
How they connect:
users (1) ──▸ (many) bookings ──▸ (1) payments
│ │
│ └──▸ (1) feedback
└──────────────────────────────────┘
Viva Questions & Answers
Common questions your examiner might ask — with clear, simple answers.
Why did you use plain PHP instead of a framework like Laravel?
Why is your tracking system status-based and not using real GPS?
How does your payment system work?
How do you protect against SQL injection?
How does login and authentication work?
password_verify(). If it matches, we save their ID, name, and role in the session.
Every protected page calls requireRole() to check if the session has the right role.
What is CSRF and how do you prevent it?
Why do you store all user roles in one table?
role column is cleaner and easier to manage. We filter by role when needed.
How does the public tracking page work without login?
requireLogin(), so anyone can use it.
The user enters a tracking ID like SWF-0001, we convert it to a number, and look it up in the database.
We only show safe information — no private details like customer email or phone.
What makes your UI responsive?
md:grid-cols-2 and
flex-wrap. These make the layout adapt to different screen sizes.
On mobile, things stack vertically. On desktop, they sit side by side. The navbar also has a hamburger menu for small screens.