Led frontend and API contract design for Jatri's counterman ticketing module — an offline-first POS powering 50+ counters across 15 bus and launch operators, handling 30k+ tickets daily at Eid peak.
Role
Lead Frontend + API design
Team
30 engineers
Timeline
6 months to launch
Status
In production, nationwide
Jatri operates Bangladesh's largest multi-modal travel platform. Before this module, 15 bus and launch operators ran ticketing on fragmented legacy systems — separate seat maps, manual reconciliation, no cross-counter visibility.
Countermen at 50+ physical counters booked tickets the old way: paper, phone calls, stuck on local LAN. We rebuilt it from scratch as a unified counterman POS — offline-first, with live seat sync across the country.
Launch (ferry) tickets have a quirk: a single physical seat on a long-haul route can legally be sold twice when passengers board and alight at different points (Passenger A: Dhaka → Barisal, Passenger B: Barisal → Chittagong — same seat, same boat, two PNRs).
No competitor supported it. Legacy systems blocked it as a "double booking." We modeled seats as segmented inventory — each seat is a graph of boarding → alighting edges, availability computed per-segment, not per-seat. A booking consumes only edges it traverses.
Frontend renders the same seat as bookable or blocked contextually based on the counterman's selected origin–destination pair.
Two countermen clicking the same seat simultaneously during Eid rush was routine. Initial approach (API availability check → book) produced double-bookings in prod.
Ferry terminals lose connectivity for hours. Tickets still have to print. Built:
A counterman routinely books 10–200 seats per transaction — family groups, corporate charters, Eid migrations. UX had to let them:
Built as a multi-step cart with live fare recomputation via WebSocket-bound state.
Every operator has its own pricing: peak multipliers, student discount, senior citizen rules, seat-class premiums, route surcharges, counterman commission tiers, platform commission. Legacy was hardcoded. Modeled as a rules engine — operators configure fare matrices via admin panel, engine computes at booking time. Frontend shows live breakdown so countermen can explain to passengers on the spot.
Each operator's legal challan had its own template — column order, logo placement, tax ID positioning, regulator-mandated fields (BRTA / BIWTA). Built a template renderer that compiles ESC/POS commands per operator and streams to thermal printers over USB / network, with print retries and jam handling.
Partial refunds on segmented seats — refund one leg of a multi-segment booking without disturbing the other. Cascading rules: time-to-departure tiers, operator policy, payment-method rollback (wallet instant, card via PG, cash via counter).
Operators refused new UI initially — retraining 50 counters is expensive. We improvised:
Adoption hit 100% by month 3.
30k+
Tickets / day at peak
50+
Counters nationwide
15
Operators onboarded
0
Double-bookings post-launch
~35s
Avg booking time (90s → 35s)
6 mo
Time to ship