System architecture · v0.9

Four layers,
one ledger.

A clean separation between blockchain settlement, model aggregation, business logic, and presentation. Built so each layer can evolve independently — and so every transaction has a provable trail back to its origin.

Layer 3 · Application

User-facing surfaces

Next.js 14 · Tailwind
Creator Studio
6-step pipeline
Public Feed
Web + Mobile
Token Hub
Wallet · top-up
IP Library
Discover · mint
Admin Console
Ops · finance
Public API
REST · gRPC
Layer 2 · Business logic

Pure-function core (FC/IS architecture)

Rust · containerized
🎬 Production engine
  • · Script → shot list
  • · Model routing
  • · Variant scoring
  • · Timeline assembly
📺 Distribution
  • · Multi-platform push
  • · Subtitle gen
  • · CDN warming
  • · View tracking
🪙 Settlement
  • · Royalty calculation
  • · Split resolver
  • · Tx batcher
  • · Off-chain ledger
🐵 IP registry
  • · Lineage tracking
  • · License resolver
  • · Permission graph
  • · LoRA training
Layer 1 · Infrastructure

Aggregated services & storage

Cloud-native · multi-region
AI model aggregator
CLClaude Sonnet 4.6
IMImagen 2
SDSeedance 2.0
KLKling 2.1
ELElevenLabs v3
SUSuno v4
RXRIOS (in-house)
+15 more · weekly
Storage & data
  • · Object storageS3 / TOS · multi-region
  • · PostgreSQLNeon · read replicas
  • · Vector DBPgvector · embeddings
  • · Redis cacheSession · queues
  • · CDNCloudflare · global
  • · SearchMeilisearch
Layer 0 · Blockchain

Settlement & provenance

BIE Chain · Solidity
AI Token (AM)
  • · ERC-20 native
  • · Burn-on-use
  • · Auto-split routing
Work NFT
  • · ERC-721 per film
  • · Authorship recorded
  • · Lineage tracked
IP Registry
  • · Character licensing
  • · Royalty rules
  • · Territory scope
Smart Royalties
  • · Tips · PPV · ads
  • · Multi-party splits
  • · Real-time settle
BIE Mainnet · 2s block time · < 0.5 AM mint cost zk-EVM compatible
Data flow

From a sentence to a settlement.

01
Intent

Creator types a story prompt + attaches IP / style.

02
Direction

Claude parses → structured shot list (FC/IS schema).

03
Generation

Aggregator routes shots to Imagen / Seedance / RIOS in parallel.

04
Assembly

Timeline + audio + subtitles assembled. Preview rendered.

05
Mint

Hash + metadata committed to BIE Chain. NFT created.

06
Settlement

Tips · PPV · ads · remix → auto-split via smart contract.

Invariant · 1
Pure-function business core

All money-relevant logic (royalty splits, IP eligibility, mint readiness) is implemented as pure Rust functions. No DB, no IO, no surprise. Testable in isolation.

Invariant · 2
Schema validation at every boundary

AI agent outputs (Claude scripts, Imagen prompts) flow through schema validators before reaching DB or chain. L3.5 tool-choice schema constraint.

Invariant · 3
Idempotent settlement

Every payout includes a deterministic op-id. Retries are safe. Refunds & reconciliation are reproducible from chain state alone.

Tech stack · 2026

Strongly typed, conservatively chosen.

Frontend
  • FrameworkNext.js 14
  • LangTypeScript 5
  • StyleTailwind 4
  • Componentsshadcn/ui
  • StateZustand
  • Formsreact-hook-form
Backend
  • Core langRust (edition 2024)
  • Web frameworkAxum / Tower
  • ORMSQLx
  • QueueRedis · BullMQ
  • API styleREST + gRPC
  • ObservabilityOpenTelemetry
Chain
  • NetworkBIE Chain · L2
  • VMzk-EVM compatible
  • Contract langSolidity 0.8+
  • SDKViem · TypeScript
  • IndexerCustom Rust indexer
  • WalletPasskey + EOA
Infrastructure
  • HostingCloudflare · Vercel
  • DBNeon Postgres
  • Object storageS3 / TOS
  • CDNCloudflare global
  • CI/CDGitHub Actions
  • MonitoringGrafana · Sentry
Security & compliance

Built so no one needs to trust us.

Data sovereignty
  • China-resident option for CN-based creators
  • EU GDPR mode for European audience
  • Wallet-only identity (zero PII required)
  • Right to deletion · data export API
Content safety
  • Pre-publish CSAM & NSFW classifier
  • Provenance watermark (C2PA standard)
  • Voice + face consent verification
  • Human review queue for flagged content
Financial compliance
  • KYC tiered by withdrawal volume
  • AML monitoring · TRM Labs
  • Idempotent settlement (no double-pay)
  • Open ledger · auditable end-to-end