Skip to content

About

Create your own Real Estate website using the Emdash (Wordpress Alternative) from CloudFlare

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Latest commit

 

History

230 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmDash Property Web Builder

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.

Demo

Live demo deployment:

What This Repo Includes

  • 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

Deploy to Cloudflare

Architecture

  • 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

Main Routes

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

Local Development

Prerequisites

  • 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

Setup

pnpm install
cp .env.example .env

To use a PWB backend for listings, set PWB_API_URL in .env, for example:

PWB_API_URL=http://localhost:3000

Without 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.json

Start the app

Preferred development command:

pnpm dev

This wrapper starts astro dev and opens the dev-bypass admin URL automatically.

Important local URLs:

If you want the plain Astro dev server without the wrapper, you can also run:

npx astro dev

That runs on port 4321 by default.

Common Commands

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 deploy

Current Plugin Work

This repo now contains several PWB-related plugin efforts:

EmDash Patch Workflow

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:

Deployment

One-click deploy

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.

Manual deploy

pnpm build
pnpm run deploy

If you need to push the local SQLite CMS database into remote D1, use the repo script:

pnpm sync:prod-db

For a preview without making changes:

pnpm sync:prod-db --dry-run

Recommended "replace remote content with local content" flow:

pnpm sync:prod-db --backup --force-reset

That 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-access

That backs up the remote auth/setup tables, clears admin login state, and reopens the setup flow at:

For production deploys, also review:

  • DB D1 binding
  • MEDIA R2 binding
  • PWB_API_URL secret
  • optional PUBLIC_PALETTE theme var

Key Docs

Notes

  • changes to plugin registration or astro.config.mjs usually require a full dev server restart
  • emdash-env.d.ts is generated
  • with PWB_API_URL set, PWB must be reachable for live property pages and property embeds to resolve fully; without it, listings come from EmDash (docs/pwb-optional.md)

About

Create your own Real Estate website using the Emdash (Wordpress Alternative) from CloudFlare

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages