We offer customization solutions and support ([email protected]) | Visit us on bitbyte3 for complete VOD solutions with apps.
NixStream
Installation

Development Setup

Local development with Docker dev mode and Vite HMR

For local dev you can use Docker dev mode (recommended) or run PHP and Node directly on the host.

Docker development mode

cd nixstream/nixstream
./install.sh --dev

This enables:

  • Source bind mounts (edit PHP/JS without rebuilding images)
  • Vite dev server on port 5173 with HMR
  • Same Docker services as production (MySQL, Redis, queue, live)

Access the app at http://localhost (or whatever you set in APP_PORT). Vite proxies through the nginx container in dev mode.

Dev vs production Docker

./install.sh bakes code into the image and serves built frontend assets; rebuild after changes. ./install.sh --dev bind-mounts source from the host and runs Vite HMR on 5173, so PHP and JS edits land without rebuilding. Use plain install for staging or production-like runs; use --dev while you are actively hacking on the app.

Frontend development

cd nixstream/nixstream
npm run dev

Vite serves the React admin panel with hot module replacement. Changes to resources/js/ reflect instantly in the browser.

Frontend stack

  • React 18 with TypeScript
  • Vite build tool
  • Tailwind CSS
  • React Router for admin routes

Build for production:

npm run build

Backend commands

php artisan route:list --path=api
./vendor/bin/phpunit
php artisan queue:work redis --queue=high,default,video-encoding
php artisan tinker

Run PHPUnit inside Docker:

docker compose exec app ./vendor/bin/phpunit

Useful artisan commands

CommandPurpose
php artisan migrateRun database migrations
php artisan db:seedSeed default admin user
php artisan queue:workProcess jobs manually
php artisan config:clearClear config cache after .env changes
php artisan permission:cache-resetRefresh ACL after config/acl.php edits

Documentation site

cd docs
npm install
npm run dev

Open http://localhost:3000 for the Fumadocs documentation site.

Build docs for production:

npm run build
npm start

Environment for development

Copy .env.docker.example (Docker) or .env.example (manual). Key dev settings:

APP_ENV=local
APP_DEBUG=true
LOG_LEVEL=debug

Never use APP_DEBUG=true in production.

Watching encoding jobs

docker compose logs -f queue
docker compose exec queue supervisorctl status

Trigger a test upload from the admin panel and watch the queue process the job.

Database access

docker compose exec db mysql -u nixstream_user -p nixstream

Or use a GUI client pointed at localhost:3306 with credentials from .env.

Tips

  • Use docker compose logs -f queue to watch encoding jobs
  • Run php artisan permission:cache-reset after editing config/acl.php
  • Check storage/logs/laravel.log for application errors
  • Clear browser cache if Vite HMR stops updating (rare)
  • Run composer install after pulling changes that update composer.lock

Testing API locally

# Create API key in admin panel, then:
curl http://localhost/api/client/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY"

Adjust host/port if using APP_PORT=8080.

Same stack details as Docker Installation and Manual Installation. API shapes are in the API Reference.

On this page