> This document is authoritative. If implementation contradicts this guide, update the guide or refactor the code.- Astro is the default rendering system
- MDX is the default page format
- USWDS is the default design system
- We ship zero client-side JavaScript unless required
- React is used only for interactivity
- Content must be editable by non-developers when possible
- Routing must remain file-based
- Performance is a primary architectural concern
When building UI components, follow this order:
- Native HTML + USWDS classes
- Astro component
- React USWDS component (
@trussworks/react-uswds) - Custom React component
All static pages live in:
src/pages/**/*.mdx
- Layouts
- Dynamic routes
- Pages requiring server logic
Allowed collections:
- news
- events
- publications
Static pages do NOT belong in src/content.
Default: no hydration.
Allowed directives:
client:visible(preferred)client:idleclient:media
Avoid client:load unless justified.
- React for static UI
- Wrapper pages for MDX
- Using collections for static pages
- Global overrides of USWDS
- Building custom React components when USWDS already provides one
If it can be built with Markdown, MDX, Astro, and USWDS — it must be.