Docs menuGetting started

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 Ubuntu apt 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, or apt 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

bash
just setup    # .env, Postgres, migrations, npm install
just dev      # API on :8787, SPA on :5173 — ctrl-c stops both

just setup does four things and is safe to re-run:

  1. Copies .env.example to .env if there is no .env yet (an existing one is left alone).
  2. Starts Postgres 17 from docker-compose.yml on localhost:5433 and waits until it accepts connections.
  3. Applies the migrations in api/migrations/.
  4. Runs npm install in web/.

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
Get LaunchCrate