Spectrum 3847's lab training, safety, and tool-use documentation portal. Every machine SOP, storage location, consumable (with real prices and reorder links), and maintenance checklist for the lab lives here.
Built with Astro + Starlight, themed to match spectrum3847.org.
npm install
npm run dev # http://localhost:4321
npm run build # static build to dist/| Path | What it is |
|---|---|
src/content/docs/ |
All content pages (MDX), organized by shop area |
src/components/ |
Custom components: MachineSOP, ToolProcurementCard, PreFlightChecklist, ConsumablesTable, FilamentCard, DrawerLayoutMap, LabGalleryImage, … |
src/data/ |
The data layer: tools-procurement.json, consumables.json, filaments.json, storage-locations.json, maintenance.json, lab-photos.json |
src/assets/lab/ |
Lab photos (resized from the SmugMug gallery) |
astro.config.mjs |
Sidebar navigation & Starlight config |
- Add/edit a consumable: edit
src/data/consumables.json— the ledger page and every machine page's consumables table update automatically. - Update a price or reorder link: edit
src/data/tools-procurement.json. - Add a page: create the
.mdxundersrc/content/docs/and add its slug to the sidebar inastro.config.mjs. - Add lab photos:
node scripts/import-lab-photo.mjs <source> <name.jpg>resizes intosrc/assets/lab/, then add an entry tosrc/data/lab-photos.json.
Deployed to Cloudflare Workers (static assets) at lab.spectrum3847.org.
Auto-deploy is handled by Cloudflare Workers Builds, connected directly to
this GitHub repo — every push to main builds and deploys automatically. There
is no GitHub Actions workflow and no CLOUDFLARE_API_TOKEN secret in the repo;
Cloudflare holds the credentials on its side.
Cloudflare runs these commands (configured in the Workers Builds dashboard):
npm run build # build command
npx wrangler deploy # deploy commandwrangler.jsonc stays in the repo — that is the config wrangler deploy reads
for the worker name, the dist/ assets directory, and the
lab.spectrum3847.org custom domain.
.nvmrc pins the build to Node 24 (Cloudflare's current default, and what the
image preinstalls). Astro 7 needs Node 20+, so this keeps a future default bump
from silently changing the build runtime.
To deploy by hand (rarely needed):
npm run build
npx wrangler deploy