Skip to main content
Back to projects
Full-StackSecurityInfraConfidentialMVP backend built; frontend dashboards + testing next

SponsorHub

Performance-based creator marketing infrastructure with built-in financial accountability

Role: Sole Engineer & ArchitectPeriod: 2025 – Present

Confidentiality Note

Code is private during active development. This case study covers architecture, system invariants, and engineering decisions — not implementation details. Happy to walk through architecture and modules live.

I'm building the financial infrastructure that makes creator marketing trustworthy — escrow, attribution, verification, and payout in one system. Campaign funds are held in escrow, conversions are verified through platform-controlled mechanisms, and payouts are computed strictly from an immutable audit ledger.

Problem

The creator marketing space runs on trust and spreadsheets. Brands prepay with no guarantee of results. Creators deliver but have no leverage when payouts are disputed. Attribution is fragmented across third-party pixels and self-reported metrics. There's no single system that enforces financial accountability from dollar-in to dollar-out.

Solution

SponsorHub closes that gap by enforcing three properties end-to-end: campaigns cannot activate without confirmed escrow, conversions are verified through platform-controlled attribution before they count, and payouts are computed strictly from an immutable ledger. These aren't policies — they're system constraints enforced through guarded state transitions and server-side validation. No verification, no payout — enforced in code, not policy.

Architecture

SponsorHub Architecture — Request Flow/r redirectHMAC-signed/v verificationdedup + validateEvent Ledgerappend-onlyRollup JobsBullMQ + RedisStripe Connectidempotent payoutsState Machineguards + transitionsClerk RBACbrand / creator / adminDraft → Funded → Live → Completed → Paid OutEach transition requires explicit preconditions
  • Designed and implemented campaign lifecycle management with guarded state transitions that enforce funding and verification preconditions before activation
  • Built a tamper-evident attribution system where every tracked interaction is signed and validated server-side before recording
  • Implemented an immutable event ledger for conversion tracking — all corrections happen through reversible adjustments, never mutations
  • Integrated Stripe Connect for escrow and disbursement with idempotent payout processing and retry safety
  • Architected async worker pipelines for ledger rollups and payout computation, decoupled from the request path
  • Enforced role-based access control across brand, creator, and admin boundaries

Security & Reliability

  • Signed, tamper-evident attribution artifacts validated before ledger entry
  • Replay and duplicate protection on all conversion events
  • Immutable audit ledger with reversible adjustments — no silent edits
  • Idempotent payment operations with retry safety across all disbursement flows
  • Role-gated access enforced at every boundary
  • Minimal PII exposure — sensitive identifiers hashed at rest
  • Budget cap enforcement at the rollup layer
  • Property-based validation on state transitions — no illegal lifecycle jumps

Design Tradeoffs

  • Auditability vs. flexibility — chose an immutable ledger with reversible adjustments over mutable records. Corrections are more complex to implement but guarantee a complete, tamper-evident audit trail critical for financial disputes.
  • Fraud prevention vs. user friction — server-side attribution verification adds latency to conversion recording but eliminates an entire class of self-report fraud. Prioritized correctness over speed in the verification path.
  • Payout correctness vs. latency — payouts are computed from async ledger rollups rather than real-time totals. This introduces a processing delay but ensures every payout is backed by verified, deduplicated events — no double-counts, no race conditions.

Results

  • MVP backend complete — lifecycle enforcement, immutable ledger, and payout pipeline operational
  • Stripe Connect escrow + disbursement integration deployed with idempotent processing
  • Fraud and risk scoring pipeline architected for conversion validation
  • Frontend dashboards and integration testing in progress

Tech Stack

Next.js (App Router)TypeScriptPostgreSQLPrismaBullMQRedisStripe ConnectClerk RBACVercel