Django REST backend for the Alingo mobile app.
This service handles:
Application data is stored in MongoDB. SQLite is only used for Django framework concerns.
backend/
|-- apps/
| |-- authentication/
| |-- core/
| |-- reviews/
| |-- rides/
| |-- users/
| `-- verification/
|-- config/
|-- database/
|-- templates/
|-- media/
|-- manage.py
|-- requirements.txt
`-- README.md
cd backend
python -m venv venv
.\venv\Scripts\activate
pip install -r requirements.txt
python manage.py migrate
Create backend/.env and configure the values needed for your environment.
Common variables:
SECRET_KEY=change-me
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
MONGODB_URI=mongodb://localhost:27017/
MONGODB_DB_NAME=alingo_db
FIREBASE_CREDENTIALS_PATH=path/to/firebase_service_account_key.json
Optional production-style Firebase configuration:
FIREBASE_CREDENTIALS_JSON={"type":"service_account", ...}
Optional frontend access control:
CORS_ALLOWED_ORIGINS=http://localhost:8081,http://127.0.0.1:8081
python manage.py runserver 0.0.0.0:8000
Default local URL:
http://localhost:8000MongoDB collections used by the app include:
usersridesreviewsotpsverificationsThe backend creates indexes for:
uidphoneBase path: /auth/
GET /auth/pingPOST /auth/otp/sendPOST /auth/otp/verifyBase path: /api/verification/
POST /api/verification/submitGET /api/verification/statusBase path: /users/
GET /users/meGET /users/me/ridesPATCH /users/profilePATCH /users/availabilityPATCH /users/locationPOST /users/push-tokenGET /users/<user_id>GET /users/<user_id>/reviewsBase path: /rides/
POST /rides/createPOST /rides/searchPOST /rides/requestPOST /rides/respondPOST /rides/completePOST /rides/cancelGET /rides/my-activeGET /rides/my-requestsGET /rides/detailBase path: /reviews/
POST /reviews/createAuthorization: Bearer <token>.VERIFIED status.UNVERIFIED status.PENDING.Verification images are currently stored under backend/media/verifications/.
If you do not want local media persistence in development, clear that folder manually.
After making backend changes, manually verify the narrowest relevant flow:
Before production use:
DEBUG=FalseALLOWED_HOSTS