Prerequisites
Make sure you have the following installed:
- Rust (latest stable) — rustup.rs
- Dioxus CLI —
curl -sSL http://dioxus.dev/install.sh | sh - Bun — bun.sh (for Tailwind CSS)
- Docker — for PostgreSQL and Mailpit
Quick Start
1
Clone the repository
bash
git clone https://github.com/hauju/smiet-dx.git
cd smiet-dx2
Bootstrap your env file
bash
just bootstrapThis copies .env.example to .env and generates a fresh SESSION_SECRET for you.
Then edit `.env` to set the rest:
- `DATABASE_URL` — PostgreSQL connection string (default: `postgres://smiet:smiet@localhost:5432/smiet`)
- `FERRISKEY_URL` / `FERRISKEY_REALM` / `FERRISKEY_CLIENT_ID` / `FERRISKEY_CLIENT_SECRET` — Your FerrisKey instance, realm, and OIDC client
- `BASE_URL` — Your app's base URL (default: `http://localhost:8080`)
3
Start infrastructure
bash
docker compose up -dThis starts:
- PostgreSQL on port 5432
- Mailpit with SMTP on 1025 and web UI on 8025
4
Install frontend dependencies
bash
bun install5
Run the development server
bash
dx serve --addr 0.0.0.0The app will be available at http://localhost:8080. The dev server auto-reloads on code changes and runs Tailwind CSS automatically.
Project Commands
| Command | Description |
|---|---|
dx serve --addr 0.0.0.0 |
Start development server with hot reload |
dx build --release --platform web |
Production build |
bunx @tailwindcss/cli -i tailwind.css -o ./assets/tailwind.css |
Build Tailwind CSS manually |
cargo fmt --all -- --check |
Check formatting |
cargo clippy --workspace --all-targets -- -D warnings |
Lint |
cargo machete |
Detect unused dependencies |
Note
The dx serve command automatically compiles Tailwind CSS. You only need to run the Tailwind CLI manually for CI builds or when dx serve is not running.