Yash Gupta

Nine systems I shipped on Vyro.

Vyro is the creator campaign platform at MrBeast. Brands fund campaigns, creators post and clip content across TikTok, YouTube and Instagram, and the platform tracks views, verifies posts and pays creators. It went from launch to a million users and millions of dollars paid to creators in under ten months, and it is still growing.

I work across the whole stack and the production infrastructure. Each case below gives the design, the problems I traced to root cause, and the numbers that proved the fix.

Visit vyro.com

NestJS and TypeScript, MongoDB, Redis, RabbitMQ consumers, a shared TypeScript SDK, React with TanStack Router and Vite, Kubernetes on AWS EKS with Helm and ArgoCD, Grafana, Loki, Prometheus, Sentry.

The Vyro home page: Never leave the For You feed. Turn your content into thousands of posts.

Agency partnerships

An agency manages several client brands from one workspace: it funds campaigns from an agency wallet, pays on a brand's behalf, sees cross-client reports and signs contracts for the brand.

13,500API tests passing on the release branch

Design

  • A partnership collection links an agency workspace to brand workspaces with Owner, Campaign Manager and Member roles.
  • In design review I found the complexity hiding in one inclusion list that carried four stacked decisions. I replaced it with an exclusion list and removed a link cache, which cut a whole class of invalidation bugs.
  • Payer attribution goes through one service, so financial visibility is keyed to the paying agency in one place.
  • Contract terms are a versioned enum in the shared SDK. A legal change is an enum bump, and every signer is re-prompted automatically.

Hard problems

  • Agency owners could not sign contracts. A billing-profile filter stripped data from any seat without a financial permission, and the agency role had none. A recorded end-to-end walkthrough caught it before customers did.
  • Contracts voided on every autosave. The compaction step dropped an empty array, the API shallow-merged the object, and a void hook fired on each save. I found it from the audit diff during demo prep.
  • I shipped a hardening fix to master without the unfinished feature on the same stacked branch, using a merge-base parent plus a merge -s ours commit so the diff showed only the right delta.

Verification

A 39-case multi-tenant QA pass with two agencies sharing one brand found 12 issues, all fixed before launch. 115 live test cases and 49 of 49 e2e tests. Rolled out behind a feature flag, then enabled for everyone in November 2026.

Collab campaigns

Fixed-fee creator deals. A brand invites specific creators to specific deliverables, reviews drafts, and pays one fee per offer after a 14-day hold.

0 bugsat the final gate

Design

  • Built as a campaign type, not a separate module, so it reuses the existing campaign lifecycle.
  • Offers own the lifecycle. Submissions own the work: each draft round, the review, the posted link and the hold.
  • Accepting an offer is one MongoDB transaction: offer, membership, submission and a pending payment.
  • Every cascade (a ban, an account deletion, a social disconnect) goes through a single cancel method, so the state machine stays consistent no matter who triggers it.
  • Resubmitting the same URL restores the existing clip with an audit row instead of creating a duplicate.

What I changed about how I work

The first data model was rejected by the tech leads after three shapes in three weeks. I changed the process: a one-page architecture brief with the data model and endpoints, rendered as a live diagram from one spec file, signed off before any code.

Verification

The approved backend landed as 127 commits with 1,027 unit suites, 73 of 73 e2e tests and 101 live cases. Along the way I fixed a Jest worker segfault on Node 24 under parallel load with bounded workers and an idle-memory limit.

Privacy pipeline

Account deletion and data access requests in the style of GDPR and CCPA. A privacy vendor owns consent and identity checks, and Vyro implements erase and export behind a webhook.

1 secondto erase an account, as a hard delete

Design

  • Erase is a fixed sequence of account-deletion events, one listener per module, with errors surfaced. No silent failures and no chained emitters.
  • Banned users are kept only as SHA-256 hashes, so a ban survives erasure without storing the email.
  • Accounts tied to money, or owning a workspace with members, are denied with a reason until the blocker is resolved.
  • The export is one Excel workbook built on demand and served through a signed 45-day download token.
  • A recovery job retries stuck requests and emits a log line that alerting watches.

Root causes

  • Every request returned "no match". The browser sent a vendor cookie UUID, and the resolver treated any non-ObjectId as final instead of falling back to email.
  • Deletion from settings returned 503 because the vendor required first and last names, which a share of accounts did not have. I added a safe fallback chain.
  • Denials never reached users because the vendor only treats "completed" as final. I added outcome variables and a Denied branch in the vendor workflow.

A leak inside a framework

The notification service, self-hosted Novu on Kubernetes, was crash-looping, dropping notifications and returning 502s.

1,217 to 278 MBheap after 37,000 renders

Root cause, confirmed from source

The framework's validator is a module-level singleton whose compiled-schema cache is keyed by object identity. The bridge refetches the workflow on every render and deep-copies it, so every render hands in a new schema object, misses the cache, compiles and is retained forever. That is about 10 KiB per render, or about 2.4 GB per pod during one large campaign fan-out.

Proof

Patching the validator to a hash-keyed, bounded LRU held the heap at 278 MB after 37,000 renders, against 1,217 MB unpatched. One cache entry instead of 20,545. The patch had to go into three copies of the validator inside the image, and only one of them actually executes.

Found in the same investigation

  • Cache snapshots wrote a new file every five minutes and never pruned, filling both volumes to 99 percent. A static dump name took usage to 0.8 percent.
  • One log line dumped a 4 KB job document on every job and was most of the cluster's log volume.
  • Worker concurrency caps, a recycle job with probes, and a disruption budget after node rollovers evicted every pod at once.

On-call and an AI incident agent

The paging layer for production alerts, and an agent that investigates each one before a human opens a laptop.

66 secondsfrom alert to a classified finding

Paging

  • Alerts route by severity. Critical ones page by call, SMS and push. Warnings go to a quiet channel after a 30-minute delay, so self-resolving alerts never wake anyone.
  • I cut over 51 alert rules with no per-rule rewiring by adding the pager as a second integration on the existing contact point.
  • A 5-minute self-resolve wait raced the 5-minute resolve interval. I raised it to 6 minutes after the drill.

The agent

A workflow starts a Claude agent session on each alert. The agent investigates with metrics, logs and error tracking, and posts a classified finding to the incident timeline. The receiver sits outside the cluster on purpose: the thing that reports outages has to survive them.

Alerts that catch silent bugs

  • A bot-traffic rule keyed by IP and user, where a keep-firing window cut replay alerts from 37 to 2.
  • A completion-ratio rule for social sign-in. It caught an OAuth consent outage that produced no error anywhere, because users never got back to the app.
  • An onboarding rule whose tuning uncovered a real bug: a double "next step" call that skipped a screen.

Frontend reliability

The frontends had no usable stack traces, and one reload loop was most of the error volume.

1,800 to 0errors a day from one reload loop

Root causes

  • The build config omitted two env vars, so the Sentry Vite plugin never ran in CI. No source maps, no debug IDs, and two apps sent nothing at all. A wrapper in a shared package had hidden it for months.
  • The reload loop: a deploy deleted old chunks, index.html was cached, and a preventDefault on vite:preloadError let imports resolve to undefined.
  • A WebKit-only crash, patched at the prototype after I found that WebKit garbage-collects an instance-level patch.

Result

Total frontend error volume fell from 316 to 134 events a day within 24 hours of the first batch.

Video watermarking in the browser

Paid content needs a burned-in disclosure. The server-side design stalled for weeks on CPU cost. In build.

5 to 11 sagainst 228 to 391 s with ffmpeg.wasm

The spike

Browser WebCodecs watermarked a 60-second 1080p clip in 5 to 11 seconds, and 4K in 9 to 17. ffmpeg.wasm took 228 to 391 seconds, and its multi-threaded build hung. An iPhone test passed in 11.7 seconds with no memory crash.

Production fit

The server-side version would have been OOM-killed: a 4K render needed about 1.2 GB inside a shared consumer with a 1.8 GiB limit that already peaked at 1.5 GB.

Decision

Go client-side. Usage data showed 96.5 percent of Android sessions can encode H.264. Detect HDR at file pick, warn, and track how many users hit it.

Referral fraud review

Admin tooling to hold, dismiss or confirm suspicious referral rewards before payout.

36 hoursbefore a stale flag falls off

Design

  • One scanner writes findings and the release screen reads them. Findings stay open for 36 hours after the scan last saw them.
  • No automatic holds or bans. The system explains, and humans decide.
  • Unexplained red badges became plain-language reasons. The SDK type had dropped the metadata.
  • A link finding reads IP and device overlap from live sessions at scan time and stores only IDs and counts.

CRM sync rebuild

The first version resent about 9,900 records every hour and had wrong numbers.

151 dealssynced at rollout with zero failures

Design

An hourly change-only job. A hash of the synced values lives in a hidden attribute on each CRM record, so there is no extra database state and only changed rows are written, within the CRM's limit of 25 writes a second.