All articles

Emilia Cross: per-minute billed live video, end to end

Case study — a dating app (Flutter + PWA) where connections happen over live video, billed per minute in real time. Architecture, decisions, and the hardest problem.

Emilia Cross: per-minute billed live video, end to end

Emilia Cross, for France Assist, is a dating app where connections are made over live video. I built it end to end: the Flutter clients (published mobile app + PWA) and the NestJS backend.

The real challenge wasn't one piece, but three hard things held together: real time (the video), trust (a dating platform attracts fraud and abuse) and monetization (money coming in, and payouts to hosts).

Architecture decision #1: split the REST API and the WebSocket server. They run as two separate processes (separate ports and deployments), so the real-time layer presence, signaling, live billing scales without ever blocking the HTTP API.

Decision #2: Agora RTC rather than a home-grown WebRTC stack. Building your own TURN relays and video scalability would have cost weeks for a less reliable result. Agora handles quality and relaying; I focus on the product.

The hardest problem: billing live video per minute, in real time. After a two-minute free window, the backend deducts credits at a regular interval over the WebSocket server, checks the balance continuously, and ends the call the moment credits run out without ever double-charging. It's the core of the business model, and it ties together real time, credits, payments and payouts.

On money and trust: payments and payouts via Stripe, identity verification (KYC) via Stripe Identity, role-based access control (RBAC) and two-factor auth (2FA). Idempotency lives everywhere money moves a single event can never charge or pay twice.

The backend grew into a real platform: around twenty business domains (credits, payments, payouts, gifts, subscriptions, referrals, feed, Firebase push notifications, an FFmpeg/Sharp media pipeline, monitoring). All containerized (Docker) and documented (Swagger).

What I take away: split real time from the API from day one, make every money flow idempotent, and don't reinvent what a specialized service (Agora, Stripe) does better. The last word goes to the client: “Paul took an ambitious idea per-minute billed video streaming and turned it into a stable, scalable

A big shout-out to the people I built this with: Clavers on design, and Fresnel Aglossi, who led the back-office front-end app). No solid work is built alone.

See Emilia Cross The live projectDiscuss a project On LinkedIn
Share