hatk build
Build the frontend for production using Vite.
hatk buildCompiles and bundles the SvelteKit frontend in app/ into optimized production assets.
Deployment
To run in production:
Build the frontend:
bashhatk buildStart the server:
bashhatk startConfigure environment variables for production:
bashRELAY=wss://bsky.network \ DATABASE=data/hatk.db \ PORT=3000 \ hatk start
See Configuration for all available environment variables.
SQLite in production
hatk uses SQLite for all data storage. The DATABASE environment variable sets the path to the database file. In production, make sure this path points to a persistent volume.
Railway
Railway is a good fit for hatk apps. To deploy:
Push your project to a Git repository
Create a new Railway project linked to that repo
Add a persistent volume mounted at
/dataSet environment variables:
DATABASE=/data/hatk.db RELAY=wss://bsky.network PORT=3000Set the start command to
hatk start
Railway will build and deploy automatically on push. The SQLite database file persists across deploys via the mounted volume.