01 / Telecom

2024—NOW

Infrastructure
behind ~1M users.

Architected eSIM, number, call and VPN provisioning for ~1M users, plus the self-service dashboard and API.

Role
Full-Stack Engineer
Company
Kevych Solutions
Tech
Node.js / NestJS / Next.js / SIP/VoIP / PostgreSQL / Redis

Scroll to explore

01

Overview

The backend of a telecom product used by around one million people: eSIMs, phone numbers, calls and VPN.

I architected the provisioning platform and led its backend development: eSIM and number provisioning, call routing, VPN and business self-service, plus the React and Next.js dashboards on top of it. For most of that time the backend team was one or two engineers.

The backend is NestJS on GCP Cloud Run. Calls run through Asterisk and external SIP/VoIP providers.

02

The hard part

Almost everything the product sells depends on someone else's API, and those APIs are slow and unreliable.

  • Provisioning an eSIM or a number is a call to an external provider that can time out, fail halfway or succeed after the client has already given up.
  • A retry is unavoidable, but it must never create a second eSIM, a second number or a second charge for the same order.
  • Calls need long-lived SIP connections, which a request-scoped serverless backend cannot hold.
  • Business customers expect to manage provisioning and usage themselves, at any hour, without opening a ticket.

03

System

A stateless NestJS backend on Cloud Run, with Asterisk running calls next to it.

  1. Clients

    • Users (~1M) · mobile apps
    • Business customers · dashboard + API
  2. Backend · NestJS on Cloud Run

    • eSIM & number provisioning
    • Call routing config
    • VPN (WireGuard)
    • Business self-service
  3. Voice

    • Asterisk
    • SIP / VoIP providers
  4. Data

    • PostgreSQL · core records
    • Redis · cache, sessions, rate limits
    • Firestore · real-time sync

04

Engineering decisions

Idempotent provider calls
Every provider request carries an idempotency key and is safe to retry. A timeout or a duplicated request ends in exactly one eSIM, one number and one charge.
Asterisk outside the request path
Call media and SIP sessions live in Asterisk, where long-lived connections belong. The backend owns numbers and routing rules and stays stateless.
Serverless for a two-person team
Cloud Run handles scaling and deploys. With one or two backend engineers, every hour not spent on servers went into product.
One data store per job
PostgreSQL for accounts, provisioning and billing. Redis for caching, sessions and rate limits. Firestore to push live state to the apps.

05

What I built

  • eSIM and phone-number provider integrations that survive timeouts, partial failures and retries.
  • The Asterisk setup for calls through SIP/VoIP providers, with numbers and routing managed from the backend.
  • WireGuard VPN provisioning: key and config issuance and server management.
  • The business self-service dashboard (React, Next.js) and public API for accounts, provisioning and usage, plus internal admin dashboards.

06

Impact

~1M users

  • Provisioning, calls and VPN run in production for about one million users.
  • Business customers change provisioning on their own through the dashboard or the API, without the operations team.
  • A backend team of one or two kept shipping features with no servers to maintain.

07

Stack

  • Node.js
  • TypeScript
  • NestJS
  • React
  • Next.js
  • GCP Cloud Run
  • Asterisk
  • SIP / VoIP
  • WireGuard
  • PostgreSQL
  • Redis
  • Firestore