Home
Menu

Installation

Run your own smiet server locally for development

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

1

Clone the repository

bash
git clone https://github.com/hauju/smiet-dx.git
cd smiet-dx
2

Bootstrap your env file

bash
just bootstrap

This 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)
3

Start infrastructure

bash
docker compose up -d

This starts:

  • PostgreSQL on port 5432
  • Mailpit with SMTP on 1025 and web UI on 8025
4

Install frontend dependencies

bash
bun install
5

Run the development server

bash
just tw
PORT=8080 topcoat dev --bin smiet

The 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

Environment Variables

Core Settings
  • DATABASE_URL — PostgreSQL connection string
  • BASE_URL — Public URL of your application
  • SESSION_SECRET — Hex-encoded session signing key (64+ bytes)
  • SECURE_COOKIES — Set to true in 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 to true when behind a reverse proxy
Email (SMTP)
  • SMTP_HOST — SMTP server host
  • SMTP_PORT — SMTP port (default: 1025 for 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 mic
  • TRIAGE_API_KEY / TRIAGE_BASE_URL / TRIAGE_MODEL — automatic sorting; leave the key blank to disable it
  • HONCHO_URL / HONCHO_API_KEY / HONCHO_WORKSPACE_ID — per-user sorting memory via Honcho; leave both URL and key blank to disable it
  • STT_DAILY_LIMIT / TRIAGE_DAILY_LIMIT / EMBED_DAILY_LIMIT — per-user daily caps (defaults 200 / 500 / 1000)
  • STT_MONTHLY_LIMIT_FREE|PAID / TRIAGE_MONTHLY_LIMIT_FREE|PAID — monthly allowance by users.plan (defaults 30 / 50 free, 1000 / 3000 paid)
  • ENTITLE_SECRET_KEY, ENTITLE_WEBHOOK_SECRET (endpoint <BASE_URL>/webhooks/entitle), ENTITLE_PRODUCT_MONTHLY|YEARLY, optional ENTITLE_URL and PLAN_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 sale
  • STT_MAX_BYTES_FREE|PAID — largest recording per plan (defaults ~3 / ~15 minutes)
  • EMBED_MODEL — embedding model for search, default mistral-embed (uses TRIAGE_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 to true to add a "Dev login (local only)" button to /login that signs in as dev@localhost without an email code. Debug builds only; never set it in production.
Sentry (optional)

Requires building with --features sentry.

  • SENTRY_DSN — Sentry project DSN
  • ENVIRONMENT — environment tag (e.g., development, production)