Skip to content

Latest commit

 

History

History
84 lines (68 loc) · 3.16 KB

README.md

File metadata and controls

84 lines (68 loc) · 3.16 KB

pegma.dev

License: MIT

The website for Pegma: what the stack is, the roadmap across its components, and usage examples — deployed on Cloudflare as the ecosystem's second reference environment (the reference application, retiregolden.org, runs the stack on Azure).

Important

The public site is live at https://pegma.dev. See docs/PROJECT_PLAN.md for phases.

What this repo is

  • An Astro static site (Cloudflare Pages) presenting the Pegma component ecosystem: per-component summaries, a roadmap compiled at build time from each repo's public PROJECT_PLAN.md so it cannot drift, and composition examples lifted from real code.
  • A Workers API (worker/, script pegma-dev-api) that wires Spine logging through @pegma/logger-tee → Cloudflare Workers Logs + Datadog. Workers Logs persistence is enabled via Wrangler observability (the Cloudflare log store). Datadog ships when DATADOG_API_KEY is set as a Worker secret.
  • The portability exhibit: the account API composes @pegma/storage-cloudflare-d1@0.4.7, @pegma/sessions, @pegma/identity@0.1.2, and @pegma/authorization-identity@0.4.0 through worker/src/identity-runtime.ts. Current dependency selections are recorded in package.json and pnpm-lock.yaml; the Support composition snapshot distinguishes the current public graph from historical qualification receipts.
  • Environment runbooks for a synthetic Bench Ticket demo (email-code identity, sessions, mail catcher, support desk, health): https://pegma.dev/runbooks.

Local development

Stock Node 22/24 ships Corepack but not a pnpm shim. Node 25+ does not bundle Corepack; install it first.

npm install -g corepack
corepack enable
pnpm install --frozen-lockfile
pnpm run check
pnpm test
pnpm run build

Worker logging

npm install -g corepack
corepack enable
pnpm install --frozen-lockfile
pnpm run worker:deploy
# optional Datadog arm:
pnpm exec wrangler secret put DATADOG_API_KEY -c worker/wrangler.jsonc
# optional EU site:
pnpm exec wrangler secret put DATADOG_SITE -c worker/wrangler.jsonc
pnpm run worker:tail

GET /health on the Worker uses @pegma/health (process + logging sink booleans), returns the shared JSON shape, and emits health.ok through the Pegma adapters with the checks registered today.

/account is the static account shell. Its same-origin /api/identity/* contract supports passkey sign-in and enrollment, email-code sign-in through an injected delivery provider, server-side session revocation, and no-store account reads. The checked-in Worker does not assume or purchase an email provider.

The content rule

This repository is public because everything in it ships to the internet anyway. The corollary is absolute: if a document could not appear on pegma.dev, it does not enter this repository. Private planning lives elsewhere, permanently.

License

Site code: MIT © RetireGolden, LLC. Brand assets carry their own license notes.