Prerequisites
Make sure you have the following installed:
- Rust (latest stable) — rustup.rs
- Topcoat CLI —
cargo install topcoat-cli --version 0.10.0 --locked - Bun — bun.sh (for Tailwind CSS)
- Docker — for PostgreSQL and Mailpit
Quick Start
Clone the repository
git clone https://github.com/hauju/smiet-dx.git
cd smiet-dxBootstrap your env file
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)BASE_URL— Your app's base URL (default:http://localhost:8080)
Start infrastructure
docker compose up -dThis starts:
- PostgreSQL on port
5432 - Mailpit with SMTP on
1025and web UI on8025
Install frontend dependencies
bun installRun the development server
just tw
PORT=8080 topcoat dev --bin smietThe app will be available at http://localhost:8080. The dev server rebuilds and restarts on Rust changes; run just tw again after changing classes.
Project Commands
| Command | Description |
|---|---|
PORT=8080 topcoat dev --bin smiet |
Start the development server; rebuilds on Rust changes |
cargo build --release --bin smiet && topcoat asset bundle --release --bin smiet |
Production build (binary + asset bundle) |
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 |
Tailwind is not watched by the dev server: run the Tailwind CLI (or just tw) after changing classes, then restart the server.
Environment Variables
Core Settings
DATABASE_URL— PostgreSQL connection stringBASE_URL— Public URL of your applicationSESSION_SECRET— Hex-encoded session signing key (64+ bytes)SECURE_COOKIES— Set totruein production (HTTPS)
Sign-in
smiet runs its own login: an emailed code proves the address, passkeys are verified by the app itself (the Relying Party id is BASE_URL's host). Nothing to configure beyond BASE_URL and SMTP.
TRUST_PROXY_HEADERS— Set totruewhen behind a reverse proxy
Email (SMTP)
SMTP_HOST— SMTP server hostSMTP_PORT— SMTP port (default:1025for Mailpit)SMTP_USER— SMTP username (optional for Mailpit)SMTP_PASSWORD— SMTP password (optional for Mailpit)SMTP_FROM— Sender email address
Voice and automatic sorting
Both use an OpenAI-compatible API (Mistral by default).
STT_API_KEY/STT_BASE_URL/STT_MODEL— speech-to-text for the capture micTRIAGE_API_KEY/TRIAGE_BASE_URL/TRIAGE_MODEL— automatic sorting; leave the key blank to disable itHONCHO_URL/HONCHO_API_KEY/HONCHO_WORKSPACE_ID— per-user sorting memory via Honcho; leave both URL and key blank to disable itSTT_DAILY_LIMIT/TRIAGE_DAILY_LIMIT/EMBED_DAILY_LIMIT— per-user daily caps (defaults200/500/1000)STT_MONTHLY_LIMIT_FREE|PAID/TRIAGE_MONTHLY_LIMIT_FREE|PAID— monthly allowance byusers.plan(defaults30/50free,1000/3000paid)ENTITLE_SECRET_KEY,ENTITLE_WEBHOOK_SECRET(endpoint<BASE_URL>/webhooks/entitle),ENTITLE_PRODUCT_MONTHLY|YEARLY, optionalENTITLE_URLandPLAN_PRICE_MONTHLY|YEARLY— sells the paid plan through entitle (App Store in the app, Creem on the web); unset, the Settings card says plans are not on saleSTT_MAX_BYTES_FREE|PAID— largest recording per plan (defaults ~3 / ~15 minutes)EMBED_MODEL— embedding model for search, defaultmistral-embed(usesTRIAGE_API_KEY)
Connections
ENCRYPTION_KEY— base64 32-byte key (openssl rand -base64 32) that encrypts saved connection tokens. Keep it stable.
Local development
DEV_LOGIN— set totrueto add a "Dev login (local only)" button to/loginthat signs in asdev@localhostwithout an email code. Debug builds only; never set it in production.
Sentry (optional)
Requires building with --features sentry.
SENTRY_DSN— Sentry project DSNENVIRONMENT— environment tag (e.g.,development,production)