Skip to content

RealEstateWebTools/emdash_property_web_builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

108 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 18+
  • pnpm 10+
  • a running PWB backend

Setup

pnpm install
cp .env.example .env

Set PWB_API_URL in .env, for example:

PWB_API_URL=http://localhost:3000

Seed the local database:

npx emdash seed seed/seed.json

Start the app

Preferred development command:

pnpm dev

This wrapper starts npx emdash dev --port 4444 and opens the dev-bypass admin URL automatically.

Important local URLs:

If you want the raw EmDash dev server instead of the wrapper, you can also run:

npx emdash dev

That typically runs on port 4321.

Common Commands

pnpm dev                  # wrapper around emdash dev on port 4444
npx emdash dev            # direct EmDash dev server
npx emdash seed seed/seed.json
npx emdash types
pnpm export:d1-sql
pnpm sync:prod-db
pnpm reset:admin-access
pnpm test
pnpm test:run
pnpm build
pnpm 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@0.1.0 so Portable Text plugin blocks can persist arbitrary attributes during editor roundtrips.

That patch is tracked here:

Background and maintenance notes are documented here:

Deployment

One-click deploy

Use the Cloudflare deploy button above.

After deployment, configure the PWB backend URL:

wrangler secret put PWB_API_URL

You will also need to configure your real D1 and R2 resources in wrangler.jsonc.

Manual deploy

pnpm build
pnpm 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

  • pnpm dev and npx emdash dev are not identical in this repo.
  • changes to plugin registration or astro.config.mjs usually require a full dev server restart
  • emdash-env.d.ts is generated
  • PWB must be reachable for live property pages and property embeds to resolve fully

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors