Skip to content

Latest commit

Β 

History

History
101 lines (73 loc) Β· 4.59 KB

File metadata and controls

101 lines (73 loc) Β· 4.59 KB

Stratal Documentation

Built with Starlight Built with Astro License: MIT

The official documentation site for Stratal β€” a type-safe, modular framework purpose-built for Cloudflare Workers. Built with Astro and Starlight.

Live Site

stratal.dev

Overview

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.

Documentation Sections

  • 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

Local Development

Prerequisites

  • Node.js (v22 or later)
  • Yarn (v4 β€” included via Corepack)

Setup

git clone https://github.com/strataljs/docs.git
cd docs
yarn install
yarn dev

The dev server starts at http://localhost:4321.

Commands

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)

Project Structure

β”œβ”€β”€ 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/).

Contributing

Contributions are welcome! Here's how to help improve the docs:

  1. Edit existing pages β€” Find the corresponding .md or .mdx file in src/content/docs/ and make your changes.
  2. Add new pages β€” Create a new Markdown or MDX file in the appropriate subdirectory. The file path determines the URL route.
  3. Update the sidebar β€” New pages need to be added to the sidebar array in astro.config.mjs to appear in navigation.
  4. 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.

Tech Stack

  • Astro β€” Static site generator
  • Starlight β€” Documentation theme for Astro
  • Cloudflare Workers β€” Deployment adapter (@astrojs/cloudflare)
  • Mermaid β€” Diagrams in documentation (@pasqal-io/starlight-client-mermaid)

License

This project is licensed under the MIT License.