Operations & Configuration
Tasuku runs as a Cloudflare Worker with D1 and a Durable Object. Configuration and operational scripts live at the repo root; deployments are performed by the maintainer.
Runtime configuration
Section titled “Runtime configuration”wrangler.jsonc— Worker config: themainentry (src/worker.ts, which re-exports theSyncInboxDurable Object), thedurable_objectsbinding + migration, and D1 bindings. The DO binding is repeated underenv.staging(non-inheritable) (ADR-011).- Bindings are the only way Worker code reaches external resources (D1, the DO) — injected via
envat request time (constitution §7.8). - Secrets (e.g. Clerk keys) are provided via
.dev.varslocally and Wrangler secrets in deployed environments;.dev.vars*are never committed. - Environments — production (
tasuku-db) and an isolatedtasuku-stagingWorker +tasuku-db-staging(spec 020).
Build & local CI
Section titled “Build & local CI”Key package.json scripts:
| Script | Purpose |
|---|---|
dev | astro dev |
build | astro build + service-worker patch (scripts/build-sw.mjs) |
db:migrate:local | apply D1 migrations locally (never --remote from the assistant) |
test / test:e2e | Vitest unit/contract; Playwright E2E |
ci:local | the full local mirror of the CI gates |
npm run ci:local runs install → validate (typecheck/lint/format/test) → build → docs site (build + coverage, spec 022) → supply-chain (SBOM, osv-scanner incl. the docs-site lockfile, npm-audit, gitleaks). It is the single verification the project relies on locally.
Deployment
Section titled “Deployment”- The app Worker is deployed with Wrangler by the maintainer (
wrangler deploy; staging vianpm run deploy:staging). D1 migrations are applied withdb:migrate:*. - The documentation site (this site) is built with
npm run build --prefix docs-siteand deployed by the maintainer as a separate Cloudflare Pages project — independent of the app Worker (ADR-012).
CI-cost discipline
Section titled “CI-cost discipline”The project runs on a hard compute cap. Assistant commits use [ci skip] and git push -o ci.skip, only to non-default, MR-free branches; the maintainer opens merge requests and performs all merges and deploys. ci:local is the only verification the assistant relies on (CONTRIBUTING → “CI cost discipline”).
Supporting tooling (not individual module guides)
Section titled “Supporting tooling (not individual module guides)”Several knowledge-graph communities are tooling/governance rather than runtime modules and are summarized here rather than given their own guides: the GitLab CI pipeline (spec 006), supply-chain scanners (ADR-007), spec-kit workflow/shell helpers, Renovate config, dependency sets, npm scripts, and the i18n message catalogs (en/de; ADR-008). The repository’s test suites (unit/contract/E2E) are likewise cross-cutting and documented alongside the subsystems they exercise.