An estate agency website built with EmDash and Property Web Builder, deployed on Cloudflare Workers.
Property listings, search, and enquiries come from the PWB Rails backend. Site content, blog content, admin UI, and editor workflows come from EmDash.
Live demo deployment:
- property search and detail pages powered by PWB
- EmDash-managed CMS pages and blog content
- EmDash admin UI for content editing
- a PWB properties admin plugin
- a PWB property embed plugin for inserting live listings into rich content
- a PWB valuation plugin workspace package
- MCP support via EmDash for AI-assisted workflows
- Cloudflare Workers deployment with D1 and R2
- Frontend: Astro
- CMS/admin: EmDash
- Listings backend: Property Web Builder (Rails API)
- Production runtime: Cloudflare Workers
- Production database: Cloudflare D1
- Production media storage: Cloudflare R2
- Local database: SQLite (
./data.db) - Local media storage: filesystem (
./uploads)
The split is intentional:
- PWB is the source of truth for listings and property search
- EmDash is the source of truth for editorial content and admin workflows
| Route | Purpose |
|---|---|
/ |
Homepage |
/properties |
Property search |
/properties/:slug |
Property detail |
/posts |
Blog archive |
/posts/:slug |
Blog post |
/pages/:slug |
CMS page |
/_emdash/admin |
EmDash admin |
/_emdash/api/mcp |
EmDash MCP endpoint |
- Node.js 26.8.1+ (pinned in
.tool-versions; asdf and CI both read it) - pnpm 10.28.0 (the version pinned in
package.json) - optionally, a running PWB backend; native EmDash listings work without it
pnpm install
cp .env.example .envTo use a PWB backend for listings, set PWB_API_URL in .env, for example:
PWB_API_URL=http://localhost:3000Without it, the site runs entirely on EmDash: listings come from the Properties
collection (import them from PWB with pnpm import:pwb-listings). See
docs/pwb-optional.md.
Seed the local database:
npx emdash seed seed/seed.jsonPreferred development command:
pnpm devThis wrapper starts astro dev and opens the dev-bypass admin URL
automatically.
Important local URLs:
- site: http://localhost:4321
- admin: http://localhost:4321/_emdash/admin
- admin bypass: http://localhost:4321/_emdash/api/setup/dev-bypass?redirect=/_emdash/admin
If you want the plain Astro dev server without the wrapper, you can also run:
npx astro devThat runs on port 4321 by default.
pnpm dev # wrapper around astro dev on port 4321
npx astro dev # plain dev server (no browser auto-open)
npx emdash seed seed/seed.json
pnpm export:d1-sql
pnpm sync:prod-db
pnpm reset:admin-access
pnpm test
pnpm test:run
pnpm build
pnpm run deployThis repo now contains several PWB-related plugin efforts:
-
docs/plugin-release-readiness.md Directory eligibility, release blockers, verification evidence, and preparation plan.
-
docs/pwb-properties-plugin.md Read-only PWB properties admin plugin.
-
docs/pwb-properties-plugin-write-capable.md Planned write-capable architecture for listing editing.
-
docs/pwb-properties-content-embedding.md Property embedding inside Portable Text content.
-
docs/pwb-valuation-plugin.md Valuation plugin work.
This repository carries a local pnpm patch for emdash@1.3.1 to preserve Portable Text
plugin block keys during inline-editor roundtrips. Upstream 1.1 already preserves custom
attributes; the patch also fixes locale-aware recent-post links.
That patch is tracked here:
Background and maintenance notes are documented here:
Use the Cloudflare deploy button above.
To use a PWB backend, set PWB_API_URL in the vars of your Wrangler config
and rebuild. Leave it empty for native EmDash listings. The value is read at
build time and compiled into the Worker, so a runtime
wrangler secret put PWB_API_URL does not switch the backend.
You will also need to configure your real D1 and R2 resources in wrangler.jsonc.
pnpm build
pnpm run deployIf you need to push the local SQLite CMS database into remote D1, use the repo script:
pnpm sync:prod-dbFor a preview without making changes:
pnpm sync:prod-db --dry-runRecommended "replace remote content with local content" flow:
pnpm sync:prod-db --backup --force-resetThat will:
- back up the current remote D1 database first
- clear remote table data
- import local data into the existing remote schema
If production admin access is lost because passkey state no longer matches the deployed DB, use:
pnpm reset:admin-accessThat backs up the remote auth/setup tables, clears admin login state, and reopens the setup flow at:
-
all rows in the affected auth tables are deleted, including all rows in
users -
https://emdash-property-web-builder.etewiah.workers.dev/_emdash/admin/setup
For production deploys, also review:
DBD1 bindingMEDIAR2 bindingPWB_API_URLsecret- optional
PUBLIC_PALETTEtheme var
- docs/development-guide.md
- docs/architecture.md
- docs/troubleshooting.md
- docs/admin-access-recovery.md
- docs/remote-content-and-mcp.md
- docs/product-roadmap.md
- changes to plugin registration or
astro.config.mjsusually require a full dev server restart emdash-env.d.tsis generated- with
PWB_API_URLset, PWB must be reachable for live property pages and property embeds to resolve fully; without it, listings come from EmDash (docs/pwb-optional.md)