The official documentation site for Stratal β a type-safe, modular framework purpose-built for Cloudflare Workers. Built with Astro and Starlight.
This repository contains the source for the Stratal documentation website. Stratal is a modular Cloudflare Workers framework featuring dependency injection, automatic OpenAPI documentation, queue consumers, cron jobs, and type-safe configuration.
If you're looking for the framework source code, see the strataljs/stratal repository.
- Introduction β Why Stratal
- Getting Started β Installation, first worker, project structure
- OpenAPI Documentation β Setup, route conventions, schemas, Scalar UI
- Core Concepts β Modules, controllers, dependency injection, providers, lifecycle hooks, configuration
- Guides β Validation, guards, middleware, error handling, environment typing
- Integrations β Queues, cron jobs, caching, storage, email, i18n, logging
- Testing β Testing module, HTTP testing, mocks and fakes
- API Reference β Auto-generated API docs
git clone https://github.com/strataljs/docs.git
cd docs
yarn install
yarn devThe dev server starts at http://localhost:4321.
| Command | Action |
|---|---|
yarn install |
Install dependencies |
yarn dev |
Start local dev server at localhost:4321 |
yarn build |
Build production site to ./dist/ |
yarn preview |
Preview production build locally |
yarn astro ... |
Run Astro CLI commands (astro add, astro check) |
βββ public/ # Static assets (favicon, images) served at root
βββ src/
β βββ assets/ # Processed assets (logo, images)
β βββ content/
β β βββ docs/ # Documentation pages (MDX/Markdown β URL routes)
β β βββ index.mdx # Homepage (splash template)
β β βββ core-concepts/
β β βββ getting-started/
β β βββ guides/
β β βββ integrations/
β β βββ openapi/
β β βββ testing/
β βββ styles/ # Custom CSS overrides
βββ astro.config.mjs # Astro + Starlight config (sidebar, plugins)
βββ tsconfig.json # TypeScript config (extends astro/tsconfigs/strict)
βββ package.json
Documentation content lives in src/content/docs/. File paths map directly to URL routes (e.g., core-concepts/modules.md β /core-concepts/modules/).
Contributions are welcome! Here's how to help improve the docs:
- Edit existing pages β Find the corresponding
.mdor.mdxfile insrc/content/docs/and make your changes. - Add new pages β Create a new Markdown or MDX file in the appropriate subdirectory. The file path determines the URL route.
- Update the sidebar β New pages need to be added to the
sidebararray inastro.config.mjsto appear in navigation. - File naming β Use kebab-case for file names (e.g.,
error-handling.md).
You can also edit any page directly on GitHub via the "Edit page" link at the bottom of each documentation page.
- Astro β Static site generator
- Starlight β Documentation theme for Astro
- Cloudflare Workers β Deployment adapter (
@astrojs/cloudflare) - Mermaid β Diagrams in documentation (
@pasqal-io/starlight-client-mermaid)
This project is licensed under the MIT License.