Architecture

The public site, service app, API, and shared UI package are separated by deploy target and responsibility.

Surfaces

docs/ is the public website and documentation surface. It uses Astro and ships static assets for the primary public host, such as netstamp.dev. The landing page is rendered as a React island only because it reuses interactive visual components.

web/ is the app service itself. It uses React Router on the app host, such as app.netstamp.dev, and keeps product authentication separate from the public site.

packages/ui/ contains reusable React primitives and shared design tokens. Cross-surface UI like GlobalFooter belongs there.

Request Flow

The backend exposes HTTP routes under /api/{version} with chi. The public API contract is authored in TypeSpec, emitted to OpenAPI, and served by the backend for the docs API explorer.

text
Browser -> app host -> web/ React app -> /api/v1/* -> chi -> application service -> PostgreSQL/TimescaleDB

Routing

The public host owns /, /docs/*, /openapi/, and /storybook/ through the Astro static build served by GitHub Pages. The app host owns the React app routes such as /login, /register, /dashboard, /projects/*, /probes, and /settings; /api/* on that host is proxied to the Go controller.