Skip to content

App structure

All paths below are under apps/cosmos/digital-services/ unless noted.

LocationPurpose
src/pages/Route ownership — add or change Astro routes here (*.astro, dynamic routes, robots.txt.ts, etc.).
src/layouts/Shared page shell, global scripts, SEO/layout defaults. Layout.astro is the main integration point.
src/components/App-local components; prefer @cosmos/ui-astro (and siblings) before adding new local abstractions.
src/scripts/contact-form/Active contact-form browser logic with dedicated tests.
src/scripts/forms/Parallel / partially duplicated form layer — treat changes as high risk until ownership is clarified (some paths are stubs).
src/__tests__/Jest unit and integration tests.
e2e/Playwright smoke and user-flow coverage.
tests/Standalone performance and Core Web Vitals scripts (*.mjs).
workers/Gateway and image workers plus wrangler.*.toml.
public/Static assets copied to output; includes _headers and _redirects.
  • Layout-wide nav, auth link switching, theme boot, SEO defaultssrc/layouts/Layout.astro.
  • Maintenance modesrc/middleware.ts.
  • Protected routes, session/logout APIs, /api/* gateway behaviorworkers/auth-gateway.js and matching wrangler.gateway.toml routes/vars.
  • Outgoing mail tool UIsrc/pages/portal/outgoing-mail.astro (plus env for worker URL; see Environment variables).
  • Scripts the team runs in CI/localpackage.json (canonical entry points).
  • apps/cosmos/digital-services/package.json
  • apps/cosmos/digital-services/src/
  • apps/cosmos/digital-services/e2e/
  • apps/cosmos/digital-services/tests/
  • apps/cosmos/digital-services/workers/