EAT MY SHORTS

Your Own
Short-Form
Video Empire.

A full-featured YouTube Shorts / TikTok clone running entirely on your infrastructure. Upload, discover, and monetize — no platform fees, no algorithm you don't control.

$ git clone github.com/chrismccoy/eatmyshorts
150+
Source Files
4
HLS Quality Tiers
0
Platform Fees
MIT
License
HLS STREAMING ALGORITHMIC FEED STRIPE MONETIZATION REAL-TIME SOCKETS AI TOXICITY FILTER PWA READY SELF HOSTED OPEN SOURCE HLS STREAMING ALGORITHMIC FEED STRIPE MONETIZATION REAL-TIME SOCKETS AI TOXICITY FILTER PWA READY SELF HOSTED OPEN SOURCE

Every
Feature.

Built for creators who want full ownership of their platform — no black box algorithms, no revenue share you didn't agree to.
01
Video
Upload & Stream
  • HLS adaptive streaming — 1080p / 720p / 480p / 360p, auto-transcoded via FFmpeg
  • A/B thumbnail testing — 50/50 split for 24h, winner auto-locked by cron
  • Scheduled publishing queue — up to 5 drafts with datetime picker UI
  • Video chapters — [H:MM:SS Label] markers with scrubber bar
  • Remix chains, sound/audio discovery, series/multi-part groups
  • Members-only, age-restricted, sponsored content tagging per-video
02
Discovery
Feed & Search
  • Algorithmic feed with engagement scoring + time-decay ranking
  • Collaborative filtering FYP v2 — co-watch signals, 1.3× boost
  • Full-screen vertical /shorts feed with swipe-up/down gestures
  • Trending — precomputed 24h / 7d / 30d windows rebuilt every 15 min
  • FTS5 full-text search with prefix matching + typeahead autocomplete
  • Hashtag challenges — hero banner, countdown, leaderboard top-10
03
Community
Social Layer
  • Threaded comments with likes, pinning, @mentions, and load-more
  • Emoji reactions — ❤️ 🔥 😂 😮 😢 👏 on videos
  • Super comments — pay 50 coins to pin for 24h
  • Community posts with polls, likes, and comments on profile pages
  • Live view count via Socket.io — everyone sees it update in real time
  • Stories — 24h expiring clips on profile, per-story view tracking
Monetisation

Make
Money.

  • Stripe membership tiers — recurring subscriptions with custom names and perks
  • Virtual coin bundles — purchase via Stripe, spend on gifts, tips, pins
  • One-tap 10-coin tip button directly on the video player
  • VAST / Google IMA pre-roll ads + banner ads with impression tracking
  • Stripe Billing Portal — self-service cancel/upgrade, no support tickets
  • Ad revenue estimates at $2.50 CPM — bot views excluded via fraud detection
$$$
Creator Earnings
Gift history · Ad CPM · Membership MRR · All-time coins
Audience Analytics
Device breakdown · Peak hours · Traffic sources · Retention curve
API Keys
Scoped read/write keys · Last-used timestamps · Revoke anytime
Content Safety

No
Garbage.

🤖
AI Toxicity
Local TF.js — no external API. Fail-open 1500ms timeout.
🔍
Bot Detection
Redis rolling counter — 4 views/IP/video/10min max.
👻
Shadow Ban
Silent removal from feeds, search, trending.
⚖️
Appeals Queue
DMCA, reports, appeals — all with admin review workflow.
Admin Panel

Total
Control.

  • Dashboard — videos, users, views, activity at a glance
  • Creator approval system — gate who can upload content
  • Cohort analysis — which upload month performed best long-term
  • Coin adjustment — credit/deduct any user's balance with audit log
  • Site settings — name, tagline, layout, registration toggle
  • Audit log — every sensitive action recorded with actor + IP
Architecture

Built
Right.

  • Routes → Controllers → Services → Repositories — clean layered architecture
  • SQLite WAL mode + FTS5 — zero-config database with full-text search
  • Redis caching — in-memory auto-fallback, feed TTL 60s, trending 15min rebuild
  • S3-compatible storage — local disk or AWS / R2 / Spaces via env var
  • Standalone transcode worker — isolate FFmpeg CPU on a separate machine
  • Zod validation, Helmet CSP, CSRF double-submit, bcrypt cost factor 12
Background Jobs
*/15 * * * *
Trending cache rebuild (24h / 7d / 30d windows)
*/5 * * * *
Scheduled video publishing
*/2 * * * *
Similarity engine (TF-IDF + Jaccard, 1 video/run)
0 * * * *
A/B thumbnail winner lock-in (24h test window)
0 8 * * 1
Weekly email digests (creator performance + new from follows)
Everything else

More
Features.

📲
Mobile
Picture-in-Picture, swipe navigation, ARIA accessibility, offline PWA with IndexedDB
🔔
Notifications
Real-time Socket.io + Web Push browser notifications + weekly email digests via nodemailer
🌓
Dark Mode
Persisted in localStorage. Flash-free on load via inline <head> script. Toggleable from nav.
🔑
REST API
Public endpoints for videos, users, comments. Scoped read/write API keys with ems_ prefix.
📊
Analytics
Per-video retention curve, device breakdown, peak hours, traffic sources, CSV export
🎨
Channel Branding
Banner image, brand color, link-in-bio — all in one studio settings page
🏆
Challenges
Promote any hashtag to an official challenge with countdown timer and top-10 leaderboard
☁️
Cloud Storage
Local disk by default. Switch to S3 / R2 / Spaces by setting 4 env vars. Thumbnails + HLS auto-uploaded.

The
Stack.

Backend
Runtime Node.js ≥ 18
Framework Express 4.x
Database SQLite + Knex + FTS5
Caching Redis / in-memory
Real-Time Socket.io 4.x
Video FFmpeg + HLS
Auth JWT + bcrypt
Payments Stripe 20.x
AI / ML TensorFlow.js (local)
Validation Zod 4.x
Frontend
Styling Tailwind CSS 3.x
Templating EJS (SSR)
Video Player Hls.js 1.x
Ads Google IMA SDK 3
Offline Service Worker + IndexedDB
PWA Web Push + Manifest
Scroll Intersection Observer
Overlay Picture-in-Picture API
JS Vanilla ES2020+
Dev nodemon + Tailwind CLI
Get Running

5 Commands.
You're Live.

# 1. Clone the repository git clone github.com/chrismccoy/eatmyshorts.git cd eatmyshorts # 2. Install dependencies npm install # 3. Configure environment cp .env.example .env # 4. Setup admin + create upload dirs npm run setup # 5. Start the dev server npm run dev # Optional: run HLS worker separately npm run worker
Available at http://localhost:3000  ·  Admin at /admin
Prerequisites
Node.js ≥ 18.0.0
Required — runtime for the Express server
FFmpeg
Required — video transcoding, thumbnails, duration detection
Redis
Optional — falls back to in-memory cache automatically
Stripe Account
Optional — only needed for memberships and coin purchases
100% self-hosted · MIT licensed

Your Platform.
Your Rules.

Deploy on your own server. Keep 100% of revenue. No algorithm you can't inspect. No terms of service that change overnight.