Developer Guide
This guide is for developers who want to contribute to VideoCMS or run it from source without Docker.
Prerequisites
Ensure you have the following installed:
- Go (v1.25 or higher)
- Bun (v1.2 or higher)
- FFmpeg (v4+, must be in your system
PATH) - GCC (Required for CGO/SQLite)
- Git
Full-Stack Development
The recommended workflow starts the Nuxt frontend and hot-reloading Go backend together.
Clone the repository:
bashgit clone --recurse-submodules https://github.com/kirari04/videocms.git cd videocmsFor an existing clone, initialize the submodules with:
bashgit submodule update --init --recursiveDownload Go dependencies:
bashgo mod downloadStart VideoCMS:
bashmake devThis command:
- installs the locked frontend dependencies with Bun;
- starts Nuxt at
http://127.0.0.1:3000; - starts Go with Air at
http://127.0.0.1:3001; - proxies
/api, player, captcha, icons, and media requests through Nuxt; - stops both processes cleanly when either one exits or you press
Ctrl+C.
The browser therefore uses one origin, matching the production request shape without requiring development CORS configuration.
To use different ports:
make dev DEV_FRONTEND_PORT=4000 DEV_BACKEND_PORT=4001For focused debugging, the processes can also be started separately:
make dev-backend
make dev-frontendEnvironment Variables
The backend reads its existing environment variables as usual. The development launcher also supports:
DEV_FRONTEND_HOSTDEV_FRONTEND_PORTDEV_BACKEND_HOSTDEV_BACKEND_PORTDEV_BACKEND_URLDEV_PUBLIC_ORIGINDEV_MEDIA_PATH
Frontend Setup (Nuxt 4)
The frontend can still be run directly when needed:
cd videocms-frontend
bun install --frozen-lockfile
bun run devIts development proxy targets http://127.0.0.1:3001 by default. Set NUXT_DEV_BACKEND_URL to point it at another backend.
Testing
Before submitting a PR:
go test ./...
go vet ./...
cd videocms-frontend && bun run buildAlso manually test the workflow you changed and ensure modified Go files have been formatted.
Building for Production
To build the static binary and frontend assets:
Backend
# Build the binary
go build -o videocms main.goFrontend
cd videocms-frontend
bun run build
# Output will be in .output/Docker
The standard way to build the full image:
docker build -t videocms:local .