Inspiration

Creators repeatedly tell us they don't understand how a view turns into money. The existing virtual items system feels a little opaque, and disputes are hard to resolve without a transparent record. We set out to rebuild TikTok-style profit sharing with explainability by default: every cent traceable, every split auditable, and fraud-resilient from day-one.

What it does

TikTokTrove is a transparent profit-sharing layer for short-form videos and post:

Split Engine: Model each monetizable post as a graph of creators. We compute payouts and profit-sharing for gifts.

Wallet & Gifting API: Endpoints for deposits (coins/diamonds style) and gifts—mocked safely for demo but API-faithful for real integration.

Dispute & Audit Trail: Append-only event log links every payout back to the exact inputs and rule versions, so disputes can be resolved with evidence—not guesswork.

How we built it

Architecture: OpenAPI-first microservices with a clean separation of concerns.

Split-engine (JavaScript/Node): deterministic split calculator + policy/rules interpreter.

wallet-service (ExpressJS): balances, transactions, holds, settlements, gifting.

audit-log: append-only event store for receipts & disputes.

web app (React + Vite): Creator dashboard (“TikTokTrove”).

Docker Compose for local dev; seed scripts for realistic test data.

Jest + Supertest end-to-end API tests, contract tests from the OpenAPI spec, and property tests for split determinism.

Hoppscotch/Postman collections for manual verification.

Challenges we ran into

Unit vs real money: Designing coin/diamond semantics that map cleanly to fiat without rounding drift across thousands of micro-events.

Fairness vs gaming: Preventing stake inflation (e.g., adding “phantom collaborators”) while keeping creator UX simple.

Explainers at scale: Making receipts readable to humans yet precise enough for audits.

Accomplishments that we're proud of

End-to-end demo: From a viewer sending a gift → to receipts → to creator balances & settlement, all visible in one UI.

Deterministic, explainable splits: Given the same inputs and rule version, the engine is bit-for-bit reproducible—key for trust and audits.

Dispute-ready: One click surfaces the full chain of evidence (event → rule → amount).

What we learned

Explainability is a feature, not a report. When we designed receipts first, many engine decisions (idempotency, and versioning) fell into place.

OpenAPI-first speeds teams. Controllers, mocks, tests, and docs stayed in sync—no brittle hand-coded stubs.

Fair = Transparent. Make sure that creators are aware and feel like they're entitled to their share of the value they've created.

What's next for TikTokTrove

Mobile-first UI & cross-platform: ship the dashboard to iOS/Android (and explore Lynx for native-feel from one codebase).

Creator-side rule proposals: let collaborators propose split edits with in-app e-signing and time-boxed acceptance.

Deeper AML/KYC: plug into provider APIs; add anomaly detection over gifting & refund patterns.

On-chain attestations (optional): publish merkle-root attestations of monthly receipts for public verifiability without exposing PII.

Live & Shopping expansions: unify ad, LIVE, and Shop commissions into one receipt model; add SKU-level attribution for affiliate links.

Public APIs & templates: package the wallet + split engine as a drop-in for creator tools, with sandbox keys and sample apps.

Built With

Share this project:

Updates