Architecture

How Vidly works under the hood

A content-first commerce platform combining short-form video, creator storefronts and a multi-category marketplace — built for discovery.

Core video-to-shop flow

User opens video
Auto-play in feed
Overlay loads
1–5 product cards
Tap product
Click event tracked
Buy now
Add to cart / checkout
Attribution
Revenue → creator

Data model

Users
id, role, profile
Creators
handle, followers, payouts
Videos
url, products[], analytics
Products
price, stock, creator
Orders
user, video?, amount
Events
view, click, convert

Rules engine

  • • Videos must have 1–5 attached products
  • • New uploads enter pending queue
  • • Admin approves → status becomes published
  • • CTR < 2% over 10k views flags for review
  • • Creator earns 15% commission on attributed sales

Attribution pipeline

view → +1 video.views
click → link click_id ↔ user_id
cart_add → tag with click_id
purchase → resolve attribution
revenue → creator + platform split

Role permissions

CapabilityViewerCreatorAdmin
Watch & shop videos
Place orders
Upload videos
Manage products
View analytics
Moderate content
Manage creators

System architecture

Frontend
  • React + TanStack Start
  • Edge SSR
  • Mobile-first UI
API & Logic
  • Server functions
  • Rules engine
  • Attribution pipeline
Data & Storage
  • PostgreSQL
  • Object storage (video)
  • Event stream