Built for people who think better out loud.
slipnote#
Monorepo layout:
frontend/: Astro frontendbackend/: Rust Axum backend
Frontend#
cd frontend
pnpm install
pnpm dev
Backend#
cd backend
cargo run
OAuth env vars#
The backend requires these OAuth settings to enable ATProto auth:
OAUTH_CLIENT_ID(e.g.https://your-app.com/oauth/client-metadata.json)OAUTH_REDIRECT_URI(e.g.https://your-app.com/oauth/callback)OAUTH_SIGNING_KEY(did:key private key for client assertions)
Generate a signing key with the built-in helper:
cd backend
cargo run --bin oauth_keygen
Set the output as OAUTH_SIGNING_KEY.
Optional settings:
SLIPNOTE_LOG_SAMPLE_RATE(defaults to1.0)OAUTH_BASE_URL(if set, derivesOAUTH_CLIENT_ID,OAUTH_REDIRECT_URI, andOAUTH_JWKS_URI)OAUTH_CLIENT_NAMEOAUTH_CLIENT_URIOAUTH_JWKS_URIOAUTH_SCOPES(defaults toatproto transition:generic)OAUTH_POST_AUTH_REDIRECT(defaults toOAUTH_BASE_URLwhen set, otherwise/)OAUTH_POST_AUTH_REDIRECT_ROUTE(if set, combines withOAUTH_BASE_URLwhen available)OAUTH_COOKIE_NAME(defaults toslipnote_session)OAUTH_SESSION_TTL_SECONDS(defaults to 7 days)PLC_HOSTNAME(defaults toplc.directory)
If you do not have a real URL for OAuth callbacks, expose the backend with ngrok:
ngrok http 3001
Then set OAUTH_BASE_URL to the ngrok HTTPS URL (for example, https://abc123.ngrok-free.app).
Tilt#
tilt up
Tilt runs the frontend dev server, Storybook, and the backend as local
resources. Tilt also launches a Postgres container and wires DATABASE_URL for
the backend. Set OPENAI_API_KEY for the backend and optionally override
SLIPNOTE_BACKEND_URL, DATABASE_URL, or PUBLIC_BACKEND_URL/
VITE_BACKEND_URL.