DOCS / GETTING STARTED
Quick start
Two commands, just setup and just dev, take a fresh clone of
LaunchCrate to a running API and SPA. You need a handful of tools
installed first.
Prerequisites
- Rust (stable) and Cargo
- OpenSSL headers, for passkeys: on macOS
brew install openssl@3, on Debian or Ubuntuapt install pkg-config libssl-dev - Node.js 26 and npm (the version CI and the Dockerfile use)
- Docker with Compose, for the development Postgres
- just, the task runner:
brew install just,cargo install just, orapt install just - sqlx-cli, for migrations and the offline query cache:
cargo install sqlx-cli - mdBook (only for
just docs/just check):cargo install mdbook - python3, only if you use the module generator
Two commands
just setup # .env, Postgres, migrations, npm install
just dev # API on :8787, SPA on :5173 — ctrl-c stops bothjust setup does four things and is safe to re-run:
- Copies
.env.exampleto.envif there is no.envyet (an existing one is left alone). - Starts Postgres 17 from
docker-compose.ymlon localhost:5433 and waits until it accepts connections. - Applies the migrations in
api/migrations/. - Runs
npm installinweb/.
just dev starts cargo run in api/ and npm run dev in web/ side by
side. Vite proxies /api (and the server-rendered /blog, /sitemap.xml,
and /robots.txt) to http://localhost:8787 (web/vite.config.ts), so in
development the SPA and the API share an origin and cookies flow without
any CORS setup. Set API_PROXY_TARGET to proxy to an API elsewhere. The
browser tests use it to run their own API on :8788.
[ full guide ]
The rest of this guide comes with the repo.
- Email in development
- Becoming a superadmin locally
- Without just
- Optional local services
- Troubleshooting