Skip to main content

Development Setup

This page is for contributors and anyone who wants to run kbarr from source.


Prerequisites

  • Docker and Docker Compose
  • Go (see go.mod for the required version)
  • Node.js (LTS)
  • air — live reload for Go services
  • tmux

Setup

Clone the repository:

git clone https://github.com/kingbenny101/kbarr.git
cd kbarr

dev.env is included with sensible defaults. No changes are needed to get started.

Start all services in a tmux session:

make dev

This opens a tmux session called kbarr with each service in its own window:

WindowWhat runs
dbPostgreSQL + pgAdmin
coreMain API + frontend
metadataAniDB metadata service
indexerTorrent search service
downloaderDownload queue service

All Go services hot-reload on file changes via air. The frontend uses Vite's dev server.

To stop everything:

make dev-down

Running individual services

Start only the database:

make db # start
make db-down # stop

Run a specific service manually:

make run-core
make run-metadata
make run-indexer
make run-downloader
make run-frontend

pgAdmin is available at http://localhost:5050 — email: admin@local.dev, password: admin.


Tech stack

LayerTechnology
Backend servicesGo
FrontendReact, TypeScript, Mantine
DatabasePostgreSQL (via bun ORM)
APIhuma v2 (OpenAPI 3.0)
MetadataAniDB UDP/HTTP API
Torrent searchProwlarr API, kbdex API
Download clientqBittorrent Web API

Generating the API spec

The OpenAPI spec is generated from the running server:

go run ./cmd/genspec

To regenerate the docs API pages after updating the spec:

npm run gen-api-docs # from the docs/ directory