An entry for the streamplace vod showcase
Streamhut#
Decentralized video streaming on AT Protocol, powered by serverless bundles.
Architecture#
┌─────────────────────────────────────────────────────────────────────────────┐
│ STREAMHUT │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ AppView │────▶│ Turso │ │ Frontend │ │
│ │ Bundle │ │ (SQLite) │ │ (React) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │
│ │ indexes videos │ plays videos │
│ ▼ ▼ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ File Cache │◀───▶│ VOD Bundle │◀────│ at-run │ │
│ │ /tmp/vod-cache │ (playback) │ │ Runner │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────┐ │
│ │ stream.place │ │
│ │ (HLS) │ │
│ └──────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
Project Structure#
├── apps/
│ ├── backend/
│ │ ├── api/ # VOD bundle - HLS proxying, thumbnails, sprites, sharing
│ │ └── appview/ # Video indexer - crawls creators, stores in Turso (WIP)
│ └── frontend/ # Nuxt 4 web app - video player UI
│
├── packages/at-run/
│ ├── runtime/ # Bundle authoring SDK
│ ├── cli/ # Deploy bundles to PDS
│ ├── runner/ # Execute bundles in Deno sandbox
│ └── lexicons/ # AT Protocol record schemas
│
└── DESIGN.md # Architecture decisions
Quick Start#
# Install dependencies
bun install
# Login to your AT Protocol PDS
npm run login
# Start the runner (dev mode with hot reload)
npm run runner
# In another terminal, start the frontend
npm run web
Common Tasks#
Deploy Bundles#
# Deploy both bundles
npm run deploy:all
# Deploy individually
npm run deploy:vod
npm run deploy:appview
Development#
# Start runner + frontend together
npm run dev
# Or separately:
npm run runner # Start at-run runner
npm run web # Start frontend dev server
# Build bundles
npm run bundle
# Type check
npm run typecheck
Environment Variables#
Copy .env.example to .env and configure:
# Required for AppView
TURSO_URL=libsql://your-db.turso.io
TURSO_AUTH_TOKEN=your-token
# Optional: Connect VOD to AppView
APPVIEW_URL=https://at-run.example.com/bundle/.../streamhut-appview/latest
# Frontend
VITE_RUNNER_URL=https://at-run.example.com
Bundles#
VOD (atmosphereconf-vod)#
Serves video playback with thumbnails, preview sprites, and social sharing.
| Endpoint | Description |
|---|---|
GET /listVideos |
List videos (from AppView or fallback) |
GET /getPlaylist |
HLS master playlist |
GET /getThumbnail |
Video thumbnail |
GET /getSprite |
Preview sprite sheet |
GET /getVtt |
Sprite coordinates |
GET /shareVideo |
Share page with OG meta tags |
GET /shareCreator |
Creator share page with OG meta tags |
Job: syncAndProcessVideos - runs every 10 minutes
AppView (streamhut-appview) (Work in Progress)#
Indexes place.stream.video records from registered AT Protocol creators.
| Endpoint | Description |
|---|---|
POST /init |
Initialize database schema |
POST /registerCreator |
Add creator DID to index |
POST /unregisterCreator |
Remove creator |
GET /listVideos |
Query indexed videos |
GET /getStats |
Get index statistics |
POST /triggerSync |
Manual sync trigger |
Job: syncAllCreators - runs every 15 minutes
Documentation#
Applications#
- VOD Bundle - Video playback API with HLS, thumbnails, and sharing
- Frontend - Nuxt 4 web application
- AppView - Video indexer (work in progress)
at-run Framework#
- Overview - Serverless execution on AT Protocol
- Runner - HTTP server for bundle execution
- Runtime - Bundle authoring SDK (docs coming soon)
- CLI - Deployment tool (docs coming soon)
Other#
- Design Decisions - Architecture decisions and rationale
- Hosting Guide - Deploy your own runner
Requirements#
- Bun v1.0+ - Runtime and bundler
- Deno v1.40+ - Sandbox execution
- Turso account - Database (free tier works)
License#
MIT