The root Makefile is the central build orchestration tool for the Bedrud monorepo. It provides commands for development, building, and deployment across all platforms.

Usage

make <target>
make help       # Show all available targets

Development Targets

TargetDescription
make initInstall all dependencies (LiveKit + config + bun + Go)
make devRun LiveKit + server (hot reload) + web concurrently
make dev-webRun frontend dev server only
make dev-serverRun backend server + LiveKit
make dev-server-hotRun backend with Air hot reload
make dev-apiRun backend only, no LiveKit
make dev-livekitRun local LiveKit server
make dev-siteRun Astro site dev server
make dev-iosOpen iOS project in Xcode
make dev-androidOpen Android project in Android Studio

make init

Full setup for a new development environment:

  1. Downloads LiveKit server binary to ~/.local/bin/ (if not in PATH)
  2. Creates server/config.yaml from config.local.yaml template (if missing)
  3. Creates LiveKit embed placeholder at server/internal/livekit/bin/livekit-server
  4. Installs air for Go hot reload (if not present)
  5. Installs dependencies: apps/web (bun), apps/site (bun), server (go mod)

make dev

Starts all three development services concurrently. Press Ctrl+C to stop all:

  • LiveKit at localhost:7880
  • Server at localhost:8090
  • Web at localhost:3000

Build Targets

TargetDescription
make buildBuild frontend + backend (embedded)
make build-frontBuild frontend only
make build-backBuild backend only
make build-distBuild production linux/amd64 tarball
make build-siteBuild Astro site (SSG)

make build

Full production build:

  1. Runs bun run build in apps/web — builds the React app
  2. Copies apps/web/dist/client/*server/frontend/
  3. Builds the Go binary with the embedded frontend

Output: server/dist/bedrud

make build-dist

Creates a compressed, production-ready distribution:

  1. Runs make build
  2. Cross-compiles for linux/amd64 with stripped debug symbols
  3. Creates dist/bedrud_linux_amd64.tar.xz

Desktop Targets

TargetDescription
make dev-desktopBuild and run desktop app (debug)
make build-desktopBuild optimized release binary

Local Single Binary

TargetDescription
make local-buildBuild frontend + backend into one binary
make local-runBuild + run locally (SQLite, embedded LiveKit)

make local-run

Builds and starts the single binary with local config:

CONFIG_PATH=server/config.local.yaml server/dist/bedrud run

Open http://localhost:8090 when ready.

API Docs

TargetDescription
make swagger-genRegenerate Swagger docs from annotations
make swagger-openOpen Swagger UI in browser
make scalar-openOpen Scalar UI in browser

Requires swag CLI (go install github.com/swaggo/swag/cmd/swag@latest). Server must be running for swagger-open and scalar-open.

Android Targets

TargetDescription
make build-android-debugBuild debug APK
make build-androidBuild release APK (requires keystore)
make install-androidInstall release APK on connected device
make release-androidBuild + install release APK

APK Output Paths

  • Debug: apps/android/app/build/outputs/apk/debug/app-debug.apk
  • Release: apps/android/app/build/outputs/apk/release/app-release.apk

iOS Targets

TargetDescription
make build-iosBuild iOS archive (Release)
make export-iosExport IPA from archive
make build-ios-simBuild for iOS Simulator (Debug)

Output Paths

  • Archive: apps/ios/build/Bedrud.xcarchive
  • IPA: apps/ios/build/export/Bedrud.ipa

Deploy Target

TargetDescription
make deploy ARGS=...Run the deployment CLI tool

Example

make deploy ARGS="--auto-config --ip 1.2.3.4 --user root --domain meet.example.com"

This runs the Python CLI at tools/cli/bedrud.py with the provided arguments.

Test

TargetDescription
make test-backRun backend tests (go test -v -count=1 ./...)

Clean Targets

TargetDescription
make cleanRemove build artifacts and compiled binaries
make full-cleanRemove artifacts + all installed dependencies

make clean

Removes:

  • dist/ — distribution tarballs
  • server/dist/ — compiled server binary
  • apps/web/dist/ — React build output
  • server/frontend/ contents — embedded frontend assets
  • apps/android/app/build/ — Android build outputs
  • apps/ios/build/ — iOS build outputs
  • apps/site/dist/ — Astro site build output
  • target/ — Rust/Cargo build output

make full-clean

Everything clean does, plus:

  • apps/web/node_modules/
  • apps/site/node_modules/
  • apps/android/.gradle/
  • apps/android/build/
  • Go module cache (go clean -modcache)

Run make init afterwards to reinstall dependencies.