Case study · MegaEvolution · 2024 → now

Agency Order System

The largest subsystem of an influencer-marketing platform: a multi-tenant workspace where agencies, brands, creators and guests run campaign orders from proposal to payout. I was backend lead, built it from scratch, and built its React front end too.

Role
Full-stack engineer, backend lead
Scope
20 modules · 90+ procedures
Users
300 creators and brands
Period
Jan 2024 — now
Stack
TypeScript · Node.js · Express · tRPC · Prisma · PostgreSQL · Socket.IO · BullMQ/Redis · React · TanStack Query/Router · Panda CSS · Azure · Terraform

Architecture

Nx monorepo · TypeScript end to end

Clients

React web app
TanStack · Panda CSS · buyers, creators, admins
Guest access
scoped, no account

Application

tRPC API · 90+ procedures
auth · RBAC · step-up checks
orders
listings
finance
invoices
contracts
reporting

20 domain modules, each with its own state machine where it needs one

Data and services

PostgreSQL via Prisma
normalized schema
BullMQ + Redis
notifications · scheduling
Socket.IO
chat · unread counts
Payment gateways
behind one abstraction

Runs on Azure AKS · images in ACR · files in Blob Storage · watched by Azure Monitor · provisioned with Terraform · shipped by Azure DevOps pipelines

What I built

  1. Payments and invoicing

    Multi-stage pre and post-payment flows, payment holds, a gateway abstraction, creator invoices with PDF generation and payouts, and multi-currency pricing.

  2. Notifications engine

    One BullMQ queue feeding both the activity feed and email, deduplicated and scoped to buyer, creator, admin and guest, plus scheduled posting and reminders.

  3. Real-time chat and order lifecycle

    Live chat and 1:1 messaging on Socket.IO, with multi-participant sessions, unread counts, attachments and guest access, and the state machines behind proposals, revisions, licensing, delivery and late orders.

  4. React front end

    Built with TanStack Query/Router and Panda CSS: agency-order dashboards, calendars, invoice and contract pages, and buyer and guest views.

  5. Auth and security hardening

    Local, Google, Facebook and passkey login with account pre-hijacking defenses and step-up verification. Closed a SQL-injection exposure and moved raw SQL to Prisma.

  6. Admin panel

    Rosters, creator info, order oversight and moderation tooling for the operations team.

Also at MegaEvolution

AI video editor

A Node.js and TypeScript service that turns plain-language editing requests into finished videos. Each request goes to standard editing tools (blur, flip, subtitle and text removal, overlays) or to generative video models such as Runway, which keeps simple edits off costly model calls.

Results

−30%

Deploy time across environments after the CI/CD and Terraform rework

1.0

Launch hardening round led: spec audits, Vitest and Playwright coverage, concurrency fixes

90+

Type-safe tRPC procedures across 20 domain modules