Architecture
Monorepo layout
Section titled “Monorepo layout”sawdust/├── projects/│ ├── doc-site/ # this site (Astro + Starlight)│ └── ... # other workspace packages├── bun.lock└── package.jsonRuntime stack
Section titled “Runtime stack”| Layer | Choice | Why |
|---|---|---|
| Package mgr | Bun | Fast install, native TS |
| Web server | Bun.serve | Built-in, no Express |
| DB driver | Bun.sql | Native Postgres |
| Doc site | Astro + Starlight | Vite bundler, ESM-first |
Build pipeline
Section titled “Build pipeline”bun installresolves workspace deps.- Each package runs its own
buildscript. - Static output deploys independently.
Data flow
Section titled “Data flow”flowchart LR A[Markdown source] --> B[Astro build] B --> C[Static HTML] C --> D[CDN] D --> E[User browser]