Back to projects
Django 5.2DRFPostgreSQLReact 19

OURQUILANE: Yalidine Delivery

On-Demand Service Platform

Order management platform for an on-demand service business, built around a 9-state order state machine with soft deletes, crypto-secure public IDs, and PDF document generation.

On-demand service platform architecture: Django 5.2 with a 9-state order state machine, soft deletes, composite indexes, and a React 19 frontend
A 9-state order lifecycle with an explicit cancellation path, backed by Django ORM, soft deletes, and composite indexes.

Overview

A Django 5.2 + DRF platform that manages on-demand service orders through an explicit 9-state lifecycle with a dedicated cancellation path. Every operational event maps declaratively to its financial record, deletes are soft and recoverable, and public order IDs are cryptographically unguessable. A React 19 + Ant Design frontend consumes the OpenAPI-documented DRF API.

What I Did

  • Designed a 9-state order state machine with explicit transitions and a dedicated cancellation path
  • Implemented a SoftDeleteQuerySet so every domain delete is recoverable and auditable
  • Tuned composite database indexes around the platform's real order-lookup patterns
  • Generated public order IDs with secrets.choice for cryptographically unguessable references
  • Built PDF document generation with WeasyPrint and ReportLab
  • Mapped operational events to financial records through a declarative OPS_TO_FINANCIAL_MAP
  • Set up a singleton admin site plus a custom SuperAdminSite for elevated operations
  • Documented the API with drf-spectacular (OpenAPI) for frontend and integration consumers
  • Built the React 19 + Ant Design frontend on the DRF API

Challenges

  • Enforcing that orders only move through valid state transitions across 9 states
  • Keeping financial records consistent with operations via a single declarative mapping
  • Making soft deletes airtight so filtered-out rows never leak into queries or reports
  • Issuing public order references that are short, shareable, and impossible to enumerate

Results

  • Order lifecycle is fully explicit: no order can reach an invalid state
  • Finance and operations stay in sync through one declarative map instead of scattered signals
  • Soft deletes plus admin separation give full recoverability and a clear elevation boundary
  • OpenAPI documentation made the API self-serve for the frontend team

Tech Stack

Django 5.2 + DRF

Mature ORM and serializer stack for a workflow-heavy domain

PostgreSQL

Composite indexes tuned to the platform's order-lookup patterns

WeasyPrint / ReportLab

Print-quality PDF receipts and operational documents

drf-spectacular

OpenAPI schema keeps frontend and API contracts in sync

React 19 + Ant Design

Fast, consistent operational UI over the DRF API