Contributing to Tusk
Thank you for contributing to Tusk! We keep the codebase lean, zero-bloat, crash-safe, and easy to operate on both single small VPS hosts and dedicated scaled-out PostgreSQL nodes.
Prerequisites
Documentation Map
Before modifying core subsystems, review:
- docs/ARCHITECTURE.md — SQL isolation, SQLite migration & crash recovery, crypto, and streaming job internals
- docs/API.md — HTTP + SSE endpoint contracts
- docs/DEPLOYMENT.md — Production environment, Dokploy, and scaling configuration
Local Development
bash
cd panel
bun install
# Terminal 1: API server (watch mode)
bun run dev:api
# Terminal 2: Vue 3 + Vite dev server
bun run dev:web(Note: Setting NODE_ENV=development and omitting PANEL_ADMIN_PASSWORD_HASH allows local dev iteration without login unless REQUIRE_AUTH=true is set.)
Quality Gates & Git Hooks
Tusk installs Husky git hooks automatically via bun install:
pre-commit: Runsbash -non shell scripts inscripts/andbun run typecheck(tsc --noEmit+vue-tsc --noEmit).pre-push: Runsbun run testandbun run build:web.
Before opening a pull request, verify all checks locally:
bash
docker compose --env-file .env.example config -q
cd panel
bun run typecheck
bun run test
bun run build:webGuidelines
- Preserve the Zero-Bloat principle: avoid heavy sidecar daemons (Prometheus, Redis, queues) when SQLite WAL or PostgreSQL primitives solve the problem cleanly.
- Any new SQLite column or table must be added as a forward-only additive migration inside
MIGRATIONSinpanel/apps/api/src/db/schema.tsusingaddColumnIfMissing— never modify existing migration versions destructively. - Use Conventional Commits (
feat:,fix:,refactor:,docs:,ci:). - Include targeted Bun tests in
panel/apps/api/src/for any new API, migration, backup, or security behavior.