Add /videos gallery + per-domain mp4 reel uploads - #10
Merged
Conversation
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
Public /videos page (sibling of /badges) shows a curated pair of brand reels (served from public/videos) plus any uploaded moshcoding.com reels. Page owners upload their own mp4 reels per parked domain from a new dashboard "Videos" tab. Storage reuses the existing DATA_DIR Railway-volume pattern (same volume genart caches images on): reel bytes live on the volume, metadata in a new Turso `media` table. Files stream through /api/media/[id] with HTTP range support so <video> can seek. Upload/delete are gated to the domain owner (or admin) via a shared session->account resolver extracted to lib/api. - lib/media.ts: volume storage (mp4/webm/mov, 100MB cap) - media table + CRUD in lib/db.ts - /api/media (POST upload, GET list) + /api/media/[id] (GET range-stream, DELETE) - app/videos public gallery; dashboard Videos tab - Nav + landing + README links Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ralyodio
force-pushed
the
feat/video-uploads
branch
from
July 10, 2026 11:10
caf177d to
e445277
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds video support to moshcoding:
/videosgallery — a sibling of/badges. Shows the brand promo reels (now served frompublic/videos/) plus any reels uploaded to the mainmoshcoding.comgallery. Linked from the nav + landing media-kit CTA.How it works
DATA_DIRRailway-volume pattern (the same volume genart caches hero images on): the reel bytes live on the volume (lib/media.ts), the metadata in a new Tursomediatable (lib/db.ts).GET /api/media/[id]with HTTP range support (206 Partial Content) so<video>can seek/scrub.POST /api/media) and delete (DELETE /api/media/[id]) are gated to the domain owner (or admin) via a sharedresolveAccountIdhelper extracted intolib/api.ts(the account route now reuses it instead of its private copy).MEDIA_MAX_BYTES).Uploaded reels persist only if a Railway volume is mounted at
DATA_DIR— same requirement as the cached generated images. Without a volume, uploads are lost on redeploy (built-in brand reels are unaffected — they ship in the image)..env.exampledocuments this.Verified
Built
bun run buildclean, then ran the full flow against a local libSQL DB + forged admin session:bytes=0-99→ 206content-range: bytes 0-99/2048, unauth upload → 401, wrong type → 400, delete → ok + file removed from disk,/videosrenders all 4 built-in reels.🤖 Generated with Claude Code