1. Project Overview
HostQ is a premium, all-in-one property management SaaS built specifically for the Kenyan short-stay market. It empowers Hosts (property owners) and Agents (booking agents) to manage listings, bookings, guests, and M-Pesa payments from a single, unified dashboard.
The platform features a "God Mode" Super Admin panel that controls all global reference data, user subscriptions, and platform metrics.
Built with Vanilla HTML/CSS/JS and PHP (PDO). No heavy frontend frameworks (React/Vue) to guarantee lightning-fast load times on mobile networks in Kenya.
2. Directory Architecture
Below is the file structure for the /host.prompter.co.ke/ root directory.
3. User Roles & Permissions
HostQ uses Role-Based Access Control (RBAC). The system dynamically routes users to different dashboards upon login based on their database role.
| Role Name | System ID | Dashboard Route | Access Level |
|---|---|---|---|
| Super Admin | super_admin | /admin/dashboard.html |
God Mode (Global Control) |
| Host / Owner | host | /host/dashboard.html |
Full access to their properties |
| Co-Host / Manager | manager | /host/dashboard.html |
Day-to-day ops (No financials) |
| Booking Agent | agent | /agent/dashboard.html |
Own bookings & commissions only |
| Cleaner / Staff | cleaner | /staff/dashboard.html |
Assigned cleaning tasks only |
4. The Dynamic API Engine
Instead of writing a new PHP file for every single table, the Super Admin setup pages use a highly optimized, dynamic PHP engine located at /admin/api/setup/setup.php.
How it works: It accepts a ?table= parameter to perform Create, Read, Update, and Delete (CRUD) operations safely.
| Method | Endpoint Example | Action |
|---|---|---|
| GET | /setup.php?table=amenities |
Fetch all amenities |
| POST | /setup.php?table=house_rules |
Create a new rule |
| PUT | /setup.php?table=checkin_times |
Update a time slot |
| DELETE | /setup.php?table=property_types&id=5 |
Delete a property type |
The API uses PDO Prepared Statements, strict table whitelisting, and custom duplicate validation logic (Name + Type) to prevent SQL injection and data corruption.
5. Brand Color Palette
The HostQ UI avoids the generic "tech blue" and uses a warm, premium color scheme that conveys trust and hospitality.
Primary Colors
UI Feedback Colors
Structural Colors
6. Database Reference Tables
The setup pages manage the "Reference Data" that powers the entire platform. These tables are connected to the setup.php API and all support drag-and-drop reordering via the order_index column.
admin_users- Stores Super Admin credentials (hashed).property_types- e.g., Apartment, Villa, Bungalow.room_types- e.g., Studio, 1-Bedroom, 2-Bedroom.amenities- e.g., WiFi, Kitchen, Pool (grouped by category).house_rules- e.g., No smoking, Pets allowed.cancellation_policies- e.g., Flexible, Strict (with specific refund rules).checkin_times- e.g., 10:00 AM Check-in, 2:00 PM Check-out.counties,locations,centres- Hierarchical location data for Kenya.