This is the source code for the Capgo website, built with Astro and deployed on Cloudflare Workers.
The repo is now a bun workspace with two Astro apps:
apps/web: the marketing site and product pagesapps/docs: the documentation site powered by Starlight
Both apps keep the current public URL structure on capgo.app, but they deploy as two different Cloudflare Workers:
apps/web/wrangler.jsonc: handles the main siteapps/docs/wrangler.jsonc: handles/docs*,/{locale}/docs*, and/_docs*
The docs worker uses a dedicated asset prefix (/_docs) so both Workers can coexist on the same domain without asset collisions.
- Live docs: https://capgo.app/docs/
- English docs content:
apps/docs/src/content/docs/docs - Localized docs content:
apps/docs/src/content/docs/<locale>/docs
Install dependencies once from the repo root:
bun installRun the marketing site locally:
bun run dev:webRun the documentation site locally:
bun run dev:docsDeployments are handled with wrangler deploy.
bun run deploy:webdeploys the main website workerbun run deploy:docsdeploys the documentation workerbun run deployis intentionally disabled so docs and web cannot be published together
The main deploy workflow only publishes one worker per push:
- docs-only changes publish the docs worker
- web-only changes publish the web worker
- mixed docs/web changes, or shared changes that affect both apps, must be split before merge and are rejected by the deploy workflow
Manual deployments also require choosing a single worker target, and production deploys are serialized so docs and web are never published at the same time.
Key folders and files in this repo:
/
├── apps/
│ ├── web/
│ │ ├── public/
│ │ ├── src/
│ │ │ ├── components/
│ │ │ ├── content/
│ │ │ │ ├── blog/
│ │ │ │ └── plugins-tutorials/
│ │ │ ├── pages/
│ │ │ ├── config/
│ │ │ └── content.config.ts
│ │ ├── astro.config.mjs
│ │ └── wrangler.jsonc
│ └── docs/
│ ├── public -> ../web/public
│ ├── src/
│ │ ├── components/
│ │ ├── content/
│ │ │ ├── docs/
│ │ │ └── i18n/
│ │ ├── css/
│ │ └── content.config.ts
│ ├── astro.config.mjs
│ └── wrangler.jsonc
├── messages/
├── scripts/
└── package.json
Astro routes for the website live in apps/web/src/pages/. The docs site is powered by Starlight in apps/docs/.
All commands are run from the repo root:
| Command | Action |
|---|---|
bun install |
Install workspace dependencies |
bun run dev:web |
Start the marketing site locally |
bun run dev:docs |
Start the docs site locally |
bun run build:web |
Build the website app |
bun run build:docs |
Build the docs app |
bun run build |
Build both apps |
bun run check |
Run astro check for both apps |
bun run preview:web |
Preview the website locally |
bun run preview:docs |
Preview the docs locally |
bun run deploy:web |
Deploy the website worker |
bun run deploy:docs |
Deploy the docs worker |
bun run deploy |
Fails intentionally to prevent deploying both workers together |
bun run astro -- --help |
Get help using the Astro CLI |
The repo uses scripts in scripts/ to maintain translated content.
When adding a new locale, the relevant content now lives in:
- Website pages and blog content under
apps/web/src - Documentation content under
apps/docs/src
Useful commands:
bun run setup:new:localebun run docs:translate_allbun run blogs:translate_allbun run plugins:translate_all
The source code is licensed under the GNU AFFERO GENERAL PUBLIC license. See the LICENSE file for details.
