This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
cargo build # compile
cargo run # run the server (reads .env automatically)
cargo test # run all tests
cargo test <name> # run a single test by name
cargo clippy # lint
cargo fmt # format
Single-binary Actix Web API. Entry point is src/main.rs, which:
.env via dotenvy at startupAPP_ENV (development | production) and PORT from the environment127.0.0.1:<PORT> in development, example.com:<PORT> in productionHttpServerRoutes are registered as Actix handler functions decorated with #[get(...)] / #[post(...)] etc. and passed to App::new().service(...). As the API grows, handlers should be split into modules under src/ and re-exported for registration in main.
.env is read at runtime (not compile time). Required variables:
| Variable | Description |
|---|---|
APP_ENV |
development or production |
PORT |
numeric port, e.g. 8000 |
DATABASE_URL |
Postgres connection string, e.g. postgres://user:password@localhost/torus |
JWT_SECRET |
Secret key used to sign and verify JWTs |