How it works¶
Astro 7 in SSR mode (@astrojs/node, standalone) with React 19 islands, Tailwind 4, a
node:sqlite cache and a JSON config file. No database server, no auth. Consumers run
landschaft dev straight after installing; production needs landschaft build before
landschaft start.
bin/landschaft.js— the CLI. Points Astro'srootat the installed package, so the bundledastro.config.mjsandsrc/are used while config and cache come from the directory the command runs in.src/lib/pacts/— contracts shared by server and client, one module per noun or port:config.ts(config zod schemas and upgrades),web.ts(API request shapes),issues.ts,views.tsandsync.ts(runtime data shapes),filter.ts(the filter language).src/lib/links/config/file.ts— load and atomic save oflandschaft.config.json.src/lib/links/db/sqlite.ts— SQLite schema and queries (issues, blockers, labels, failed CI jobs, sync state).src/lib/links/forge/github/— GraphQL transport (client.ts, token fromGITHUB_TOKENorgh auth token), issue and PR sync queries (issues.ts) and failed CI jobs (ci.ts).src/lib/specs.ts— business constants the sync obeys (full-sync age,sinceoverlap, rate floor, idle pause); onlymillsread them.src/lib/mills/sync.ts— theSyncer: sequential, incremental and full passes, and which repo syncs next: the stalest pastrefreshMinutes, one per the interval split by the repos.src/lib/gates/timer/node.ts— the timer that asks theSyncerfor a due sync every five seconds.src/lib/mills/board.ts— the pure board builder. Everything about placement lives here and is unit-tested against fixtures.src/lib/inits.ts— one DB handle, GitHub client and timer per process, booted bysrc/middleware.tson the first request and surviving Vite HMR; also the view and nav data read over them.src/pages/api/**— thin JSON endpoints wrapped inroute()from_route.ts; each names the service errors it answers and with which status.src/lib/client/— fetch wrappers,useBoard(polling), URL filters.src/components/board/,src/components/settings/— React islands mounted withclient:only="react"fromsrc/pages/d/[id].astroandsrc/pages/settings.astro.
Why these shapes:
- Labels as the only state on GitHub. No Projects board, no custom fields: a dashboard is a view over labels any repo already has, and works for repositories you do not own.
- Sequential sync. GitHub's GraphQL budget is per token; running repositories one after another keeps the board usable instead of fast-then-throttled.
- Cache in SQLite, truth on GitHub. The database is disposable; deleting it costs one full sync.