sale-company

Sale Company Starter

Cloudflare-first, Zvakho-style multi-tenant commerce starter for Zimbabwean solo operators and SMEs.

What is included

Architecture

Frontend uses static HTML/CSS/JS. It may know SUPABASE_URL and SUPABASE_ANON_KEY only.

Secrets stay inside the Worker:

Payment modes

Each tenant supports:

The customer experience stays unified. The Worker decides routing.

Data protection posture

This starter follows a lean compliance posture:

Deploy static frontend

Upload /public to Cloudflare Pages.

Deploy Worker

cd sale-company-starter
wrangler d1 create sale-company-db
# paste database_id into wrangler.toml
wrangler d1 execute sale-company-db --file=database/schema.sql
wrangler d1 execute sale-company-db --file=database/seed.sql
wrangler deploy

R2 asset folders

/tenants/{tenant_id}/branding/logo.webp
/tenants/{tenant_id}/banners/hero.webp
/tenants/{tenant_id}/products/{item_id}.webp
/tenants/{tenant_id}/services/{item_id}.webp

Next build steps

  1. Replace config values in public/assets/js/config.js.
  2. Add real Supabase login in login.html.
  3. Implement JWT verification in Worker.
  4. Add tenant role checks before all dashboard actions.
  5. Add Paynow payment creation and polling route.
  6. Add R2 signed upload route or Worker-mediated upload route.
  7. Add Cloudflare Cron route for booking reminders.