Start hereOverviewPrerequisitesInstallationBootstrapAdministrationUsage & commands

Installation

Two supported paths — Docker Compose (recommended) and bare metal. Both run the same server binary against one Postgres database. The image builds against the committed .sqlx/ offline cache, so no DB is needed at build time, and the server applies migrations itself on first boot.

Path A — Docker Compose

Copy the env template and fill it in:

cp .env.example .env

Key variables:

POSTGRES_USER=orgplatform
POSTGRES_PASSWORD=change-me-in-production   # CHANGE before any remote deploy
POSTGRES_DB=orgplatform
# DATABASE_URL is used by BARE-METAL runs only; Compose builds its own from POSTGRES_*.
DISCORD_CLIENT_ID=...
DISCORD_CLIENT_SECRET=...
DISCORD_BOT_TOKEN=...
DISCORD_GUILD_ID=...
DISCORD_OAUTH_REDIRECT_URI=http://localhost:8080/auth/callback
BIND_ADDR=0.0.0.0:8080
SESSION_SECRET=...                          # openssl rand -base64 48

Then bring it up and watch for API listening:

docker compose up -d --build
docker compose logs -f server

Open http://localhost:8080/auth/login and sign in with Discord. If login resolves your identity, the stack is up — go to Bootstrap.

Compose vs. bare-metal DATABASE_URL. Compose builds its own DATABASE_URL from the POSTGRES_* vars pointed at the db service; the localhost value in .env is only for bare-metal cargo runs.

Path B — Bare metal (development)

cargo install sqlx-cli --no-default-features --features rustls,postgres
cp .env.example .env        # set DATABASE_URL, DISCORD_*, SESSION_SECRET
createdb orgplatform        # or point DATABASE_URL at an existing instance
sqlx migrate run            # applies migrations/
cargo run --bin orgplatform

Project gates to run before pushing (CI runs them with SQLX_OFFLINE=true):

cargo fmt --all --check
SQLX_OFFLINE=true cargo clippy -p orgcore -p server --all-targets -- -D warnings
cargo test -p orgcore -- --test-threads=1   # serial: parallel runs collide on shared PG
After adding any query!: run cargo sqlx prepare --workspace -- --all-targets and commit the updated .sqlx/ — CI builds offline. Migrations are forward-only; never edit an applied one.

Production notes

Next: Bootstrap.