Skip to content

Local Development

  1. Install dependencies:

    Terminal window
    bun install
  2. Run the dev server:

    Terminal window
    bun run dev # astro dev — http://localhost:4321
Script Command Purpose
dev astro dev Local dev server
build astro build Build to ./dist
preview bun run build && wrangler dev Preview on the Workers runtime
deploy bun run build && wrangler deploy Build + deploy to Cloudflare
generate-types wrangler types Regenerate Cloudflare types

Add a .mdx file under src/content/docs/; the sidebar picks it up automatically (autogenerated directories) or when you add it to a topic’s explicit item list in astro.config.mts.

---
title: Architecture
description: One-line summary shown in search and social cards.
sidebar:
order: 2 # position within an autogenerated directory
---

The landing page uses template: splash with a hero block; regular pages just use title / description / sidebar.order.

Each service folder follows the same three-page pattern — drop the file in and it sorts by sidebar.order:

  • index.mdxOverview (order: 1), starting with a <ServiceInfo> block.
  • architecture.mdxArchitecture (order: 2).
  • development.mdxLocal Development (order: 3).

Import Starlight components in MDX as needed:

import { Steps, Aside, Card, CardGrid, LinkCard, FileTree } from '@astrojs/starlight/components';
import ServiceInfo from '@/components/ServiceInfo.astro';
  • <Steps> for numbered setup, <Aside> for callouts, <FileTree> for structure, <CardGrid>/<LinkCard> for navigation.
  • Mermaid diagrams go in fenced ```mermaid blocks (rendered by astro-mermaid).

The site is a Cloudflare Worker (docs). bun run deploy builds with the Astro Cloudflare adapter and ships with wrangler. It deploys from main.