back to /home
~/projects/ P-02
03 casesfiled 2021–2025
~/projects/P-02/shipped/realtime

emitter clone

real-time voice + SMS · WebRTC
RoleBackend engineer · Web Stacking
Duration6 months
Team4 engineers
Year2022
+150%concurrent calls
<400msmedia setup p50
99.4%webhook recovery
voice+smschannels

An Emitter-style web app with Twilio voice underneath, so users dial from the browser straight to a phone line. Live SMS layered on top — the whole thing held together by a tight WebSocket layer.

Overview

A browser-native softphone. Sign in, type a number, hit dial — the call lands on a real phone line in under a second. SMS shares the same threads, the same UI, the same WebSocket. Built at Web Stacking on a team of four; I owned the realtime spine end-to-end.

The point of the project wasn't novelty — Twilio has had voice in the browser for years. The point was *production*. Most demos work. This one had to work at 3 AM on a corporate VPN with someone's bluetooth headphones flapping in and out.

The Problem

Three problems that the demo flow hides.

**Symmetric NAT.** WebRTC tutorials assume STUN works. In real corporate networks it doesn't, and you end up paying for TURN traffic. Budget for it or wear it.

**Webhook chaos.** Twilio status callbacks arrive late, out of order, sometimes duplicated, sometimes never. Treat them as hints, not truth.

**Echo.** The browser does its best. The moment a user joins from a phone on speaker mode, the best isn't enough. You need data on every call so you can argue with support tickets, not vibes.

The Approach

Two services, one realtime hub.

**voice-svc.** Owns the Twilio TwiML flow, the call state machine, the TURN credential mint. State machine is the **source of truth**, not the webhook. Webhooks merely poke the state machine to re-fetch from Twilio's REST API and reconcile.

**sms-svc.** Pure Node + Twilio's API for inbound/outbound. Stores every message in Postgres with the same `conversation_id` as the call thread, so voice and text live in one timeline.

**ws-hub.** A thin WebSocket fanout. Browser clients subscribe to their own conversation channel; both services publish into it. Heartbeats every 5s, drop after 15. Reconnect with exponential backoff plus jitter so a flaky network doesn't thunder-herd the hub.

// the only webhook handler that matters
async function onCallStatus(req) {
  const { CallSid } = req.body;
  const truth = await twilio.calls(CallSid).fetch();
  await stateMachine.transition(CallSid, truth.status);
}

Stack Deep-Dive

● project topologyfig.Ascoped to this project
CLIENTSEDGESERVICESDATA / EXTBrowserWEB-RTC · JSMobileRNWS HubFANOUTREST APINODEvoice-svcTWILIO · STATEMACHINEsms-svcTWILIO MESSAGINGTURNRELAYPostgresCONVERSATIONSRedisPRESENCE

Critical metric we paged on: `peer_connection_failed` per minute, not CPU. Every Twilio incident showed up there 90 seconds before any human-facing error.

Results

Concurrent call capacity rose 150% over the prior implementation simply by moving from a single-node WS to a Redis-backed fanout. Median media setup landed under 400ms. Webhook recovery — the percentage of calls whose final state matched truth without manual reconciliation — rose to 99.4% after the state-machine refactor, from somewhere in the low 80s before.

The win we didn't expect: support ticket volume on call quality dropped because the team finally had `getStats` data per call. Most "the call was bad" tickets resolve faster when you can show the customer their own jitter graph.

Gallery

← Previous case
blockvest
online/v5.0 · build 2026.05.08/Pakistan → remote

osama
hashmi.

Full-stack engineer building the parts users don't see. APIs that don't fall over, microservices that talk to each other, payment rails, real-time voice/SMS over WebRTC, and the React Native frontends that ride on top.

years shipping
04yrs
since Jul 2021 · 3 teams
primary stack
node · nest
react native
k8s · docker · aws · stripe · twilio

./identity.json

{
  "name":    "Osama Hashmi",
  "role":    "full_stack_engineer",
  "focus":   ["apis", "microservices", "mobile"],
  "runtime": "node · nest · react-native",
  "deploy":  "k8s · docker · aws",
  "replies": "~within 24h"
}

$ uptime

// last 4 years, in numbers
shipping_years    04  // since 2021
services_owned    07  // across 3 teams
languages         06  // ts · py · rust · sol · go · js
deploy_speedup    −50%  // k8s pipeline tuning
system_efficiency +60%  // at BufferSol
realtime_scale    +150% // at Web Stacking
section / 01The Stack

What I build, drawn out.

Most portfolios list tools. I draw systems. Hover any node to see how it fits — from a React Native client all the way down to a Kubernetes pod running NestJS talking to Stripe and a Postgres replica.

● live topologyfig.1v4 · productionhover any node
Service topology: clients (RN/web/web3) → edge (nginx/gateway/websockets) → services (core/payments/comms/contracts) → data (postgres/redis/s3/k8s)CLIENTSEDGESERVICESDATA / EXTReact NativeiOS · ANDROIDReact + ReduxWEB · SPAWeb3 dAppETHERS · WAGMINginxREVERSE PROXYAPI GatewayAUTH · RATELIMITWebSocket HubREAL-TIMENestJS · core-apiMICROSERVICENode · payments-svcSTRIPE · PAYPALTwilio · comms-svcVOICE · SMS · WEBRTCSolidity · contractsEVMPostgresPRIMARY · REPLICARedisCACHE · QUEUES3 + IPFSOBJECTS · NFTSKubernetesEKS · DOCKER
primary path sync call async / event↳ animated packets show production traffic
section / 02Deploy Log

Three teams, one philosophy.

Pick the boring tool that scales. Test the parts that move money or messages. Automate the deploy on day one. Below: a chronological log of what shipped.

MAY 2022 → AUG 2025/ 3y · 4mo

Full Stack Engineer

@ BufferSol Technologies · New York, NY

Built a full-stack product on React Native + NestJS, deployed to Kubernetes. Owned the mobile client and the services it talks to end-to-end — auth, payments, push, plus the IDO‑CRM (accounting, sales pipelines, security staffing, ATIS complaint workflow).

React NativeNestJSKubernetesDockerPostgresStripeAWS
+60%efficiency
−50%deploy time
07services
OCT 2021 → APR 2022/ 7 mo

Backend Engineer

@ Web Stacking · Islamabad, Pakistan

Engineered a microservices architecture wired into Twilio Voice/SMS and WebRTC, routing real-time calls and messages between web users and phone lines. Containerised the lot with Docker, orchestrated on Kubernetes.

Node.jsMicroservicesTwilioWebRTCDockerKubernetes
+150%scalability
voice+ sms
JUL 2021 → SEP 2021/ 3 mo

Mobile Developer

@ KawanBantu · Jakarta

First production gig. Built interactive UI with React + Redux, profiled the client, and cut perceived load on the heaviest screens roughly in half.

ReactReduxJavaScript
+50%client perf
section / 03Selected Work

Three projects, three problems.

From an NFT marketplace with on-chain provenance, to a Twilio-backed comms clone, to a CRM that quietly runs a security firm's back office. Click any card for the full case.

section / 04Toolbelt

Things I reach for without thinking.

Highlighted = primary tools — what I'd start a new system in tomorrow. The bar is intuitive frequency, not skill level. Everything listed I've shipped with.

languages06
TypeScript
JavaScript
Python
Solidity
Rust
Go
backend06
NestJS
Node.js
Microservices
WebSockets
Nginx
Flask
frontend / mobile04
React Native
React
Redux
Expo
infra · deploy07
Docker
Kubernetes
AWS
GitHub Actions
Serverless
Azure
Render
integrations06
Stripe
Twilio Voice
Twilio SMS
Twilio Video
PayPal
Custom Bank Gateways
data04
Postgres
Redis
S3
IPFS
web304
Solidity / EVM
Ethers / Wagmi
NFT contracts
IPFS pinning
education
B.Sc Computer ScienceCapital University of Science & TechnologyIslamabad, Pakistan
section / 06Get In Touch

Send a brief, get a response.

I'm best on long-running engagements where I can own a service end-to-end — backend, mobile, deploy. Architecture and Twilio / payments consults also fine. Drop a note with what you're building.

contact · POST /v1/inbox
nameOsama Hashmi
timezonePKT · UTC+5
overlap~6h EST · ~4h PST
replies~within 24h
osama_hashmi() · full-stack engineer · v5.0 · build 2026.05.08
crafted with html, css, and four years of muscle memory
┌─[ end of file ]─┬─[ thanks for reading ]─┬─[ →  /writing ]─┐
back to /home
~/writing
04 entriesupdated 2026.05
writing/changelog · 4 entries/filed under: technical

the /writing
directory.

Notes I write when something in production teaches me a lesson I don't want to forget. About boring choices, realtime plumbing, deploy pipelines, and the difference between shipping and shipping-shipping.