Skip to main content
Solo•Live in Production•2026 – Present

TikitiPro — High-Concurrency Transit & Cryptographic Event Ticketing Engine

Multi-operator SACCO transit & event ticketing engine eliminating flash-sale double-bookings with Redis/PostgreSQL locking, M-Pesa escrow, and <50ms offline Ed25519 QR verification.

TikitiPro — High-Concurrency Transit & Cryptographic Event Ticketing Engine
TikitiPro — High-Concurrency Transit & Cryptographic Event Ticketing Engine Cover Banner
0 Races
Double-Bookings (50 Threads)
<0 ms
Offline QR Verification
0 sec
Seat Hold Window
0-Stack
Platform Architecture
The Challenge

Problem & Context

Flash sales on shuttles and live events frequently suffer from race-condition double-bookings when multiple passengers purchase the last seats simultaneously, while rural transit corridors lack reliable 4G connectivity for boarding ticket verification.

A full-stack, multi-operator transit SACCO and reserved-seat event ticketing platform built for high-concurrency African mobility and live venues—100% solo-architected across Django 5.1 (Daphne ASGI), Next.js 15, Redis 7, PostgreSQL 16, and Flutter 3.

Architecture & Delivery

Key Architectural Highlights

Prevented flash-sale double-bookings by combining Redis SET NX EX 180 atomic seat holds with PostgreSQL SELECT FOR UPDATE row locks and partial unique constraints (0 double-bookings across 50 concurrent competing threads).
Built an interactive 50-Buyer Concurrency Arena and real-time SVG cabin maps (14-seater RHD matatus, 33-seater coaches, 24-seat VIP grids) powered by Django Channels WebSockets.
Engineered <50ms pure-Dart offline ticket verification in Flutter using asymmetric Ed25519 signatures (cached 32-byte public key) and a local append-only scan ledger blocking screenshot replay attacks.
Solved M-Pesa Daraja 3.0 late-callback races via LATE_ESCROW_CREDIT quarantine so expired holds bought by another passenger are never overwritten and resolve cleanly via Next-Shuttle Vouchers or B2C reversals.
Delivered a multi-SACCO marketplace with a 5-tab Platform Superadmin Console, Operator Dispatch Console, Brevo SMTP 6-digit OTP recovery, and passwordless passenger ticket lookup.
Deep Dive

Engineering Challenges & Solutions

THE HARD PROBLEM

When 50+ buyers request the last 2 seats on a Nairobi-Nakuru shuttle at the exact same millisecond, naive check-then-insert queries allow multiple buyers to pay for the same seat.

THE ARCHITECTURAL SOLUTION

Layered a 180-second Redis SET NX distributed lock ahead of PostgreSQL SELECT FOR UPDATE transactional row locking and a partial unique index (uniq_active_or_confirmed_seat_per_trip), returning HTTP 409 Conflict to losing threads.

Technology Stack

Tools & Technologies Used

Backend & Real-Time
Django 5.1DRFDaphne ASGIDjango ChannelsEd25519 Cryptography
Data & Locking
PostgreSQL 16Redis 7 (SET NX)SELECT FOR UPDATE
Frontend Web
Next.js 15 (App Router)React 19TypeScriptTailwind CSS v4
Mobile & Infra
Flutter 3Brevo SMTPNginx Reverse ProxyOracle Cloud ARM64
Interface Gallery

Visual Walkthrough & Captures

Interactive SVG Cabin Map & M-Pesa Checkout Stub
Interactive SVG Cabin Map & M-Pesa Checkout Stub
Interactive SVG Cabin Map & M-Pesa Checkout Stub
50-Buyer Concurrency Arena (0 Double-Bookings, 48 Conflicts Blocked)
50-Buyer Concurrency Arena (0 Double-Bookings, 48 Conflicts Blocked)
50-Buyer Concurrency Arena (0 Double-Bookings, 48 Conflicts Blocked)
M-Pesa Late Callback Escrow & USSD *384*77# Simulator
M-Pesa Late Callback Escrow & USSD *384*77# Simulator
M-Pesa Late Callback Escrow & USSD *384*77# Simulator