From 6ff2c0b92286fe642c7dfeefdf9b3aa20c2e9d9c Mon Sep 17 00:00:00 2001 From: Forge Date: Wed, 2 Dec 2026 22:16:49 +0000 Subject: [PATCH] Mercator 2.0: vision, non-goals and starter stack Greenfield base for the 2.0 beast. README frames the shift from atlas downloads to self-serve intelligence; docs/vision.md sets goals, non-goals and phased delivery; INGREDIENTS.md proposes the starter stack and what stays out. Live v1.0 untouched. --- INGREDIENTS.md | 56 ++++++++++++++++++++++++++++++++ README.md | 47 +++++++++++++++++++++++++++ docs/vision.md | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 INGREDIENTS.md create mode 100644 README.md create mode 100644 docs/vision.md diff --git a/INGREDIENTS.md b/INGREDIENTS.md new file mode 100644 index 0000000..c0f815b --- /dev/null +++ b/INGREDIENTS.md @@ -0,0 +1,56 @@ +# Ingredients — Mercator 2.0 starter stack + +The pantry for the first cook. Every ingredient below is either already proven on this +VPS or is a deliberate, small upgrade. Nothing here is installed yet; this is the +proposal to argue with before we build. + +## The stack at a glance + +| Layer | Choice | Why | +| --- | --- | --- | +| Pages | Hand-written HTML + CSS + vanilla JS, no build step | Proven on v1.0: fast, zero toolchain, easy to review and cache-bust | +| App shell (only if needed) | Vite + TypeScript, static output | Adopt when search state or components outgrow plain pages, not before | +| API | Node.js 22, first pass zero-dependency `node:http`; graduate to Fastify | v1.0's order backend is a single zero-dep `server.js`; keep that until routes and validation justify a framework | +| Data store | SQLite (WAL) for orders and saved slices | One VPS, one file, trivial backup and rollback; Postgres only if concurrency demands it | +| Atlas data | Immutable snapshot files (Parquet/CSV) + manifest with SHA-256 | Every number reproducible; no live mutation of source data | +| Search | SQLite FTS5 over a loaded snapshot, or in-memory index for the first slice | Sub-300 ms queries without a search cluster | +| Email / delivery | Resend, as used by the v1.0 order form | Already proven, one env var, no new vendor | +| Reverse proxy | nginx + Let's Encrypt (certbot) | Existing pattern on this VPS; per-site config in `sites-available` | +| Runtime | systemd unit per service, dedicated low-privilege user | Matches helm, meridian and mercator-order conventions | +| Deploy | Forgejo repo + deploy key + `main` auto-deploy timer + health check | Same shape as Helm, but gated: staging first, prod only on release tag | +| Backups | Nightly SQLite `.backup` + snapshot archive, verified with `quick_check` | A backup that is not verified is a rumour | +| Observability | `/health` JSON, systemd journal, nightly disk check | Enough to answer "is it up and is it full" in one command | +| Secrets | root-owned env file (640, group = service user) | Never in git, never in chat | + +## Reused from v1.0 (same patterns, new paths) + +- Static site served straight from a directory, assets fingerprinted or cache-busted + by query string. +- Small Node order API behind `location /api/` in nginx, bound to `127.0.0.1` only. +- Resend for transactional mail, recipient and sender in env. +- systemd `Restart=on-failure`, `NoNewPrivileges=true`, separate working directory. +- Forgejo on this VPS as the source of truth, SSH on port 2222 for deploys. + +## Deliberately not in the pantry + +- No SPA framework, no client-side router, no state library at the start. +- No Kubernetes, no second VPS, no managed database. +- No direct writes to the live v1.0 tree, database, order service, nginx site or DNS. +- No payment provider wired until the Phase 2 gate passes. +- No analytics that ship customer data off-box. +- No secrets in the repo, ever. + +## First cook — Phase 1 definition of done + +1. A staging host or path exists that is not `mercator.analystpaneru.site`. +2. Atlas snapshot pinned, hashed and readable by the search service only. +3. Search page returns filtered results in under 300 ms for 100 sample queries. +4. `/health` reports service version, snapshot hash and record count. +5. One-command deploy and one-command rollback, both exercised once. +6. v1.0 untouched: same bytes, same order flow, same uptime through the whole phase. + +## Open choices to settle before Phase 1 + +- Staging on a subdomain (`v2.analystpaneru.site`) vs a path on the existing site. +- Search in SQLite FTS5 vs a prebuilt JSON index for the first slice. +- Whether the first slice is public-read with paid export, or auth-only. diff --git a/README.md b/README.md new file mode 100644 index 0000000..68b76c1 --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# Mercator 2.0: Rise of the Beast + +**Sydney commercial intelligence, rebuilt without a leash.** + +Mercator 1.0 proved the thesis: 9,316 Sydney businesses, 61 fields each, audited for +pixel gaps, DMARC exposure and real mobile reach — and people paid for it. It is four +static pages and a form. It works. It also stops at "here is a file in your inbox". + +Mercator 2.0 is the beast that comes after the atlas. Same data spine, same city, +same ruthless focus on what a business actually needs — but the product is alive: +searchable, self-serve, delivered in seconds, and priced for people who want an +answer rather than a download. + +## The one-line vision + +> Turn the Sydney atlas from a dataset people buy into a live intelligence layer +> people use every day. + +## What is in this repo + +| Path | What it is | +| --- | --- | +| `docs/vision.md` | Goals, non-goals, product shape and the phases to get there | +| `INGREDIENTS.md` | The starter stack, why each piece is there, and what we deliberately leave out | + +This is a **greenfield base**, not a copy of the live site. The live +`mercator.analystpaneru.site` (v1.0) keeps running untouched while 2.0 is cooked here. + +## Ground rules + +1. **The live site is sacred.** Nothing in this repo deploys to v1.0. v2 gets its own + path, its own service and its own release gate. +2. **Ship the answer, not the machinery.** Every screen should end in a decision or a + delivery, not a dashboard. +3. **Proof over promise.** Every claim about coverage, freshness or reach must be + traceable to a dated snapshot. +4. **Small, reversible moves.** One change, one deploy, one rollback path. + +## Status + +Incubation. First commit is the vision and the pantry. The first working slice lands +next: a read-only atlas search on a staging host, behind auth, with the v1.0 data +snapshot pinned and hashed. + +--- + +*Built on the openclaw VPS. Git: `leaszenos/mercator-2-0` on Leas Git.* diff --git a/docs/vision.md b/docs/vision.md new file mode 100644 index 0000000..d4426b2 --- /dev/null +++ b/docs/vision.md @@ -0,0 +1,86 @@ +# Mercator 2.0 — Vision + +Status: draft for the team, 2026-12-02. +Owner: Ada (product and scope). Infra: Forge. + +## North star + +A Sydney operator opens Mercator 2.0, types the kind of business and suburb they care +about, sees the live picture — who is there, how reachable they are, what they are +missing digitally — and either buys the slice or books the conversation. No CSV email, +no waiting for a human, no guessing whether the record is current. + +## Why now + +Mercator 1.0 already sells. It validates demand with: + +- 9,316 audited Sydney business records +- 61 structured fields per record +- 5 packs from a free 50-lead sample to a full A$4,500 licence +- Real, dated audit signals: Meta pixel gaps, DMARC exposure, direct mobile reach + +The gap is not data. The gap is **access and experience**. Today the product ends at a +download; every buyer needs a human to confirm and deliver. 2.0 removes that human +from the happy path. + +## Goals + +1. **Self-serve discovery.** Search and filter the atlas by suburb, category, size and + digital gap signals without a sales call. +2. **Instant, honest delivery.** A paid slice is generated from the pinned snapshot and + delivered in the same session — with the snapshot date and record hashes attached. +3. **A product that feels like a weapon.** Dark, fast, dense, confident. The visual + language changes; the evidence does not. +4. **One data spine.** v1.0 and 2.0 read the same versioned snapshot until 2.0 is + signed off, so there is no "which numbers are real" argument. +5. **Operable by one person.** One VPS, one deploy path, one backup, one health check. + +## Non-goals (for this phase) + +- Rewriting or redeploying the live v1.0 site, order backend, nginx or DNS. +- Real payments and tax invoicing on day one. The first slice is read-only and gated; + checkout is designed, not switched on, until pricing and refund rules are settled. +- Scraping new sources or expanding beyond Sydney before the search experience is + proven. +- Multi-tenant accounts, team seats, or an API for resellers. +- Migrating customer data from v1.0. There is none to migrate yet beyond orders. + +## Product shape + +1. **Atlas search** — the beast's front door. Full-width, instant, maps suburbs to + counts and gaps. +2. **Record dossier** — one business, every signal, provenance and freshness shown. +3. **Slice builder** — pick filters, see the record count and price update live. +4. **Delivery** — signed download or CRM push, generated on demand from a pinned + snapshot. +5. **Ops surface** — health, deploy version, snapshot version, backup status, visible + to the team only. + +## Phases + +- **Phase 0 — Pantry (this commit).** Repo, vision, ingredient list. No runtime. +- **Phase 1 — Read-only atlas.** Static shell + search API over a frozen snapshot, on + a staging host behind auth. Success: 100 sample queries under 300 ms, zero writes to + v1.0. +- **Phase 2 — Slice builder and delivery.** Filter-to-slice, price preview, gated + download with snapshot manifest. +- **Phase 3 — Checkout.** Real payment, instant fulfilment, refund path. Only after + the gate in Phase 2 passes. +- **Phase 4 — Beast mode.** Freshness pipeline, alerts on new digital gaps, recurring + intelligence instead of one-off packs. + +## Decision log + +| Date | Decision | Why | +| --- | --- | --- | +| 2026-12-02 | New repo, new deploy path; v1.0 frozen | Protect live revenue while 2.0 is built | +| 2026-12-02 | Static-first shell, zero-build by default | Proven on v1.0; fastest path to a real screen | +| 2026-12-02 | One pinned snapshot per release | Every number must be reproducible | + +## Open questions + +- Does "beast" mean a darker bolder identity, instant buy-now, or a bigger searchable + data story — or all three? The phases assume all three, in that order. +- Is the first paid slice a download or a hosted view? +- Which snapshot becomes the 2.0 baseline: the 22 November 2026 atlas, or a fresh + brew?