02 / Mobility

2024—NOW

From firefighting
to shipping.

Led an event-driven refactor of a legacy taxi backend, adding WebSockets for live ride tracking.

Role
Full-Stack Engineer
Company
Kevych Solutions
Tech
Node.js / NestJS / WebSockets

Scroll to explore

01

Overview

A live taxi service running on a legacy backend that had stopped keeping up.

I led the event-driven refactor of the ride-hailing backend and built a Node.js WebSocket layer for live ride tracking. The goal was not one more feature. It was a backend the team could build on again.

02

The hard part

The team spent its time reacting to production instead of building the product.

  • The legacy backend was hard to change safely, so every change carried risk and incidents took over the roadmap.
  • Ride hailing is real-time by nature: a ride moves through states, and riders and drivers expect to see each change as it happens.
  • The service was live, so it had to be improved while it kept running, not replaced in one big rewrite.

03

System

Each ride state change becomes an event, and the WebSocket layer pushes it to the apps.

  1. Ride

    • State changes as the trip progresses
  2. Backend · NestJS

    • Handles the change and emits an event
  3. WebSocket layer · Node.js

    • Pushes the update to subscribers
  4. Apps

    • Live ride tracking

04

Engineering decisions

Events instead of chained calls
A ride state change is emitted once and the parts that care react to it. New behavior attaches as a new consumer instead of another edit to a fragile core flow.
Push, not poll
Clients hold a WebSocket and receive updates the moment they happen, instead of repeatedly asking the API whether anything changed.
Real-time as its own layer
Long-lived connections live in a dedicated Node.js WebSocket layer, apart from the request handling that runs the business logic.
Refactor, not rewrite
The backend moved to event-driven flows step by step, so the production service kept running throughout.

05

Impact

From firefighting to shipping.

Recurring production incidents dropped from several a week to several a month. The team's time moved from firefighting back to shipping product features, with live ride tracking built into the backend rather than bolted on.

06

Stack

  • Node.js
  • TypeScript
  • NestJS
  • WebSockets