Skip to content

Add PlanX Digital Planning scenario#144

Merged
chrisns merged 3 commits into
mainfrom
feat/planx-scenario
Mar 24, 2026
Merged

Add PlanX Digital Planning scenario#144
chrisns merged 3 commits into
mainfrom
feat/planx-scenario

Conversation

@chrisns
Copy link
Copy Markdown
Member

@chrisns chrisns commented Mar 24, 2026

Summary

  • Full NDX:Try scenario for PlanX — the open-source digital planning platform by Open Systems Lab, used by 18+ UK councils (Lambeth, Southwark, Camden, Buckinghamshire, etc.)
  • Deploys 4 ECS Fargate services (Hasura GraphQL, Node.js API, ShareDB, React Editor) + Aurora PostgreSQL Serverless v2 + CloudFront
  • StackSet ndx-try-planx already created in hub account and tested in sandbox
  • Docker images published to GHCR: ghcr.io/co-cddo/ndx_try_aws_scenarios-planx-{hasura,api,sharedb,editor}:latest

What's included

  • CDK infrastructure (cloudformation/scenarios/planx/cdk/) — 7 constructs: networking, database, compute, storage, cloudfront, main stack
  • Docker overlays (docker/) — Hasura with entrypoint wrapper (DNS wait + extension creation + seed data), API with demo auth bypass, Editor with domain validation patch, ShareDB
  • Website content — scenario entry in scenarios.yaml, landing page, 5-step walkthrough, completion page
  • 12 screenshots — CloudFormation outputs, demo login, team selector, flow editor, preview, Hasura console, ECS cluster, RDS, CloudFront
  • GitHub Actions workflow for building images to GHCR
  • BLUEPRINT.md for ISB registration

Key architecture decisions

  • Single CloudFront distribution with ALB path-based routing (no Caddy proxy — path stripping was unreliable)
  • Hasura native paths (/v1/*, /v2/*, /console/*) routed directly to engine on port 8080
  • Lambda custom resource generates passwords (Secrets Manager dynamic refs don't resolve in CFN Outputs)
  • Demo auth patched into API server.ts before CORS middleware, with own body-parser
  • Editor built with VITE_APP_ENV=sandbox (avoids Airbrake crash) and CloudFront/ALB domain validation patch

Test plan

  • Stack deploys to CREATE_COMPLETE via StackSet in sandbox account
  • Demo login works (generates JWT, redirects to editor)
  • PlanX editor loads, shows NDX Demo Council team with sample flows
  • Flow editor renders with drag-and-drop nodes
  • Preview shows applicant-facing view
  • Hasura console accessible with admin secret
  • GraphQL API responds to queries
  • Passwords shown in plaintext in CloudFormation Outputs
  • GHCR images public and pullable
  • Website pages render correctly with screenshots

chrisns added 2 commits March 24, 2026 11:17
Full NDX:Try scenario for PlanX — the open-source digital planning
platform used by 18+ UK councils. Deploys as a StackSet (ndx-try-planx)
with 4 ECS Fargate services, Aurora PostgreSQL, and CloudFront.

Architecture:
- Hasura GraphQL (with 374 migrations + seed data)
- Node.js API (with demo auth bypass for sandbox)
- ShareDB (real-time collaborative editing)
- Editor SPA (React/Vite served by nginx)
- Aurora PostgreSQL Serverless v2 (PostGIS, pgcrypto, fuzzystrmatch, pg_cron)
- Single CloudFront distribution with ALB path-based routing

Includes CDK infrastructure, Docker overlays, GHCR build workflow,
5-step walkthrough with screenshots, BLUEPRINT for ISB registration,
and seed data (NDX Demo Council team with sample planning flows).
- Hasura: copy entrypoint-wrapper.sh to build context
- API: use patch-demo-auth.sh to apply overlay (copies demo-auth.ts
  to modules/auth/ and patches server.ts imports)
@chrisns chrisns enabled auto-merge March 24, 2026 11:59
Accept main's digital-planning-register (order 11), append planx (order 12).
@chrisns chrisns added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit 5941035 Mar 24, 2026
9 checks passed
@chrisns chrisns deleted the feat/planx-scenario branch March 24, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant