Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,16 @@ jobs:
npx wrangler pages deploy dist
--project-name pegma-dev
--branch ${{ github.event_name == 'pull_request' && github.head_ref || 'main' }}
# Same triggers as production Pages (push/schedule/dispatch on main).
# Token must include Workers Edit in addition to Pages Edit — see
# docs/PROJECT_PLAN.md Phase 2.
- name: Deploy pegma-dev-api Worker
if: >
github.ref == 'refs/heads/main' &&
(github.event_name == 'push' ||
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch')
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Comment thread
FlyOverCoderKY marked this conversation as resolved.
Resolved
run: npx wrangler deploy -c worker/wrangler.jsonc
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ node_modules/
dist/
coverage/
*.tsbuildinfo
.wrangler/

.env
.env.*
!.env.example
worker/.dev.vars

.DS_Store
Thumbs.db
Expand Down
8 changes: 5 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ tested files or quoted with a source link. Do not invent example code for a
page — an example that was never executed is documentation that lies.

**Static until the plan says otherwise.** No backend, no state, no accounts
before the environment-test phase (Phase 4). When it arrives, its storage
goes through `@pegma/storage-core` over the D1 adapter — the adapter itself
lives in the storage-core repository, not here.
before the environment-test phase (Phase 4). A thin Workers API
(`worker/`, `pegma-dev-api`) may exist for logging and later Pegma
consumers; its storage goes through `@pegma/storage-core` over the D1
adapter — the adapter itself lives in the storage-core repository, not
here.

**Brand assets come from the kit.** Use the vendored assets (marks, lockups,
favicons, social card) with their license notes; do not redraw, restyle, or
Expand Down
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,40 @@ the ecosystem's second reference environment (the reference application,
retiregolden.org, runs the stack on Azure).

> [!IMPORTANT]
> Planning stage. The site is not built yet; see
> [docs/PROJECT_PLAN.md](docs/PROJECT_PLAN.md) for the plan.
> The public site is live at https://pegma.dev. See
> [docs/PROJECT_PLAN.md](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 thin **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.
- Eventually, the **portability exhibit**: a small real consumer on
Cloudflare Workers over a `storage-cloudflare-d1` adapter (which will
live in the storage-core repo and must pass the same conformance suite as
the Azure adapter).

## Worker logging

```sh
npm ci
npm run worker:deploy
# optional Datadog arm:
npx wrangler secret put DATADOG_API_KEY -c worker/wrangler.jsonc
# optional EU site:
npx wrangler secret put DATADOG_SITE -c worker/wrangler.jsonc
npm run worker:tail
```

`GET /health` on the Worker returns whether each sink is configured and
emits structured lines through the Pegma adapters.

## The content rule

This repository is public because everything in it ships to the internet
Expand Down
12 changes: 9 additions & 3 deletions docs/PROJECT_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ Actions deploy (SHA-pinned, per ecosystem standard), preview deploys on PRs.
Exit: push-to-main publishes; the domain serves the site with an A grade on
the obvious security headers. **Done:** project `pegma-dev`, deploys via
plain `npx wrangler` in the SHA-pinned workflow (the CI token is scoped to
Pages:Edit only — deliberately no DNS scope; the custom domain was attached
in the dashboard); security headers served from `public/_headers`, CSP with
`script-src 'none'`; `www` 301s to the apex.
Pages:Edit and Workers:Edit — deliberately no DNS scope; the custom domain
was attached in the dashboard); security headers served from
`public/_headers`, CSP with `script-src 'none'`; `www` 301s to the apex.

### Phase 3 — the compiled roadmap ✓ (2026-07-27)

Expand All @@ -186,6 +186,12 @@ dynamic slice on Workers consuming it. Exit: the conformance suite green on
a second real backend, and one production Pegma consumer running outside
Azure.

**Logging precursor (2026-07-27):** Worker `pegma-dev-api` is deployed with
`@pegma/logger-tee` → `@pegma/logger-cloudflare` + `@pegma/logger-datadog`.
Workers Logs (Cloudflare’s log store) is enabled via Wrangler
`observability.logs`. Datadog is optional until `DATADOG_API_KEY` is set.
Full Phase 4 storage consumer remains gated on the D1 adapter.

### Phase 5 — dogfood support

If Phase 4's slice was not support-desk: revisit hosting the site's contact
Expand Down
Loading