SvelteKit app for reviewing and syncing AI translation suggestions to Phrase. Runs on Node with a local SQLite database (better-sqlite3).
pnpm install
pnpm devThe dev server stores its SQLite file at ./data/db.sqlite (created automatically). Override with DB_PATH if needed.
Auth is disabled locally unless AUTH_SECRET is set — then all routes require the password (or Authorization: Bearer <secret>).
AUTH_SECRET=dev-secret pnpm devRun tests:
pnpm test
pnpm checkpnpm build # → ./build (adapter-node output)
node build # runs on PORT (default 3000)The repo ships with a multi-stage Dockerfile that pnpm-installs, compiles better-sqlite3 natively, builds the SvelteKit app, and produces a slim Node 22 runtime image.
Setup steps (UI):
- Push this repo to GitHub/GitLab and link it to your Northflank project.
- Create a combined service → build type Dockerfile, dockerfile path
/Dockerfile, build context/. - Ports: expose
3000as public HTTP. - Environment variables:
AUTH_SECRET— required for auth (set as a secret).DB_PATH— optional, defaults to/data/db.sqlite(matches the volume mount).NODE_ENV— already set toproductionin the image.
- Persistent volume: attach a volume mounted at
/data(any size — SQLite is small). Without this the DB resets on every redeploy. - CI: enable build-on-push for the branch you want to deploy from.
The SvelteKit Node adapter reads PORT and HOST from env; Northflank injects PORT automatically.
- Single-node only: one container reads/writes the SQLite file. Don't horizontally scale this service — set replicas to 1.
- To inspect the DB on a running container, use
northflank execand runsqlite3 /data/db.sqlite. - Backups: snapshot the volume, or hit
GET /api/export(authenticated) to dump SQL.