UsafiKonect is a full-featured laundry service marketplace connecting customers with laundry providers across Nairobi, Kenya. Built with pure PHP, MySQL, Tailwind CSS, and GSAP animations.
# UsafiKonect 🧺
**UsafiKonect** is a full-featured laundry service marketplace connecting customers with laundry providers across Nairobi, Kenya. Built with pure PHP, MySQL, Tailwind CSS, and GSAP animations.
> *"Usafi"* means cleanliness in Swahili — UsafiKonect connects you to clean.
---
## Features
### Three-Role System
- **Customers** — Browse providers, book laundry services, pay via M-Pesa or wallet, earn loyalty rewards
- **Providers** — Manage bookings, track earnings, set pricing, view analytics, handle subscriptions
- **Admins** — Platform oversight, user management, reports with CSV export, system settings, broadcast notifications
### Core Functionality
- Multi-step booking flow (provider → service → schedule → payment → confirmation)
- M-Pesa STK Push integration (Daraja API — sandbox with production scaffold)
- Wallet system with top-up, deductions, and refunds
- Loyalty program — every 5th completed booking earns a free wash
- Real-time notifications via AJAX polling (30s interval)
- Provider approval workflow with admin review
- CSV report exports for admin (bookings, revenue, providers)
- Subscription plans (Weekly / Monthly / Yearly) with DB-configurable pricing
- Support ticket system with admin replies
- Maintenance mode toggle
- Cookie consent banner
### Security
- CSRF token protection on all forms (POST-only state mutations)
- Parameterized PDO queries (no raw SQL interpolation)
- Bcrypt password hashing (cost factor 12)
- Input sanitization and output escaping via `e()` helper
- Session security: 1-hour timeout, session regeneration, IP binding
- Rate limiting on login (5 attempts per 15 minutes)
- File upload validation (2 MB limit, jpg/png/webp only)
- Safaricom IP whitelist on M-Pesa callback endpoint
- SSL verification tied to `APP_DEBUG` (enforced in production)
- `SELECT ... FOR UPDATE` locks to prevent race conditions on payments/cancellations
- Sensitive credentials masked in admin settings UI
### Frontend
- Responsive design ( …