localstream is a personal/fun self-hosted streaming app for local video files.
It combines a Go backend and a SvelteKit frontend to scan local media libraries, stream videos with HTTP byte-range support, and track watch progress for movies and shows.
This is an actively evolving side project, not a production-hardened platform.
src/ - Go application rootsrc/cmd/server/ - main server entrypointsrc/internal/ - backend packagessrc/migrations/ - database migrationssrc/frontend/ - SvelteKit frontendsrc/frontend/build/ - built frontend assets served by the Go server in productionPrerequisites:
1.25.3+cp src/.env.example src/.env
At minimum, set DATABASE_URL and PORT in src/.env.
cp src/frontend/.env.example src/frontend/.env
Set VITE_API_URL to your backend origin (default local dev: http://localhost:42069).
This is only required for the development environment. In production the frontend is hosted by the backend and therefore the frontend doesn't need this.
If you're running the default PORT setup on the backend you don't need to create tne .env file.
# backend
cd src && go mod download
# frontend
cd src/frontend && pnpm install
cd src
go run ./cmd/server
cd src/frontend
pnpm dev
Open the app at Vite's dev URL (typically http://localhost:5173).
The Go server serves the built frontend from src/frontend/build and serves the API from the same process.
I chose this path because it's the easiest when the app is self hosted in a home network environment and someone tries to access it by for example Tailscale IP the frontend can still connect to the backend by its relative path.
/api requests to VITE_API_URL.This project was not vibe-coded or heavily influenced by AI.
But I did use AI in a very controlled manner and would like to point that out.
For example:
MIT. See LICENSE.