Technical architecture
Infrastructure Overview
Technology Stack
Frontend
React 18, TypeScript, Vite
Styling
TailwindCSS, shadcn/ui
State
TanStack Query, Zustand
Backend
Supabase (PostgreSQL, Edge Functions)
Auth
Supabase Auth + Wallet Adapter
Payments
Solana Web3.js, Phantom SDK
Streaming
HLS.js, native video
Edge Functions
Serverless backend functions for:
check-premium-access
Verify content access rights
verify-donation
Validate on-chain donations
process-bounty-reward
Handle bounty payouts
verify-share
Validate social shares
youtube-import
Fetch YouTube metadata
social-preview
Generate OG meta tags
support-chat
AI assistant backend
Database Schema
Key tables:
profiles- User accounts and metadatawutch_videos- Video contentshort_videos- Short-form contentlivestreams- Live streaming datax402_purchases- Premium content purchasesdonations- Tip transactionssharing_campaigns- Share & Earn campaignsstream_bounties- Bounty configurations
Security Features
Row Level Security (RLS) on all tables
JWT authentication
Wallet signature verification
Rate limiting
Input validation
CORS protection
Solana Integration
RPC
Helius for reliable node access
Escrow
Platform wallet for payouts
Verification
On-chain transaction validation
Signatures
Cryptographic proof of payments
Last updated

