Architecture

How FanArena works under the hood

A look at the core flows, rules engine, and the systems that move money, content, and trust between creators and supporters.

System context

Supporter

Subscribes, watches, buys

Creator

Publishes, sells, gets paid

Admin

Reviews, moderates, audits

FanArena Platform

Next.js · Supabase EU · Stripe Connect · Cloudflare R2/Stream

Stripe Connect
Cloudflare Stream
Supabase
Resend

Subscription lifecycle

From checkout to payout, including past-due handling and cancellation.

  1. 1

    Supporter clicks Subscribe

  2. 2

    Stripe Checkout session created

  3. 3

    Webhook: subscription.created

  4. 4

    Access granted via RLS

  5. 5

    Monthly renewal + payout split

Access rules engine

Postgres Row-Level Security policies enforce who can see what — at the database layer, not the app layer.

ResourceSupporterCreatorAdmin
posts (published)If active subOwn onlyAll
shop_itemsRead all activeOwn CRUDAll
payoutsOwn readApprove / view all
accreditationsOwn submitDecide
usersSelf read/updateSelf read/updateAll read · suspend

Content delivery & protection

tus resumable upload → R2 → Cloudflare Stream → HLS playback with signed URLs.

Uppy + tus

Resumable up to 2 GB

R2 / Stream

EU-region storage

Signed URLs

Time-limited access

HLS playback

No direct download