NovaReelOS Master Spec
The complete technical blueprint for the world's first creator-owned operating system. 20 sections covering architecture, monetization, safety, infrastructure, governance, and growth.
Introduction
Vision
Build the world's first creator-owned operating system for short-form content. NovaReelOS is not another social app—it is the infrastructure layer that unifies creation, distribution, monetization, and analytics into a single composable platform. Where existing networks treat creators as content suppliers, NovaReelOS treats them as first-class stakeholders with transparent economics, portable data, and granular control over every aspect of their digital presence.
Mission
Eliminate the gap between creative output and economic return. Every view, like, share, and purchase flows through a transparent revenue pipeline where creators know exactly what they earn and why. No opaque algorithms suppressing reach. No hidden fees siphoning revenue. No platform lock-in trapping years of work behind a terms-of-service wall.
Creator-First Philosophy
Every architectural decision privileges the creator. The 45/55 revenue split is hardcoded into services/monetization.js—not stored in a config table, not adjustable by product managers, not negotiable in enterprise deals. Creator data is portable via GDPR-compliant export endpoints. Safety controls are granular down to individual post permissions. The Creator Bill of Rights is immutable and governs every feature shipped to production.
Creators own their audience graph, control who can download or repost their content, set per-surface pricing for brand deals, and receive real-time earnings breakdowns across all five monetization surfaces.
Market & Problem
Creator Economy Pain Points
Today's dominant platforms extract maximum value from creators while returning minimum transparency. The result is a broken economic loop.
- Opaque Algorithms — Creators cannot see why their content is promoted or suppressed. Reach is unpredictable, making revenue forecasting impossible.
- Unpredictable Income — Revenue shares change without notice. Creator funds are withheld for weeks. Payout thresholds create artificial delays.
- No Data Portability — Audience relationships, content archives, and engagement history are locked inside each platform with no export path.
- Platform Lock-In — Years of content and community building become leverage for the platform, not the creator.
- Brand Deal Friction — Negotiating sponsorships is manual, undiscoverable, and lacks standardized pricing or attribution.
Brand Pain Points
- Fragmented Creator Landscape — Brands must search across multiple platforms, agencies, and marketplaces to find the right creators.
- Difficult Attribution — Connecting ad spend to creator-driven conversions requires stitching together incompatible analytics systems.
- No Unified Ad Auction — Each platform runs its own ad system with different rules, formats, and measurement standards.
- Manual Deal-Making — Brand-creator partnerships rely on email chains, spreadsheets, and handshake agreements with no structured workflow.
Market Opportunity
The creator economy is valued at $250B+ by 2027. Short-form video is the dominant content format across every demographic. Yet no platform gives creators both the tools to create and the economics to thrive. NovaReelOS fills that gap by treating monetization as a core system service, not an afterthought bolted onto a social feed.
| Feature | TikTok | YouTube Shorts | Instagram Reels | NovaReelOS |
|---|---|---|---|---|
| Revenue Split | Opaque fund | 45% RPM-based | Bonuses only | 45% hardcoded |
| Data Portability | Limited export | Takeout (raw) | None | Full GDPR export |
| Brand Marketplace | Creator Marketplace | BrandConnect | Branded Content | Integrated + API |
| Ad Auction | Platform-controlled | Google Ads | Meta Ads | Open Ad Engine |
| Creator Safety | Basic controls | Comment filters | Restrict mode | Granular per-post |
Product Overview
Five Core Surfaces
NovaReelOS organizes all creator activity into five independent surfaces, each with its own content format, discovery logic, and monetization engine. Surfaces can be composed together (e.g., a LIVE session promoting a Shop product) but each operates as a standalone revenue channel.
OS Framing
NovaReelOS is layered like an operating system. Each layer has a clear responsibility boundary and communicates with adjacent layers through defined interfaces.
- Hardware Layer — Infrastructure: Render compute, Neon PostgreSQL, Polsia R2 object storage, CDN edge delivery.
- Kernel Layer — Data and auth: PostgreSQL schema, session management, magic link authentication, creator tokens, GDPR compliance.
- Services Layer — Monetization Engine, Ad Sales Engine, Brand Marketplace, Safety & Trust, Analytics, Push Notifications.
- Applications Layer — The five surfaces: Video Feed, Posts, Music, Shop, LIVE—each implemented as independent route groups.
- Shell Layer — Creator Dashboard, Brand Portal, Admin Pipeline, Onboarding Widget, Support Center.
Core Modules
| Module | Responsibility | Key Files |
|---|---|---|
| Content Engine | CRUD for posts, drafts, scheduling, permissions, pinning | db/posts.js |
| Discovery | Creator profiles, follow graph, search, niche filtering | db/creators.js |
| Monetization | 45/55 split calculation, revenue events, payout logic | services/monetization.js |
| Ad Sales Engine | Programmatic ad auction, targeting, brand safety | routes/ad-engine-docs.js |
| Brand Marketplace | Campaigns, offers, applications, creator rates | db/brand-marketplace.js |
| Safety & Trust | Content controls, DMCA, reporting, LIVE moderation | db/legal.js |
| Analytics | Pipeline metrics, creator performance, ROI dashboards | db/analytics.js |
| Creator Tools | Onboarding, a11y settings, support tickets, push | db/support.js |
System Architecture
Technology Stack
NovaReelOS is a server-rendered monolith built for speed and simplicity. No client-side framework, no build step, no hydration overhead. Pages render in milliseconds via EJS templates and ship as progressively-enhanced HTML with targeted JavaScript for interactive components.
System Layers
┌─────────────────────────────────────────────────┐ │ Shell Layer — Creator Dashboard, Brand Portal │ ├─────────────────────────────────────────────────┤ │ Application Layer — Feed, Shop, LIVE, Music │ ├─────────────────────────────────────────────────┤ │ Service Layer — Monetization, Ads, Safety │ ├─────────────────────────────────────────────────┤ │ Data Layer — PostgreSQL, R2 Storage, Events │ ├─────────────────────────────────────────────────┤ │ Infrastructure — Render, Neon, Polsia Proxy │ └─────────────────────────────────────────────────┘
Event-Driven Revenue Pipeline
All monetization events flow through the revenue_events table, which serves as a unified event bus. Every creator action that generates revenue—an ad impression, a gift during LIVE, a shop sale, a brand deal completion—is recorded as an immutable event with pre-calculated creator and platform shares.
Creator Action ──► Event Dispatch ──► Revenue Split (45/55) ──► Creator Wallet
│ │ │ │
[post/live/ [revenue_events [services/ [dashboard/
shop/music] INSERT] monetization.js] monetization]
Directory Structure
// NovaReelOS codebase layout server.js // Entry point — middleware + route mounting db/ // Database layer index.js // Shared PostgreSQL pool (single Pool instance) posts.js // Content CRUD — create, feed, drafts, permissions creators.js // Profile, follow graph, verification monetization.js // Revenue event recording + queries routes/ // Express route groups (one Router per file) services/ // Business logic services monetization.js // 45/55 split engine (source of truth) views/ // EJS templates public/ // Static assets (CSS, JS, images) migrations/ // DDL migration scripts (.js only)
Monetization Engine
The 45/55 Model
The revenue split is the economic constitution of NovaReelOS. It is not a configuration value—it is a hardcoded constant in services/monetization.js, the single source of truth for all revenue calculations across the platform.
// services/monetization.js — immutable revenue split const CREATOR_SHARE = 0.45; // 45% to creator const PLATFORM_SHARE = 0.55; // 55% to platform function calculateRevenueSplit(grossAmount) { return { gross: grossAmount, creator: grossAmount * CREATOR_SHARE, platform: grossAmount * PLATFORM_SHARE }; }
Revenue Split Visualization
Surface Monetization Engines
| Surface | Revenue Source | Event Type | Creator Share |
|---|---|---|---|
| Video | In-feed ads, pre-roll, mid-roll | ad_impression, ad_click | 45% |
| Posts | Engagement-based revenue, sponsored posts | post_engagement, sponsored_view | 45% |
| Music | Stream royalties, sound licensing | stream, license_purchase | 45% |
| Shop | Product sales, affiliate commissions | sale, affiliate_click | 45% |
| LIVE | Virtual gifts, LIVE ads, subscriptions | gift, live_ad, subscription | 45% |
Payout Logic
Revenue flows through a deterministic pipeline: gross revenue enters the system, the 45/55 split is applied, the creator share is allocated to their wallet, and the platform share covers infrastructure, moderation, and operating costs.
Gross Revenue ──► calculateRevenueSplit() ──► creator_amount (45%)
$100.00 │ $45.00
└──► platform_amount (55%)
$55.00
Revenue Events Table
Every monetization event is stored as an immutable row in revenue_events. This table is the audit trail for all money flowing through the platform.
-- revenue_events schema CREATE TABLE revenue_events ( id SERIAL PRIMARY KEY, creator_id INTEGER REFERENCES creator_profiles(id), surface TEXT NOT NULL, -- video|posts|music|shop|live event_type TEXT NOT NULL, -- ad_impression, gift, sale... gross_amount NUMERIC(12,2), creator_amount NUMERIC(12,2), -- gross * 0.45 platform_amount NUMERIC(12,2), -- gross * 0.55 metadata JSONB DEFAULT '{}', created_at TIMESTAMPTZ DEFAULT NOW() );
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/monetization/config | Returns current split config (CREATOR_SHARE, PLATFORM_SHARE) |
| POST | /api/monetization/calculate | Calculate split for a given gross amount and surface |
| POST | /api/monetization/event | Record a monetization event (writes to revenue_events) |
| GET | /api/monetization/earnings | Creator earnings summary by surface and time range |
| GET | /api/monetization/platform | Platform-wide revenue summary (admin only) |
| POST | /api/monetization/brand-deal | Process brand deal payout through the 45/55 split |
Example Revenue Calculation
| Metric | Video Ad | LIVE Gift | Shop Sale | Brand Deal |
|---|---|---|---|---|
| Gross Revenue | $200.00 | $50.00 | $500.00 | $2,000.00 |
| Creator Share (45%) | $90.00 | $22.50 | $225.00 | $900.00 |
| Platform Share (55%) | $110.00 | $27.50 | $275.00 | $1,100.00 |
| Creator Net Payout | $90.00 | $22.50 | $225.00 | $900.00 |
Ads Platform
The NovaReelOS Ads Platform is a full-stack programmatic advertising engine built to serve ads natively across every surface — video feed, LIVE streams, creator shops, and music discovery. All ad revenue flows through the unified 45/55 monetization engine, ensuring creators earn on every impression delivered against their content.
Auction Engine
Ad placement is determined by a second-price auction (Vickrey auction). Advertisers submit sealed bids per impression opportunity. The highest bidder wins but pays the second-highest bid price plus one cent, incentivizing truthful bidding and fair pricing.
Delivery Engine
Once an auction is won, the delivery engine manages pacing, frequency, and budget constraints to ensure campaigns spend evenly and viewers are not over-saturated.
| Control | Default | Description |
|---|---|---|
| Frequency Cap | 3 / 24h per user | Max impressions of same creative per viewer in a rolling window |
| Budget Pacing | Even delivery | Daily budget distributed evenly across active hours |
| Budget Cap | Per campaign | Hard stop when budget_total or budget_daily is exhausted |
| Dayparting | All hours | Optional hour-of-day restrictions for time-sensitive campaigns |
Targeting
- Audience Segments — age, gender, language inferred from profile and engagement signals
- Interest-Based — derived from consumption patterns: music, fashion, food, gaming, fitness, tech
- Geographic — country, region, metro-level via IP geolocation and profile location
- Device — mobile vs. desktop, OS family (iOS/Android/Web), screen size buckets
- Content-Type — align ads to creator niche and content_type for contextual relevance
Brand Safety
- Content Category Exclusions — advertisers block categories (politics, adult, gambling) at campaign level
- Creator Verification Gates — only Verified creators (is_verified = true) eligible for premium ad tiers
- Advertiser Blocklists — creators exclude brands/industries via marketplace_settings.excluded_brands
Ad Formats
| Format | Surface | Duration / Placement |
|---|---|---|
| Pre-Roll Video | Video Feed | 5-15s non-skippable before creator content |
| In-Feed Native | For You Feed | Full-screen card styled as organic, labeled "Sponsored" |
| LIVE Ad Break | LIVE Studio | 15-30s mid-stream insertion, creator-initiated or scheduled |
| Shop Product Boost | Shop / Feed | Promoted product card pinned to top of search/feed |
| Music Sponsorship | Music Discovery | Branded sound placement in trending sounds carousel |
Ad Delivery Flow
Brand Marketplace
The Brand Marketplace is a two-sided platform connecting brands with creators for sponsored content deals. Brands create campaigns with defined goals, budgets, and surface requirements. Creators discover campaigns, submit applications, or receive direct offers. All payments flow through the 45/55 monetization engine with full FTC disclosure tracking.
Campaign Lifecycle
Creator Matching Algorithm
When a brand creates a campaign, the platform scores eligible creators using a weighted composite of five signals to produce a ranked match list.
| Signal | Weight | Source |
|---|---|---|
| Niche Alignment | 30% | creator_profiles.niche vs. campaign targeting |
| Follower Count | 20% | creator_profiles.follower_count tier brackets |
| Engagement Rate | 25% | Likes / views ratio from posts aggregate |
| Content Type Fit | 15% | creator_profiles.content_type vs. campaign surfaces |
| Brand Safety Score | 10% | Verification status, content flags, community standing |
Pricing Model
Creators set their own rates per surface via the creator_rates table. Each row stores a creator_id, surface (video, short, campaign, series, event), and price. Brands propose a proposed_pay on each offer. If below the creator's rate, negotiation happens via the DM thread auto-created by the hire_requests system.
Campaign Analytics
- Campaign Performance — impressions, clicks, conversions, and cost-per-action per campaign
- Creator ROI — return on spend per creator, engagement generated vs. amount paid
- Spend Efficiency — budget utilization, CPM, cost-per-engagement metrics
- Audience Reach — unique viewers, demographic breakdown, geographic distribution
Data Model
| Table | Purpose | Key Columns |
|---|---|---|
| brand_campaigns | Campaign definitions | title, goal, surfaces[], budget_total, budget_daily, targeting JSONB, status |
| brand_offers | Brand-to-creator offers | campaign_id, creator_id, proposed_pay, ftc_disclosed, status |
| creator_rates | Per-surface pricing | creator_id, surface, price (unique per creator+surface) |
| marketplace_applications | Creator applications | creator_id, campaign_id, pitch, proposed_rate, status |
| hire_requests | Direct hire + DM thread | business_id, creator_id, project_type, budget_range, status |
Creator Dashboard
The Creator Dashboard is the command center for every creator on NovaReelOS. It surfaces real-time earnings, content analytics, growth tools, and profile management in a single unified interface. Server-rendered with EJS, it pulls data from db/monetization.js, db/posts.js, and db/creators.js.
Earnings View
Revenue is displayed in real time across all monetizable surfaces. The earnings card shows gross revenue, the 45/55 split breakdown, and a payout preview sourced from the revenue_events table via getRevenueSummaryByCreator.
Analytics
- View Counts — total and per-post views from posts.view_count
- Likes — aggregate like count from posts.like_count and content_likes
- Follower Growth — net new followers over time from follows table timestamps
- Engagement Rate — rolling average of (likes + comments) / views as a trend line
Growth Tools
Content Scheduling
Creators set posts.scheduled_for to a future timestamp. The jobs/scheduled-publish.js cron finds posts with status = 'scheduled' and scheduled_for <= NOW(), transitioning them to 'published'.
TikTok Import
Creators paste a TikTok URL to import content. services/tiktok-download.js fetches the video, uploads to Polsia R2, and creates a post with source_tiktok_url for attribution.
Draft Management
Posts with status = 'draft' are visible only to the owner. Managed via getDraftsByCreator, publishPost, and updatePost.
Profile Management
Creators manage their public identity through creator_profiles: handle, name, bio, avatar, banner, niche, and content type. The Verified badge (is_verified) is toggled by admins via /admin/pipeline and renders as a cyan checkmark.
Onboarding Widget
| Step | Key | Action |
|---|---|---|
| 1 | profile | Complete bio, avatar, and handle |
| 2 | first_post | Publish or schedule first video post |
| 3 | permissions | Configure content permissions (download, repost, credit) |
| 4 | discover | Follow at least 3 creators from the discover page |
| 5 | profile_review | Review and finalize public profile for launch |
Content Permissions
Each post carries six permission flags controlling interaction. Defaults are privacy-protective: downloads and reposts off, credit required, commercial use blocked.
Push Notifications
PWA web push via push_subscriptions. Notifications fire for new DMs, hire requests, post likes, and follower milestones. Stored per-creator per-endpoint with p256dh and auth keys for VAPID delivery.
LIVE Studio
The LIVE Studio powers real-time streaming on NovaReelOS. Creators start sessions, invite multi-guest panels, run interactive polls and goals, insert ad breaks, and overlay customizable stream widgets — all managed through db/live-tools.js and persisted in Neon PostgreSQL.
Streaming Sessions
A creator starts a LIVE session by inserting into live_sessions with a title and status = 'active'. The slow_mode_interval (seconds; 0 = disabled) throttles chat during high traffic. Ending sets ended_at and transitions status to 'ended'.
Multi-Guest
Each session supports up to 4 concurrent guests in live_guests. Guests have roles (guest or cohost) and progress through: pending (invited) -> approved (on-screen) -> removed (kicked). Hosts toggle mic_muted and camera_off per guest.
| Field | Type | Description |
|---|---|---|
| session_id | FK | Reference to active live_sessions row |
| guest_name | TEXT | Display name shown in LIVE overlay |
| role | ENUM | guest (viewer promoted) or cohost (pre-invited) |
| status | ENUM | pending / approved / removed |
| mic_muted | BOOL | Host-controlled mute toggle |
| camera_off | BOOL | Host-controlled camera disable |
Polls
Hosts launch real-time text polls via live_polls. Each poll has a question, JSONB options array, and optional duration_seconds timer. One vote per viewer per poll is enforced by unique constraint on voter_id + poll_id in live_poll_votes. Status transitions from active to ended on timer expiry or manual close.
Goals
Creators set engagement goals using live_goals. Four types: followers, likes, gifts, and watch_time. Each tracks target_value vs. current_value with status active or completed. Progress renders via the goal widget overlay.
Ad Breaks
Hosts trigger 15-30 second ad insertions served via the Ads Platform auction engine (Section 06). Revenue flows through the 45/55 split as a revenue_event with surface = 'live'. Earnings appear in the creator dashboard within seconds.
Widget Overlays
Stream widgets are visual overlays stored in stream_widgets with positioning (position_x, position_y, width, height, z_index) and visibility toggle.
| Widget Type | Purpose | Config (JSONB) |
|---|---|---|
| ranking | Top gifters/engagers leaderboard | limit, time_window, display_style |
| countdown | Timed event countdown | target_time, label, format |
| follower-goal | Follower milestone progress bar | target_count, current_count, color |
| gift-goal | Gift revenue target tracker | target_amount, current_amount, currency |
| chat-overlay | Floating chat messages on stream | max_messages, font_size, opacity |
| alert-box | New follower/gift/sub alerts | alert_types, animation, duration_ms |
Creators save frequently-used configurations as reusable widget_templates (scoped per creator_id), loadable into any new session with a single click.
LIVE Shopping
Creators showcase products from their storefront with a click-to-buy overlay during LIVE. Viewers see product cards pinned to the stream with name, price, and purchase CTA. Revenue flows through 45/55 with surface = 'live_shop'.
Shop & Commerce
Shop & Commerce transforms every creator profile into a storefront. Creators list physical merchandise, digital products, and exclusive content for sale directly within NovaReelOS. All transactions flow through the unified 45/55 revenue split — creators keep 45% of every sale, platform retains 55% for payment processing, hosting, and fulfillment.
Product Listings
- Physical Goods — merchandise (apparel, accessories, prints) with shipping address collection and tracking integration
- Digital Products — downloadable content (presets, tutorials, templates, exclusive videos) with instant delivery via signed R2 URLs
In-Feed Shopping
Products tagged in video posts enable native purchase flow without leaving the feed. Tapping a tag opens a bottom-sheet with product card (name, price, "Buy Now" CTA). Purchases are attributed to the specific post for per-content sales tracking.
Conversion Tracking
Full-funnel attribution from impression to purchase, with each step logged for analytics:
| Funnel Stage | Event | Tracked In |
|---|---|---|
| View | Product card displayed in feed or storefront | Impression log |
| Click | Viewer opens product sheet or storefront | Click event |
| Add to Cart | Viewer adds product to checkout queue | Cart event |
| Purchase | Payment completed, order confirmed | revenue_events |
Boost System
The Shop surface integrates with the Ads Platform (Section 06) for paid promotion:
- Creator-Paid Boost — creator spends from earnings balance to promote their product higher in feed and search
- Brand-Sponsored Boost — brand pays to promote a creator's product as part of a marketplace campaign via the standard ad auction
Boosted products are labeled Promoted and subject to the same frequency capping and brand safety rules as all ad formats.
Revenue Model
All shop transactions are recorded as revenue_events with surface = 'shop'. The services/monetization.js engine calculates the split:
Creator Storefront
Each creator's shop is a dedicated profile tab with a curated product grid, featured items, and category filters. Creators pin up to 3 featured products (mirroring the is_pinned + pinned_order pattern from posts). The storefront URL is shareable externally, driving traffic from other platforms into the NovaReelOS commerce funnel.
Music Monetization
Music is a first-class monetization surface in NovaReelOS. Creators upload original tracks, build playlists, and earn revenue through streaming plays and audio ad impressions -- all flowing through the unified 45/55 revenue split. The music surface sits alongside video, LIVE, and shop as a standalone earning channel within the platform.
Track Uploads & Catalog
Creators upload audio files (MP3, AAC, WAV) through the media API. Each track is stored on Polsia R2 and associated with the creator's profile. Track metadata includes title, genre, duration, cover art, and an optional link back to the creator's video content. Tracks appear in the music feed surface, discoverable via search, genre browsing, and algorithmic recommendation.
- Upload pipeline: Audio file → R2 storage → metadata record → feed indexing
- Supported formats: MP3 (up to 20MB), AAC, WAV (up to 60MB)
- Metadata fields: title, artist, genre, duration, cover_url, bpm, key, mood tags
- Visibility: Public by default; creators can set tracks to unlisted or follower-only
Playlists
Three playlist types drive music discovery and engagement:
- Creator-curated: Manually assembled by creators; pinned to profile, shareable
- Algorithmic: Generated from listening history, genre affinity, and trending signals
- Sponsored: Brand-funded playlists featuring curated tracks with sponsored interstitials
Ad Monetization
Audio ads are inserted between tracks in non-premium listening sessions. Sponsored playlists carry branded audio bumpers at the start and midpoint. All ad impressions are tracked as revenue events and routed through the monetization engine.
Licensing & Rights
Tracks uploaded to NovaReelOS are available for use in video posts by other creators, with automatic attribution tracking. When a track is used in a video, the original artist receives a share of the video's ad revenue proportional to usage. Rights management follows a simple model:
- Ownership: Creator retains full ownership of all uploaded music
- Platform license: Non-exclusive license for in-app playback and video sync
- Attribution: Automatic credit link to original artist on every video using the track
- Commercial use: Opt-in flag; brands must negotiate separate licensing for ads
Revenue Flow
Stream Play / Ad Impression
↓
revenue_events(surface='music', event_type='stream' | 'audio_ad')
↓
calculateRevenueSplit(gross_amount)
↓
creator_amount = gross × 0.45 platform_amount = gross × 0.55
↓ ↓
Creator Payout Queue Platform Revenue
Safety & Trust
Safety is foundational to NovaReelOS. The platform provides comprehensive tools for content moderation, creator protection, privacy compliance, and legal obligations. The Safety Center at /safety-center serves as the unified hub for all safety controls.
Safety Center
Six control cards give creators and moderators immediate access to safety features:
| Card | Controls |
|---|---|
| Content Controls | Post visibility, comment filtering, audience restrictions |
| Moderation Tools | Keyword blocklists, auto-hide thresholds, manual review queue |
| Privacy & Data | Profile visibility, data download, account deletion request |
| Reporting & Appeals | 6-step report flow, appeal status tracker, resolution history |
| LIVE Safety | Slow mode, guest approval, real-time moderation, emergency kill |
| Creator Wellbeing | Screen time reminders, notification quieting, break prompts |
Moderation Pipeline
Content Upload / Comment / Message
↓
Automated Scanning (keyword filter + hash matching)
↓
⌊ PASS ⌋ ⌊ FLAG ⌋ ⌊ BLOCK ⌋
Published Manual Review Queue Rejected + Notify
↓
Moderator Decision
↓ ↓
Approve Remove + Strike
↓
Appeal Process (72h window)
Privacy Controls
Per-post permissions give creators fine-grained control over content distribution:
- allow_download Gate download button (default: off)
- allow_repost Allow repost to other profiles (default: off)
- allow_external_share Show share-to-external button (default: on)
- require_credit Require attribution on reposts (default: on)
- allow_noncommercial Permit non-commercial reuse (default: on)
- allow_commercial Permit commercial reuse (default: off)
GDPR & DMCA Compliance
Full compliance with GDPR and DMCA is tracked through dedicated database tables and the compliance_audit_log. All moderation actions, data requests, and legal decisions are recorded immutably for audit.
- GDPR requests: access, erasure, portability, rectification, restrict -- stored in gdpr_requests
- DMCA: Takedown and counter-notice flow via dmca_requests (status: pending → reviewing → resolved/dismissed)
- Cookie consent: Per-visitor consent log with category breakdown in cookie_consent
- Audit trail: Every action logged to compliance_audit_log with actor, target, and detail JSONB
Creator Bill of Rights
Published at /bill-of-rights, the Creator Bill of Rights codifies immutable platform guarantees: revenue transparency (45/55 split always visible), data portability (full export within 72 hours), algorithmic fairness (no shadow-banning, public moderation decisions), and safety protections (emergency tools, appeal rights, wellbeing features).
Data & Storage
NovaReelOS uses Neon PostgreSQL (serverless) for all relational data and
Polsia R2 for media object storage. The database connection is managed through a single
shared pool in db/index.js -- the only file permitted to instantiate new Pool().
Schema Overview
The database contains 38 tables organized across 8 domains:
| Domain | Table | Purpose |
|---|---|---|
| Core | businesses | Brand/company records |
| creators | Internal team members assigned to prospects | |
| creator_profiles | Creator network profiles with auth tokens | |
| magic_link_tokens | Passwordless auth (15-min expiry, single-use) | |
| Content | posts | Creator video posts with permissions and scheduling |
| content_likes | Per-content/post likes | |
| intake_prospects | Prospect pipeline (prospect → qualified → active) | |
| intake_submissions | Form submissions (pending/reviewed/converted) | |
| Social | follows | Creator follow relationships |
| push_subscriptions | PWA push notification endpoints | |
| email_queue | Onboarding email schedule (6-step sequences) | |
| Commerce | hire_requests | Brand-to-creator hire briefs |
| brand_shortlists | Brand's saved creator shortlist | |
| brand_campaigns | Brand campaign definitions and budgets | |
| brand_offers | Brand-to-creator offers with deliverables | |
| creator_rates | Per-creator pricing by surface | |
| marketplace_applications | Creator campaign applications | |
| marketplace_settings | Creator marketplace preferences | |
| marketplace_earnings | Marketplace earning transactions | |
| Legal | legal_documents | Versioned legal docs (slug + version) |
| cookie_consent | GDPR cookie consent per visitor | |
| dmca_requests | DMCA takedown/counter-notice tracking | |
| gdpr_requests | Data access/erasure/portability requests | |
| compliance_audit_log | Compliance event audit trail | |
| Support | knowledge_base_articles | Searchable help articles by category |
| support_tickets | Creator support tickets with priority | |
| faq_items | Expandable FAQ entries by category | |
| LIVE | live_sessions | Active LIVE stream sessions |
| live_guests | Multi-guest tracking (max 4 per session) | |
| live_polls | Text polls during LIVE streams | |
| live_poll_votes | One vote per voter per poll | |
| live_goals | LIVE goals (followers/likes/gifts/watch_time) | |
| stream_widgets | Per-session widget overlay instances | |
| Monetization | revenue_events | Unified revenue pipeline (45/55 split) |
| widget_templates | Reusable widget presets per creator | |
| A11y | accessibility_settings | Per-creator accessibility preferences |
Data Warehouse & Analytics
Analytics queries live in two dedicated modules. db/analytics.js provides aggregate queries for pipeline, creator, and ROI metrics. db/digest.js powers the daily digest across 7 sections: overview KPIs, pipeline status, creator performance, recent prospects, creator activity, alerts, and creator network stats.
Revenue Events ETL
Monetization Action (stream, ad view, brand deal, tip)
↓
processMonetizationEvent() ← services/monetization.js
↓
INSERT → revenue_events(creator_id, surface, event_type, amounts)
↓
getRevenueSummaryByCreator() → Dashboard aggregation
getPlatformRevenueSummary() → Admin reporting
Media Storage
- Provider: Polsia R2 (S3-compatible, CDN-backed)
- Video upload: POST /api/media/upload -- MP4, WebM, MOV -- max 60MB
- Image upload: POST /api/media/banner-upload -- JPEG, PNG, WebP, GIF -- max 5MB (base64 JSON)
- Output: Public CDN URL returned on success; stored in post or profile record
Migrations
Schema changes are managed through JavaScript migration files in the migrations/ directory.
Files are named <unix-timestamp>_<name>.js and executed sequentially at startup
via npm run migrate. The migrate runner skips .sql files.
APIs & SDKs
NovaReelOS exposes a RESTful API layer under /api/* for all client interactions. Authentication uses three methods depending on context: magic link tokens for passwordless login, creator_token headers for API calls, and cookie-based brand auth for business dashboard sessions.
Authentication
- Magic links: POST to create token → email link → 15-minute expiry → single-use → sets session cookie
- Creator token:
X-Creator-Tokenheader; stored in creator_profiles.creator_token - Brand auth: Cookie-based via businesses.auth_token; set on business login
REST API Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/creators | List creator profiles, search, discover page data |
| POST | /api/creators | Create or update creator profile |
| GET | /api/admin | Admin pipeline, creator management, analytics |
| GET | /api/analytics | Pipeline, creator, and ROI aggregate metrics |
| POST | /api/onboarding | Creator/business onboarding email sequences |
| GET | /api/posts | Feed, creator posts, single post by ID |
| POST | /api/posts | Create, update, delete, schedule, publish posts |
| POST | /api/media/upload | Upload video (MP4/WebM/MOV, max 60MB) to R2 |
| POST | /api/media/banner-upload | Upload image (JPEG/PNG/WebP/GIF, max 5MB, base64) |
| POST | /api/tiktok | TikTok Events API dispatch and ttclid tracking |
| GET | /api/live | LIVE session status, guests, polls, goals |
| POST | /api/live | Create session, manage guests, run polls, set goals |
| GET | /api/widgets | Stream widget config, templates, positions |
| POST | /api/widgets | Add, update, toggle, remove stream widgets |
| GET | /api/messages | Conversations, messages, search, SSE stream |
| POST | /api/messages | Send message, create conversation, mark read |
| POST | /api/events | Track custom events (page views, actions) |
| GET | /api/alerts | Founder alerts, unacknowledged count |
| POST | /api/alerts | Acknowledge alerts, update settings |
| GET | /api/hire | Hire requests for creator or brand |
| POST | /api/hire | Create, accept, decline, complete hire requests |
| POST | /api/notifications | Push subscription management |
| GET | /api/monetization | Revenue config, earnings, platform summary |
| POST | /api/monetization | Calculate split, record event, brand deal payout |
Event Tracking
TikTok Events API v1.3 integration fires non-blocking server-side events for conversion tracking.
The client-side utility (public/js/tiktok.js) captures ttclid from URL params
and persists it in a 90-day cookie. Server-side dispatch via services/tiktok-events.js sends
SHA-256 hashed identifiers with each event.
| Event | Trigger | Properties |
|---|---|---|
| CompleteRegistration | Creator joins via /join | external_id, ttclid |
| Lead | Business submits /intake | external_id, ttclid |
| ViewContent | Page load (key pages) | page_url, content_type |
| AddPaymentInfo | Checkout (stub, future) | external_id, value |
Ad Sales Engine SDK
The Ad Sales Engine SDK documentation is published at /docs/ad-engine with a 10-section technical reference covering architecture, initialization, core modules, API reference, event types, revenue calculation, brand safety, and code examples. The SDK handles ad placement, impression tracking, and revenue event generation across all monetization surfaces.
Infrastructure & DevOps
NovaReelOS runs as a single Express.js process on Render, backed by Neon PostgreSQL for data and Polsia R2 for media storage. The architecture prioritizes simplicity -- one deployable unit, one database, one object store -- while maintaining horizontal scalability through stateless request handling and connection pooling.
Architecture Diagram
⌊ Git Push ⌋
↓
Render Auto-Deploy
↓
npm install → npm run migrate → npm start
↓
+--------------------------+
| Express.js Process |
| (server.js entry) |
+-----+--------+----------+
| | |
+------+ +---+---+ +---+------+
| Neon | | R2 | | TikTok |
| PgSQL| | Media | | Events |
+------+ +-------+ +----------+
Hosting Stack
| Layer | Service | Details |
|---|---|---|
| Compute | Render Web Service | Single process, auto-restart on crash, zero-downtime deploys |
| Database | Neon PostgreSQL | Serverless, auto-scaling, connection pooling via db/index.js |
| Media | Polsia R2 | S3-compatible object storage with global CDN edge caching |
| Polsia Email Proxy | Transactional emails via POLSIA_EMAIL_PROXY_URL | |
| Analytics | TikTok Events API | Server-side conversion tracking (v1.3) |
CI/CD Pipeline
Deployment is triggered by pushing to the main branch. Render watches the repository
and automatically builds and deploys on every push. The build sequence is:
# Build command npm install # Start command npm run migrate && npm start # Migrations run at startup before the server binds # JavaScript files in migrations/ executed sequentially # .sql files are skipped by the migrate runner
Environment Variables
| Variable | Purpose | Required |
|---|---|---|
DATABASE_URL | Neon PostgreSQL connection string | Yes |
POLSIA_R2_BASE_URL | R2 API endpoint for media uploads | Yes |
POLSIA_API_TOKEN | Auth token for R2 and Polsia services | Yes |
POLSIA_EMAIL_PROXY_URL | Email proxy endpoint | Yes |
POLSIA_API_KEY | API key for email proxy auth | Yes |
TIKTOK_ACCESS_TOKEN | TikTok Events API auth token | Opt |
TIKTOK_PIXEL_ID | TikTok pixel code for event tracking | Opt |
PORT | Server listen port (default: 3000) | Opt |
Scaling & Observability
- Horizontal scaling: Stateless Express.js process scales via Render's auto-scaling; add instances with no code changes
- Connection pooling: db/index.js manages a shared PostgreSQL pool; prevents connection exhaustion under load
- Health check: GET /health endpoint returns 200 with uptime, timestamp, and database connectivity status
- Logging: Structured application logs streamed to Render's log aggregator; console.log/error for all output
- Error handling: Express error middleware catches unhandled rejections; 500 responses include request IDs for debugging
- Zero-downtime deploys: Render performs rolling deploys; old process handles in-flight requests while new process starts
Security
Auth Architecture
NovaReelOS uses a passwordless authentication model. No user passwords are stored anywhere in the system—eliminating credential-stuffing and breach-related vulnerabilities entirely. Authentication flows through three mechanisms.
| Mechanism | Actor | Storage | Expiry |
|---|---|---|---|
| Magic Link | Creator | magic_link_tokens table | 15 min, single-use |
| Creator Token | Creator API | creator_profiles.creator_token | Persistent, revocable |
| Brand Cookie | Brand | nr_brand_auth HTTP cookie | Session-based |
// db/auth.js — magic link flow async function createMagicLinkToken(email, creatorId) { const token = crypto.randomUUID(); const expiresAt = new Date(Date.now() + 15 * 60 * 1000); // 15 min await pool.query('INSERT INTO magic_link_tokens ...'); return token; }
Fraud Prevention
- SQL Parameterization — All queries use
$1, $2placeholders viapgdriver. No string concatenation touches SQL. - Input Validation — Enum fields (stage, status, project_type) checked against whitelists at the route level.
- Rate Limiting — Auth endpoints and form submissions throttled to prevent brute-force attacks.
- CSRF Protection — Cookie-based auth uses
SameSiteandHttpOnlyflags.
Brand & Creator Safety
The Ad Sales Engine enforces brand safety through content category filtering and advertiser blocklists. Creator verification gates ensure only trusted profiles enter premium campaigns.
- Content Permissions — Per-post controls:
allow_download,allow_repost,allow_external_share,require_credit,allow_commercial. - LIVE Moderation — Slow mode, guest approval/removal, chat moderation, one-click stream termination.
- Reporting — Six-step flow via Safety Center with category selection, evidence upload, and resolution tracking.
Data Protection & Infrastructure
GDPR compliance is built into the data layer. The gdpr_requests table tracks all
data subject requests (access, erasure, portability, rectification, restrict). The
compliance_audit_log records every privacy-relevant action. Cookie consent
tracked per visitor in cookie_consent.
- HTTPS Everywhere — All traffic encrypted via Render TLS termination.
- Environment Secrets — Database URLs, API tokens, pixel IDs stored as Render env vars. Never committed to source.
- Single Pool —
db/index.jsis the only file that instantiatesnew Pool().
Financial Model
Revenue Split: The Economic Constitution
The 45/55 split is hardcoded into services/monetization.js and applies
uniformly across all revenue surfaces. No admin panel can override it, no enterprise
deal can customize it, and no investor pressure can alter it without a code change
visible in version control.
Revenue Streams
| Stream | Source | Split | Status |
|---|---|---|---|
| Ad Revenue | In-feed, pre-roll, LIVE ads | 45/55 | Active |
| Brand Marketplace | Campaign fees, offer commissions | 45/55 | Active |
| Shop Transactions | Product sales, affiliate commissions | 45/55 | Building |
| LIVE Gifts | Virtual gifts, tips, subscriptions | 45/55 | Building |
| Music Streaming | Stream royalties, sound licensing | 45/55 | Planned |
| Premium Features | Creator subscriptions, advanced analytics | N/A | Planned |
5-Year Financial Projections
| Year | Gross Revenue | Platform (55%) | Creator Payouts (45%) |
|---|---|---|---|
| Year 1 | $500K | $275K | $225K |
| Year 2 | $2.5M | $1.375M | $1.125M |
| Year 3 | $12M | $6.6M | $5.4M |
| Year 4 | $45M | $24.75M | $20.25M |
| Year 5 | $120M | $66M | $54M |
Unit Economics
- CAC — Target $8 per creator via organic TikTok campaigns and referral loops. Tracked via
CompleteRegistrationevents. - LTV — Projected $240 per creator over 24 months based on blended ad revenue, brand deal commissions, and shop fees at the 55% platform rate.
- LTV:CAC Ratio — Target 30:1, driven by near-zero marginal cost per additional creator.
- Break-Even — Month 18 with 50K active creators at $10/month average gross revenue. The 55% platform share ($275K/month) covers infrastructure, moderation, and operations.
Roadmap
Platform Evolution
NovaReelOS follows a phased rollout that prioritizes core creator value before expanding into adjacent revenue surfaces and international markets. Each phase builds on the infrastructure established in the previous one.
| Phase | Timeframe | Key Deliverables | Status |
|---|---|---|---|
| Phase 1 | Q1–Q2 2026 | Core platform, creator profiles, video feed, 45/55 monetization engine, brand intake pipeline, safety center | Complete |
| Phase 2 | Q3–Q4 2026 | Brand marketplace, ad sales engine, LIVE studio with multi-guest/polls, analytics dashboard, push notifications | In Progress |
| Phase 3 | Q1–Q2 2027 | Music surface with stream royalties, shop commerce, AI content recommendations, progressive web app | Planned |
| Phase 4 | Q3–Q4 2027 | International expansion (localization, multi-currency), creator fund, premium tiers, public API marketplace | Planned |
| Phase 5 | 2028 | AR/VR content tools, cross-platform syndication, creator-owned tokens, decentralized content graph | Planned |
Phase 1 Highlights (Shipped)
- Server-rendered monolith on Express.js + EJS + Neon PostgreSQL
- Magic link passwordless auth with 15-minute single-use tokens
- Creator profiles with verification badges, follow graph, and niche filtering
- Video feed with drafts, scheduling, pinning, and granular post permissions
- Unified monetization engine with hardcoded 45/55 split across all surfaces
- Brand intake pipeline (prospect → qualified → active → paused/lost)
- GDPR, DMCA, and cookie consent compliance built into data layer
Phase 2 Focus (Current)
- Brand marketplace with campaigns, offers, applications, and creator rates
- Ad sales engine with programmatic auction, targeting, and brand safety
- LIVE studio with stream widgets, polls, goals, slow mode, multi-guest
- Revenue dashboard with real-time earnings breakdown by surface
Long-Term Vision
By 2028, NovaReelOS will be a fully composable creator operating system where every component—content, commerce, community, and capital—is owned by the creator and portable across platforms. The 45/55 split remains immutable regardless of scale.
Governance
Platform Policies
NovaReelOS operates under a layered policy framework. All policies are published as
versioned legal documents stored in the legal_documents table.
- Terms of Service — Platform usage, content ownership, liability, dispute resolution.
- Privacy Policy — Data collection, processing, storage. Aligned with GDPR and CCPA.
- Community Guidelines — Acceptable content standards, prohibited behaviors, enforcement.
- Creator Bill of Rights — Immutable guarantees: transparent revenue, data portability, content ownership, fair appeals.
Content Policies & Moderation
- Moderation — Content evaluated against guidelines. Violations result in warnings, removal, or suspension.
- Appeals — Tracked in
dmca_requests(IP claims) and support tickets (guideline disputes) with transparent status. - Transparency — Regular reports on removals, account actions, and DMCA volume sourced from
compliance_audit_log.
Document Versioning
Each document is identified by a unique (slug, version) pair with an
is_current flag. Previous versions remain accessible for audit purposes.
-- legal_documents versioning model CREATE TABLE legal_documents ( slug TEXT NOT NULL, -- 'terms-of-service' version TEXT NOT NULL, -- '2.1.0' content TEXT NOT NULL, effective_date DATE, is_current BOOLEAN DEFAULT false, UNIQUE(slug, version) );
Creator Advisory & Compliance
Policy changes affecting creator economics go through a public comment period. Material changes to the Creator Bill of Rights require explicit acknowledgment.
| Regulation | Scope | Implementation |
|---|---|---|
| GDPR | EU data subjects | gdpr_requests with access/erasure/portability/rectification/restrict |
| DMCA | Copyright claims | dmca_requests with takedown/counter-notice flow and sworn statements |
| CCPA | California consumers | Extends GDPR infrastructure with California-specific opt-out requirements |
| CAN-SPAM | Email comms | Unsubscribe links in all sequences. email_queue tracks delivery |
Appendices
Appendix A: Database Entity Reference
| Table | Purpose | Key Relations |
|---|---|---|
businesses | Brand partner records | → intake_prospects, hire_requests, brand_campaigns |
creator_profiles | Creator network profiles + auth tokens | → posts, follows, revenue_events, hire_requests |
posts | Video content with permissions + scheduling | → creator_profiles, content_likes |
follows | Creator-to-creator follow graph | → creator_profiles (follower, followee) |
revenue_events | Unified monetization log (45/55 split) | → creator_profiles |
brand_campaigns | Brand advertising campaigns | → businesses, brand_offers |
brand_offers | Brand-to-creator deal offers | → brand_campaigns, creator_profiles |
hire_requests | Direct hire briefs | → businesses, creator_profiles |
live_sessions | LIVE stream sessions | → creator_profiles, live_guests, live_polls |
legal_documents | Versioned legal docs | Standalone (slug + version unique) |
gdpr_requests | GDPR data subject requests | Standalone (by email) |
support_tickets | Creator support tickets | → creator_profiles, ticket_replies |
magic_link_tokens | Passwordless auth (15-min, single-use) | → creator_profiles |
Appendix B: API Endpoint Glossary
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/monetization/config | Current revenue split configuration |
| POST | /api/monetization/calculate | Calculate split for a gross amount |
| POST | /api/monetization/event | Record a revenue event |
| GET | /api/monetization/earnings | Creator earnings by surface and time |
| POST | /api/posts | Create a new post (draft or published) |
| GET | /api/feed | Paginated content feed |
| POST | /api/follow/:id | Toggle follow on a creator |
| POST | /api/hire | Submit hire request to a creator |
| POST | /api/media/upload | Upload video to R2 (max 60MB) |
| POST | /api/auth/magic-link | Generate and send a magic link |
| GET | /api/discover | Creator discovery with niche filtering |
Appendix C: Glossary of Terms
| Term | Definition |
|---|---|
| Surface | Independent content format and monetization channel (Video, Posts, Music, Shop, LIVE). |
| Creator Share | 45% of gross revenue allocated to the creator per event, via services/monetization.js. |
| Platform Share | 55% of gross revenue retained for infrastructure, moderation, and operations. |
| Revenue Event | Immutable row in revenue_events for any monetization action (ad, gift, sale, deal). |
| Brand Campaign | Structured advertising initiative with goals, budget, targeting, and surface allocation. |
| Hire Request | Direct brief from brand to creator for a project (video/short/campaign/series/event). |
| Magic Link | Single-use, 15-minute auth URL for passwordless creator login. |
| Creator Token | Persistent API token on creator_profiles, passed via X-Creator-Token header. |
| Brand Shortlist | Brand's saved creators for potential collaboration, stored in brand_shortlists. |
Appendix D: Configuration Reference
| Variable | Purpose | Required |
|---|---|---|
DATABASE_URL | Neon PostgreSQL connection string | Yes |
PORT | HTTP server listen port (default: 3000) | No |
POLSIA_EMAIL_PROXY_URL | Email proxy base URL for onboarding | Yes |
POLSIA_API_KEY | Auth key for email proxy | Yes |
POLSIA_R2_BASE_URL | R2 object storage for media uploads | Yes |
POLSIA_API_TOKEN | Auth token for R2 uploads | Yes |
TIKTOK_ACCESS_TOKEN | TikTok Events API for conversion tracking | Yes |
TIKTOK_PIXEL_ID | TikTok pixel code for event dispatch | Yes |
VAPID_PUBLIC_KEY | VAPID public key for push notifications | Yes |
VAPID_PRIVATE_KEY | VAPID private key for push signing | Yes |