The TrustRide admin panel is a custom operations interface built specifically for platform operators. It is separate from Django’s defaultDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Muhammadbugaje/trustride/llms.txt
Use this file to discover all available pages before exploring further.
/admin/ interface and provides purpose-built tools for managing users, trips, bookings, refunds, payouts, and platform-wide settings — all from a single dashboard at /control/.
Accessing the Admin Panel
The custom admin panel lives at/control/. It is not the same as Django’s built-in admin at /admin/. Access to any page under /control/ is protected by the @admin_required decorator, which checks that the logged-in user satisfies at least one of the following conditions:
is_staff = Trueis_superuser = Truerole = "admin"on theUsermodel
"Admin access only." error message. Unauthenticated visitors are sent to the login page.
Dashboard Overview
The root of the admin panel (GET /control/) renders the operations overview. It aggregates the following live statistics from the database and displays them on the dashboard:
| Metric | Description |
|---|---|
| Total Users | Count of all registered accounts |
| Total Riders | Users with role = "rider" |
| Total Drivers | Users with role = "driver" |
| Active Trips | Trips with status published or in_progress |
| Total Bookings | All bookings across every trip |
| Confirmed Bookings | Bookings currently in confirmed state |
| Total Revenue | Sum of price for all confirmed and completed bookings |
| Pending Refunds | Refund requests with status requested |
| Pending Verifications | Unverified, non-suspended drivers awaiting approval |
| Suspended Users | Accounts with is_suspended = True |
| Pending Reports | Driver reports in pending status |
Navigation Sections
All major admin functions are accessible from the sidebar. The sections below link to their dedicated documentation pages.User Management & Verification
List all users, filter by role or status, verify or unverify drivers, suspend and reinstate accounts, and change user roles.
Payout Management
Create driver payout records, track commission rates, calculate net amounts, and manage the payout status lifecycle.
Reports & Exports
View platform-wide analytics, export booking and revenue CSVs, review driver reports, and inspect the audit log.
Trip Management
Cancel trips, force-complete in-progress trips, change trip status, and toggle trip visibility.
Booking Management
Browse all bookings with filters, cancel any booking as an admin, and view full booking detail including chat history.
Refund Processing
Approve or reject rider refund requests, add admin notes, and trigger automated email notifications.
Platform Settings
Configure platform fee, refund window, booking expiry, bank details, social media links, and feature flags.
Ambassador Management
Review ambassador applications, approve or reject applicants, manage active ambassadors, and update commission rates.
Trip Operations
Admins have full control over the lifecycle of any trip on the platform.Viewing Trips
GET /control/trips/ lists all trips, ordered by departure date. Trips can be filtered by status and searched by origin, destination, or driver name. The paginated list shows 20 trips per page.
GET /control/trips/<uuid>/ shows full trip detail, including all bookings (with rider names and seat IDs) and any waitlist entries.
Cancelling a Trip
POST /control/trips/<uuid>/cancel/
Cancels the trip by setting status = "cancelled" and is_active = False. All active bookings (reserved, pending_verification, confirmed) receive a system message in their booking chat notifying the rider of the cancellation. An optional reason POST parameter is included in the message. The action is written to the audit log.
Force-Completing a Trip
POST /control/trips/<uuid>/force-complete/
Sets status = "completed" on the trip and bulk-updates all confirmed bookings to completed. Use this when a trip has concluded but the driver has not marked it complete.
Changing Trip Status
POST /control/trips/<uuid>/change-status/
Allows setting any valid status from Trip.STATUS_CHOICES:
| Status | is_active set to |
|---|---|
draft | True |
published | True |
in_progress | True |
cancelled | False |
completed | False |
expired | Unchanged |
Toggling Trip Active State
POST /control/trips/<uuid>/toggle-active/
Flips is_active between True and False without changing the status. Useful for temporarily hiding a trip from search results.
Booking Operations
Viewing Bookings
GET /control/bookings/ lists all bookings across all trips, filterable by status and searchable by rider name, origin, or destination. 25 bookings are shown per page.
GET /control/bookings/<uuid>/ shows a full booking record, including the complete in-booking chat message thread and any associated refund requests.
Cancelling a Booking
POST /control/bookings/<uuid>/cancel/
Cancels the booking on behalf of the platform. This endpoint will reject cancellations for bookings already in completed, refunded, cancelled, or expired states. On success:
- Booking status is set to
cancelled. - One available seat is returned to the trip (capped at
total_seats). - A system chat message is sent to the rider with the cancellation reason.
- The next rider on the trip’s waitlist is notified.
- The action is recorded in the audit log.
Refund Processing
GET /control/refunds/ lists all refund requests. The page header displays total counts for pending, approved, and rejected refunds. Results can be filtered by status.
Approving a Refund
POST /control/refunds/<uuid>/approve/
Sets the refund to approved, returns one seat to the trip, deletes the associated booking, and sends a refund approval email to the rider. An optional notes POST parameter is saved as admin_notes on the refund record. The admin’s user account is attached to the refund for audit purposes.
Rejecting a Refund
POST /control/refunds/<uuid>/reject/
Sets the refund to rejected and sends a rejection email to the rider that includes the admin’s notes. The booking is not modified.
Both approve and reject endpoints support HTMX partial responses. If the request carries an
HX-Request header, the server returns only the updated refund row HTML instead of a full redirect.Platform Settings
GET /control/settings/ renders the settings panel. Settings are stored as AppSetting key-value records.
POST /control/settings/save/ persists changes. Only settings whose values have changed are written to the database; unchanged settings are skipped. The save view logs all changed setting labels to the audit log.
The following settings are managed from this panel:
| Key | Description | Default |
|---|---|---|
platform_fee_percent | Platform fee percentage | 5 |
refund_window_days | Days within which a refund can be requested | 7 |
payment_destination | Route payments to admin account | true |
admin_bank_name | Admin bank name | — |
admin_bank_account_name | Admin account holder name | — |
admin_bank_account_number | Admin account number | — |
booking_expiry_minutes | Minutes before an unpaid reservation expires | 30 |
waitlist_claim_minutes | Minutes a waitlisted rider has to claim a seat | 15 |
admin_whatsapp | Support WhatsApp number | +2348000000000 |
admin_email | Support email | support@trustride.ng |
admin_phone | Support phone | +2348000000000 |
instagram_url | Instagram page URL | — |
twitter_url | Twitter / X page URL | — |
telegram_url | Telegram channel URL | — |
facebook_url | Facebook page URL | — |
waitlist_enabled | Enable the trip waitlist feature | true |
dynamic_pricing_enabled | Enable per-stop dynamic pricing | false |
driver_verification_required | Require admin verification before drivers publish trips | true |
Ambassador Management
TrustRide supports a network of field ambassadors who can book seats on behalf of riders. The admin panel provides a full suite of tools to manage this programme.Applications
GET /control/ambassador/applications/ lists all ambassador applications with their current status (pending, approved, rejected).
GET /control/ambassador/applications/<id>/ shows the full application detail, including the applicant’s stated reason and location.
POST /control/ambassador/applications/<id>/approve/ promotes the user to ambassador by setting is_ambassador = True, recording ambassador_approved_at and ambassador_approved_by on their account, and marking the application as approved.
POST /control/ambassador/applications/<id>/reject/ marks the application as rejected and saves optional admin_notes.
Active Ambassador Management
GET /control/ambassador/management/ lists all active ambassadors, filterable by ambassador_status (active, paused, revoked) and searchable by name or email.
POST /control/ambassador/<id>/toggle-pause/ toggles an ambassador between active and paused states.
POST /control/ambassador/<id>/revoke/ permanently revokes ambassador status, sets is_ambassador = False, and records who performed the action and when.
POST /control/ambassador/<id>/update-commission/ updates the ambassador’s ambassador_commission_rate (must be between 0 and 100).