TrustRide runs on Django 6.0 with Daphne as the ASGI server (required for WebSocket support), Redis as both the Celery broker and the channel layer, and PostgreSQL as the primary database. The steps below get a fully functional local environment — including real-time chat and background task processing — running in under 10 minutes.Documentation 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.
Verify Prerequisites
You need Python 3.10 or later, a running PostgreSQL instance, and a running Redis server before cloning the project. Confirm each is available:
Clone and Create a Virtual Environment
Clone the repository, enter the project directory, and isolate dependencies in a virtualenv:All subsequent commands assume the virtualenv is active. The project root — the directory that contains
manage.py — is your working directory for every command in this guide.Install Dependencies
TrustRide pins every package via Key packages this installs include
requirements.txt. Install everything in one shot:Django==6.0.6, channels==4.3.2, channels_redis==4.3.0, daphne==4.2.2, celery==5.6.3, django-celery-beat==2.9.0, psycopg2-binary==2.9.12, cloudinary==1.44.2, djangorestframework==3.17.1, and django-environ==0.14.0.Configure Environment Variables
TrustRide uses
python-dotenv to load a .env file from the project root. Create .env and populate it with the variables below. Every key maps to an os.getenv(...) call in trust_ride/settings.py.If
DATABASE_URL is not set, settings.py falls back to SQLite (db.sqlite3 in the project root). SQLite works for initial exploration but does not support pg_trgm indexing, which the origin/destination search is optimised for. Switch to PostgreSQL before running load tests or working on search performance.Run Migrations and Populate Sample Data
Apply all database migrations and then seed the database with initial platform configuration using the included population script:After migration, collect static files if you plan to run Daphne instead of
populate_sample_data.py defines a create_sample_app_settings() helper that inserts default AppSetting records — platform_fee_percent, auto_cleanup_interval_hours, verification_timeout_hours, waitlist_expiry_minutes, and gps_update_interval_seconds. Run it via manage.py shell as shown above. To create test users and sample trips, use python manage.py createsuperuser for an admin account, then register rider and driver accounts through the web UI.runserver:Start All Services
TrustRide requires four concurrent processes for full local functionality. Open a separate terminal tab for each:Terminal 1 — Daphne ASGI server (required for WebSocket chat and notifications):Terminal 2 — Celery worker (processes background tasks: seat expiry, notifications, booking reminders):Terminal 3 — Celery Beat (triggers scheduled tasks: Terminal 4 — Standard Django dev server (alternative to Daphne for HTTP-only development; does not support WebSockets):Open http://127.0.0.1:8000 in your browser. The admin panel is at
expire_bookings_and_cleanup every 120 s, update_trip_statuses every 60 s):/control/ and Django’s built-in admin is at /admin/.