Skip to content

Development Setup

Prerequisites

  • Rust (stable, 1.85+) — rustup.rs
  • PostgreSQL 16
  • Python 3.12+ (for docs)
  • Node.js 20+ (optional, for SWC CLI during development)

Server

# Clone the repo
git clone git@git.dannyhaslund.dk:all_in_one/all_in_one.git
cd all_in_one/server

# Create a local database
createdb aio_dev
export DATABASE_URL="postgres://localhost/aio_dev"

# Run migrations
cargo install sqlx-cli --no-default-features --features postgres
sqlx migrate run

# Set remaining env vars
export JWT_SECRET="dev-secret-do-not-use-in-prod"
export JWT_ACCESS_TTL="15m"
export JWT_REFRESH_TTL="7d"
export BIND_ADDRESS="127.0.0.1:8080"
export RUST_LOG="debug"
export OPEN_API_KEY_SALT="dev-salt"

# Run the server
cargo run

Documentation

cd all_in_one/docs
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
mkdocs serve
# Open http://localhost:8000

PR Environments

When you open a PR that changes server/, the CI automatically spins up an ephemeral Docker environment on the runner (192.168.1.6). The PR comment will include the URL, which will be http://192.168.1.6:<port> where the port is 9000 + PR number.

These environments are torn down automatically when the PR is closed or merged.