# TextASite - customer site hosting & deploy flow

**All customer sites are hosted on Cloudflare Pages.** (Adam's call, 2026-09-12. Replaces Vercel.)
Free, unlimited sites, unlimited bandwidth, commercial use allowed, free custom domains.
Vercel is now ONLY used for our own `tas-webhook` app (dashboard/webhooks).

Every finished build ships to `https://<project-name>.pages.dev`.

## Deploy a folder (any agent, any machine on this box)

    /app/data/tas/deploy_site.sh <project-name> <build-dir>

- creates the Pages project on first run, then pushes the folder
- self-contained: pulls wrangler via `npx`, nothing needs to be on PATH
- resolves creds itself: env vars -> /app/data/cloudflare.json -> the "Cloudflare"
  entry in /app/data/credentials.json

## Publish for a customer (preferred - also updates their record + verifies live)

    /app/data/tas/publish_site.py <build-dir> --phone +447xxxxxxxxx [--project name] [--stage review|live]

- deploys to Cloudflare Pages
- curls the live URL and refuses to touch the customer record unless it returns 200
- sets `site_url`, `stage` and `host=cloudflare-pages` on the tas-customers record
- project name defaults to a slug of the customer's business name

## Full pipeline (template -> content -> deploy)

    /app/agents/1xscnt61/deploy_customer_site.py <phone>

Builds the builder-basic template with the customer's content, static-exports it and
deploys via the helper above. No Vercel token needed any more.

## Live sites

| customer | project | url |
|---|---|---|
| LA Junk Removal | la-junk-removal | https://la-junk-removal.pages.dev |
| Berkshire Waste | berkshire-waste | https://berkshire-waste.pages.dev |

Site sources are kept at /app/agents/tmpivk86/sites/<project>/.

## Custom domains (when a customer wants their own)

    npx wrangler pages project create ... # already done by the helper
    npx wrangler pages deployment ...     # or add the domain in the dashboard
    # then point the customer's DNS CNAME at <project>.pages.dev

## Creds
account id `03a7324645194a85985a3807234ba068`; token in /app/data/cloudflare.json and in
the Cloudflare entry of /app/data/credentials.json.
