Files

41 KiB
Raw Permalink Blame History

MapListing — design notes (v1.1.0)

Goal

Let customers put their products — and, once LinkedProducts v2 lands, their shops — on the map at map.smithandtech.space, with admin approval in between. A user submits a location for their product or shop in Paymenter; it sits pending; an admin approves it in the Paymenter admin; only then does it appear as a pin on the map. Nothing goes live without admin approval.

Proper Paymenter extension: installable through the extension system, no core-file edit, no edit to the live theme files. Same patterns as LinkedProducts v1.0.0 and ShareButtons v1.0.0.

Owner-confirmed 2026-11-19: the map, its listings and its signups are already hosted on pve0 (CT 116 maps-listings, with CT 113 osm-georgia behind it). This extension does NOT build a new map backend. It is a bridge: Paymenter submission + approval on one side, the existing pve0 map system on the other.

What map.smithandtech.space is today (verified 2026-11-19)

Verified from the live site (text crawl) and the Smith & Tech Space blog (blog.smithandtech.space, two posts about the map):

  • "Smith & Tech Maps", beta v1 / Staging v3. A hyper-local map built for Atlanta and the state of Georgia. OpenStreetMap data, Smith & Tech's own Georgia tile server, routing from OSRM.
  • Multi-stop driving directions: tap the map to drop waypoints (A, B, C…), reorder/remove on the fly, one OSRM request for the whole route, total distance/duration, per-leg summary, turn-by-turn directions. A built-in "Try a 3-stop demo" exists.
  • Privacy-first, account-free route sharing: a route is just a link — ?route=lat,lon;lat,lon… encodes only waypoint coordinates. Opening the link re-requests the route from OSRM and draws it. No account, no saved list, nothing stored on a server. Places have the same pattern: ?place=ID, so a place store with IDs already exists (or is at least designed in).
  • Community listings and routes are "on the way", not live. The blog describes the plan: users who sign in via Authentik can submit Business Listings (categories Restaurants, Gas, ATMs, Shopping — coordinates, addresses, descriptions, optional photos), publish community routes, and submissions go through an approval queue. The second post is explicit that "search, walking and cycling modes, and community listings are still on the way." So today the map has no live listings feature and no public submission flow — the Paymenter extension is what brings listings to it. The map side will need a small ingest/publish surface (see §8); that work is on the map app, not in this extension, and its exact shape is unverified until CT 116 is inspected (see §14).

What runs on pve0 for the map (verified from memory + live checks)

  • CT 116 maps-listings — the map app container. INSPECTED 2026-11-20 ~23:15 (read-only, nothing changed): the container is running but the map app is NOT running — no app process, no systemd unit, only TCP 22 (sshd) and 25 (Postfix) listening; http://10.0.0.237:3002/api/health connection refused. Stack: Python 3.13.5, standard library only; app is /srv/maps-listings-routes/server.py (213 lines, ThreadingHTTPServer, binds 0.0.0.0 on env PORT, default 3002) + static frontend public/index.html; LAN IP 10.0.0.237 (DHCP); routing geometry from OSRM at http://10.0.0.137:5000. Data store: flat JSON file /srv/maps-listings-routes/data.json — currently ZERO listings and zero routes (counters show 2 listings + 1 route existed before; Nov 5 backups remain). Auth: Authentik OIDC (issuer https://auth.smithandtech.space, 3 admin users); POST /api/listings needs a real user OIDC Bearer token and creates pending listings. There is NO POST /api/v1/places and NO signed GeoJSON feed — the string "places" does not occur in server.py; the extension's designed ApiPublisher push cannot work against this app as-is. The v1.0.1 push integration (see §15) adds a service-token /api/v1/places endpoint to server.py, a systemd service so the app runs and survives reboots, and a Gitea repo for the map app source (it lives only on the container today). The map app's source may live only on the container, or under another owner/name.
  • CT 113 osm-georgia — the Georgia OSM data backend. 6 GiB RAM cap, swap pinned at its 1 GiB cap since at least Oct 31. A 6-day-plus osm2pgsql/Postgres import was running on 2026-11-09. This is almost certainly what feeds the Georgia tile server and (potentially) a gazetteer/geocoder. Whether a Nominatim/Photon instance runs on it, and whether the import ever finished, is unverified.
  • CT 115 authentik — the identity provider the blog says map sign-in uses. Owner-stopped 2026-11-09 (with 7 other containers) and, as far as records show, never restarted. Consequence: the map's own Authentik sign-in path is down today. The Paymenter extension must NOT depend on it: Paymenter is the source of truth for these listings, and the submitter is a Paymenter user. Restarting Authentik is a separate owner decision, not part of this extension.
  • pve0 host constraint: all containers share one 1 TB WD Blue 5400 rpm laptop HDD, I/O-saturated since 2026-11-08 (owner decision: leave as-is, new equipment coming). Keep the bridge light: small payloads, async/queued sync, no polling loops, short timeouts.

Extension shape (chosen)

Type: "Other" extension (Paymenter\Extensions\Others\MapListing, base class App\Classes\Extension\Extension). It is not a payment method and provisions nothing, so "Other" is correct — same call as LinkedProducts.

Storage: one dedicated table, ext_map_listings. Created by the migration in database/migrations via ExtensionHelper::runMigrations() in installed() and upgraded(), rolled back in uninstalled() — the documented pattern, same ext_ prefix the bundled Affiliates/Announcements extensions use. No core table is touched. Columns:

Column Notes
id PK
uuid public idempotency key, generated on create; sent to the map as the listing's stable external ID
user_id FK to users, the Paymenter user who submitted
subject_type product or shop (shops arrive with LinkedProducts v2; v1 ships product only, column ready)
subject_id product ID, or shop ID/slug once shops exist
name display name for the pin (defaults to the product/shop name, editable)
category from the admin-configured category list (default: Restaurant, Gas, ATM, Shopping — the map blog's four — plus General)
address free-text address as entered, nullable
latitude / longitude decimal(10,7), nullable until geocoded/pinned
description nullable, short text for the pin card
image_url nullable, URL only in v1 (same limit as LinkedProducts v1)
website_url nullable; defaults to the product/shop URL on the store
price / currency nullable; copied from the product at submit time for the pin card
status pending / approved / declined / withdrawn / unpublished, default pending
source admin / user, default user for submissions
submitter_name / submitter_email nullable, snapshot from the Paymenter user
map_place_id the ID the map returns on publish, nullable until published
map_url full ?place=ID URL once published, nullable
sync_status synced / pending_sync / failed, default pending_sync
sync_error last publish/update failure message, nullable
reviewed_by / reviewed_at admin who approved/declined, nullable
timestamps
index on (subject_type, subject_id, status); index on (status) for the admin queue

Admin UI: a Filament resource, not a config form — same reasoning as LinkedProducts: per-listing CRUD plus an approve/decline queue cannot be expressed in getConfig() fields. Paymenter auto-discovers Filament resources from extensions/Others/<Name>/Admin/Resources while enabled. MapListingResource appears under the Extensions group. Mirror the bundled Affiliates resource (Filament v4 API). A policy (MapListingPolicy, mirroring AffiliatePolicy) enforces registered admin.map_listings.view/create/update/delete permissions. The resource shows a queue view (pending first), approve/decline actions, a mini-map or lat/lon display per row, the published map link once live, and sync status with a retry action on failures.

Injection: web middleware, registered in boot() — same as LinkedProducts/ShareButtons (ExtensionHelper::registerMiddleware(…, 'web')). The middleware only acts on GET products.show and linkedproducts.shop responses with status 200 + text/html: it injects a "Find it on the map" block (a link to the published pin, or a "List this product on the map" submit link when the visitor owns the product / is signed in) just before </main> (fallback </body>). On a shop page it falls back to the maplisting::shop-block partial when the shop page did not include it, and offers the submit form to the shop's owner only (v1.1.0 — the owner-only decision is recorded in the v1.1.0 section below). Everything is wrapped in try/catch and returns the original response on any exception — the storefront must never break because of this extension.

Submission routes: routes/web.php loaded from boot(). Signed-in users only (unlike LinkedProducts, whose form is public — a map pin is tied to a real product/shop and a real location, so the submitter must be a Paymenter user who owns or is linked to it):

  • GET /map-listings/submit/product/{product} — form for a product.
  • GET /map-listings/submit/shop/{shop} — form for a shop (live in v1.1.0; resolved by slug, 404 when the shop is missing, when submissions are disabled, when shop listings are off, or when LinkedProducts is not installed). The form is the product form parameterized for the shop; a shop listing carries no price.
  • POST to the same paths — stores the submission as pending / source user, throttled (throttle:10,60 per IP + per user), redirects with ?submitted=1. Only whitelisted fields are read; the request can never set status, source, user_id, map_place_id or sync_status.
  • GET /map-listings/mine — the signed-in user's own submissions with status (pending / live with map link / declined), and a withdraw action for pending ones.

Submission flow — what the user enters

The form asks for, in order:

  1. What — the product (pre-filled from the page they came from) or shop (v2). Name defaults to the product/shop name, editable.
  2. Category — dropdown from the admin-configured list.
  3. Where — pick on the map, first; type an address, second. The form embeds a small map (Leaflet against the store's own tile server if configured, else OSM tiles) with a draggable pin: the user taps/drags to the exact spot and the lat/lon fields fill in. An address field sits beside it for users who prefer typing; typing an address geocodes it and moves the pin (see §9). Either path ends with explicit coordinates — a listing is never stored with address-only and no coordinates, because the map needs a pin. If the user only types an address and geocoding fails, the form tells them to drop the pin manually instead of failing silently.
  4. Description (optional, short) and photo URL (optional, v1).
  5. Submit → pending. The user sees "Waiting for admin approval" and their submission on /map-listings/mine.

Validation: lat −90…90, lon −180…180, both required; address ≤ 255 chars; description ≤ 500 chars; URLs must be http(s); category must be in the configured list; one pending/approved listing per (user, subject) — a second submission for the same product/shop edits the existing one instead of creating a duplicate.

Approval flow

  1. Submission lands pending in ext_map_listings and appears at the top of the Filament queue (badge count on the resource).
  2. Admin opens it: sees the product/shop, submitter, category, address, coordinates (mini-map preview), description, photo. Admin may edit any field — including nudging the pin — before deciding.
  3. Approve → status approved, reviewed_by/at set, and the extension publishes to the map (§8). On publish success, map_place_id, map_url and sync_status=synced are stored; the submitter can see the live pin link on /map-listings/mine and the product page shows "Find it on the map". On publish failure the listing stays approved with sync_status=failed + sync_error, and the admin can retry from the resource — approval is never lost because the map was briefly unreachable.
  4. Decline → status declined, optional reason shown to the submitter. Nothing is sent to the map.
  5. Later changes: editing an approved listing re-publishes the update to the map (same uuid, same map_place_id). Withdrawing (user) or unpublishing (admin) sends a delete/unpublish to the map and sets status withdrawn / unpublished. Deleting the underlying product (or shop) cascades: the listing is unpublished from the map first, then the row is removed — a deleted product must not leave a dead pin behind. v1.0.1: the delete dispatch lives on the model's updated / deleting hooks, so EVERY path that leaves the approved state removes the pin — the admin edit form's status field and the admin delete action both bypass unpublish(), and before the hooks they left orphan pins. unpublish() itself no longer dispatches (that would send the delete twice).

Data flow: Paymenter → pve0 map (recommendation)

Recommendation: Paymenter pushes approved listings to the map over HTTPS, async, with a small documented API contract the map app must expose. Reasons: Paymenter owns the approval decision, so it should be the actor that publishes; push is immediate (no polling delay, no stale pins); the payload is tiny (one JSON object per listing); and it keeps the map app's existing read paths untouched — the map only gains one ingest endpoint.

The contract (to be confirmed against CT 116 — see §14):

  • POST {map_base_url}/api/v1/places with header Authorization: Bearer {map_api_token} and JSON body: {uuid, name, category, latitude, longitude, address, description, image_url, website_url, price, currency, source: "paymenter"}. Returns {place_id, url} (the ?place=ID URL).
  • PUT {map_base_url}/api/v1/places/{place_id} — update, same body.
  • DELETE {map_base_url}/api/v1/places/{place_id} — unpublish.
  • All three idempotent on uuid (re-POSTing the same uuid updates rather than duplicating) so retries are safe.

Display surfaces — everywhere the maps are used (owner requirement 2026-11-19, generalized). The design principle is: one approved-listings source that every maps surface reads from, so a listing approved once shows up everywhere the maps are used. Submissions come from the Paymenter site only. The approved set lives in Paymenter (ext_map_listings, approved rows); every surface reads that one set:

  1. The maps site (map.smithandtech.space) — reads the approved set via the publish push (§8) or the GeoJSON feed.
  2. The maps app — reads the same set, if it shares the site's backend/API; if it does not, it needs its own connection to the same source (its own endpoint, or the same GeoJSON feed).
  3. A maps section on the Paymenter site itself (smithandtech.com, GET /map-listings) — reads the approved rows directly from the extension's own table. No external call.
  4. Any other surface where Smith & Tech maps appear — must read the same approved set; an inventory of every such surface is owed (open item §14).

The single source is what makes "approved once, everywhere" true. The GeoJSON feed (/map-listings/feed.geojson) is the canonical read surface for any maps surface that can fetch a feed; the push API is the write path into a map backend that already has a place store. Which mechanism each surface uses is decided per surface at the CT 116 inspection — but no surface may carry its own separate copy of the listings that can drift from the approved set.

What is verified vs not. Paymenter maps section: reads the extension's own table — CONFIRMED by construction. Maps site: which mechanism fits (push API or feed) — UNVERIFIED until CT 116 is inspected. Maps app: whether it shares the site's backend/API — UNVERIFIED. Other surfaces: whether any exist beyond these three, and what each reads — UNVERIFIED (inventory owed).

Business location: list it on the map, show it on the shop (owner requirement 2026-11-19). Two linked features, one source:

  1. "List my business location on the map" — the submission option itself, framed for businesses. On a product page (and, once shops exist, on the shop page) the owner finds the "List on the map" option; the form collects the business information that goes on the map listing: business name, category, address, description, photo URL, website. That is exactly the submission flow in §6 — no extra fields, no separate business profile: the listing IS the business location record.
  2. The location shown on the business's own shop — once shops exist (LinkedProducts v2), the shop page shows the location too: a small map/pin block (maplisting::shop-block) rendered from the same approved listing. One source, shown on the shop and on every maps surface — the shop block never carries its own copy of the location.

The shop display reads the same approved listing the maps surfaces read, so approving once updates the shop block, the maps site, the maps app, the Paymenter maps section, and every other surface together. In v1 shops do not exist yet, so the shop block ships as a partial the shop page will include once shops land; the middleware injects on products.show only, and gains a shop-route branch when the shop route exists.

Open questions (need LinkedProducts v2's shop identity settled): shop route name and parameters; the shop's stable ID/slug for subject_id; where on the shop page the block goes (theme decision, with v2); whether the shop owner or only the admin can trigger the listing from the shop page.

How the push runs: a queued Laravel job (PublishMapListing) dispatched on approve/edit/unpublish, with 3 retries and backoff. The request runs from CT 119 (Paymenter) to the map's public URL (https://map.smithandtech.space) by default — same-host LAN is possible only if CT 116's LAN IP and port are confirmed and a LAN route is approved; the public URL works today with no new network path, and the payloads are small enough that the pve0 disk saturation does not matter. Timeout 10 s; failure is recorded, never fatal to the admin action.

Fallbacks, in order, if CT 116 has no write API today:

  1. GeoJSON feed the map polls (recommended fallback). The extension exposes a signed, cacheable endpoint on Paymenter, GET /map-listings/feed.geojson (or a static file regenerated on every approve/edit/unpublish), listing all approved pins as a GeoJSON FeatureCollection. The map app adds a layer that fetches it. No auth needed beyond a long random token in the URL; no code on the map side beyond one fetch. Downside: pins appear only when the map reloads/refetches (acceptable — listings change rarely).
  2. Shared database. Only if the map app already reads its places from a database Paymenter can reach (e.g. the same Postgres on CT 113). Rejected as the primary path: it couples Paymenter to the map's internal schema, needs DB credentials on the storefront, and breaks the moment the map changes its tables.
  3. Manual export. Admin downloads a CSV/GeoJSON from the Filament resource and imports it into the map by hand. Last resort only; the owner direction is automation ("The goal is for all of this to be done automatically").

Decision point before build: inspect CT 116 from the Proxmox shell (§14) and confirm which of push-API / GeoJSON-feed fits what is actually running. The extension is designed so the transport is one swappable class (MapPublisher interface, ApiPublisher + FeedPublisher implementations) — the rest of the extension does not change whichever transport wins.

Geocoding (address → coordinates)

Recommendation: pin-drop first, geocoding second, self-hosted where possible.

  • Primary path is the draggable pin on the submission form — no geocoding call at all, no cost, no external dependency, exact coordinates.
  • When the user types an address, geocode it server-side at submit time (not in the browser, so no key is exposed) and move the pin; the user confirms the pin before submitting.
  • Geocoder of choice: Nominatim against the OSM data already on pve0 if an instance exists on CT 113 (it holds the Georgia import; a local Nominatim would be free, private, and fast on LAN). This is unverified — confirm from the shell whether Nominatim/Photon runs there.
  • If no local geocoder exists: public Nominatim (nominatim.openstreetmap.org), free, no key, usage policy 1 req/s. Acceptable at this volume (a handful of submissions a day), with server-side caching of address → coordinates in a small table so a repeat address never re-queries. The extension must send a real User-Agent identifying Smith & Tech and respect the rate limit (queue + 1 s spacing). If volume ever grows, the paid step is a self-hosted Nominatim — not a commercial API key.
  • Never use Google Maps / Mapbox geocoding in v1: paid, needs a key the buyer would have to supply, and contradicts the open-source-only map stack the owner already runs.
  • The geocoder base URL is a config value (§12), so a buyer with their own Nominatim just points the extension at it.

What each pin / listing shows on the map

The map's place card for a published listing (rendered by the map app from the published payload):

  • Name (heading) and category (chip/icon).
  • Address as entered, plus "Get directions" — a link that opens the map's own routing with this pin as the destination (the map already does multi-stop routing; the pin just seeds it).
  • Description (short) and photo if supplied.
  • Price if it is a product listing (e.g. "$15/mo" for a Minecraft tier) — copied from the product at submit time; a shop listing shows no price.
  • "View product" / "Visit shop" button — links back to the product page or the shop URL on smithandtech.com, opening in a new tab. The map drives traffic back to the store; it never sells anything itself.
  • "Listed by" — the shop/product owner's display name, not their email. No personal data (no email, no phone, no exact home address unless the submitter typed one — the form warns that the address they enter is public on the map).

Sale-ready customization (REQUIRED — ships as a sellable extension)

This extension will be sold like the others (Hestia, ResellerClub, ShareButtons, DigitalDownloads — all $29 one-time via the Extensions category). It must therefore ship as a configurable, rebrandable product, not hard-coded to Smith & Tech's setup. A buyer installs it on their own Paymenter store and points it at their own map (or at map.smithandtech.space if they use ours — their choice). Concretely:

1. Full settings in the Paymenter admin (getConfig()), grouped in one "Map Listing" section — no value the extension needs may exist only in code. Every field below is editable in admin, persisted, and read at request time with safe defaults on any failure:

Setting Default (ships in the box) Buyer changes it to
map_base_url https://map.smithandtech.space their own map instance URL
map_api_token empty (publish disabled until set) the bearer token for their map's ingest API
map_api_places_path /api/v1/places their map's ingest path, if different
transport api api or feed (§8 fallback)
feed_token auto-generated random string regenerate / rotate
default_lat / default_lng / default_zoom Atlanta, GA (33.7490, −84.3880, zoom 11) their own city/region
tile_url OSM tiles their own tile server URL
geocoder_url https://nominatim.openstreetmap.org their own Nominatim/Photon
categories Restaurant, Gas, ATM, Shopping, General their own category list (free-text, one per line)
section_title "Find it on the map" their own heading
submit_button_label "List on the map" their own CTA
submissions_enabled on off closes the forms (404)
shops_enabled off until LinkedProducts v2 on once shops exist
require_approval on (always, per owner rule) locked on in v1 — approval cannot be switched off
max_listings_per_user 10 their own cap
show_price_on_pin on off hides prices
brand_name "Smith & Tech Maps" their map's name, used in headings and emails

2. No Smith & Tech identifiers hard-coded. No smithandtech.com, map.smithandtech.space, owner email, or brand string may appear in code paths — only as the default value of a config field. A buyer who changes every field must end up with an extension that mentions Smith & Tech nowhere. (The shipped defaults may reference Smith & Tech because that is the store it is built for; the code must not.)

3. Labels and copy are config, not code. Section headings, button labels, form help text, the "waiting for approval" message, and the decline reason template are all config strings so a buyer can match their store's voice without editing a Blade file.

4. The map API contract is documented in the README (§8): the three endpoints, the JSON shape, idempotency on uuid. A buyer whose map speaks that contract can use the extension as-is; a buyer whose map does not must either add the endpoint or use the GeoJSON feed transport. The contract is part of the product, not tribal knowledge.

5. Sale-zip hygiene, same as ShareButtons: version constant in the main class; README with install steps, config table, and the API contract; no secrets, tokens, or store-specific values in the repo; php -l clean; a harness test that proves the publish payload shape, the idempotency key, and that no hard-coded Smith & Tech string appears outside config defaults. Sale product: $29 one-time, Extensions category, DigitalDownloads — same as the other four.

Identity, privacy, and moderation notes

  • The submitter is a Paymenter user; the map never needs their Paymenter password or session. The payload sent to the map contains no email, no user ID beyond the listing uuid, and no phone number.
  • The map's own Authentik sign-in (CT 115, stopped) is untouched by this extension. If the owner later restarts Authentik and wants map accounts linked to Paymenter accounts, that is a separate design (SSO), not v1.
  • Admin approval is the moderation boundary, same as LinkedProducts: nothing a user submits reaches the public map before an admin sees it. Declined submissions are never published, and a declined or withdrawn listing leaves no trace on the map.
  • Abuse controls: throttle on submit, one listing per (user, subject), per-user cap (config), admin can unpublish any live pin in one click.

Safety (storefront must never break)

  • Same rules as LinkedProducts: middleware wraps everything in try/catch and returns the original response on any exception; only GET + products.show (and later the shop route) + 200 + text/html responses are modified; redirects, JSON, downloads, error pages, admin and API routes pass through untouched.
  • The map publish runs in a queued job, never inline in the admin's approve click — a slow or dead map must not hang the admin panel.
  • No external requests from the extension except the map publish and the geocoder call, both server-side, both with short timeouts.
  • Submissions cannot inject markup: Blade escapes {{ }} output, URLs validated to http(s), coordinates validated as numbers.
  • Disabling the extension removes the map blocks and closes the forms with no leftover files; published pins stay on the map until the admin unpublishes them (deliberate — disabling the bridge must not silently delete live listings).

Open questions (incl. shell-only checks on pve0)

These can only be settled from a Proxmox shell / CT 116 console (generic subagents cannot do this; needs the cloud-browser route):

  1. CT 116 — what actually runs the map? Language/framework, repo location (if any), process manager, listening ports, LAN IP, data store (files? SQLite? Postgres?), and where ?place=ID places live today. Is there already a listings/places table or API?
  2. Does CT 116 expose (or can it gain) a write API for places (POST/PUT/DELETE), and what auth does it use? If not, is the GeoJSON-feed transport acceptable, and where does the map fetch its layers from?
  3. CT 113 — is there a Nominatim/Photon geocoder on the OSM stack, or only the tile import? Has the osm2pgsql import finished?
  4. CT 116 LAN IP + the tile server's location (same container? CT 113? elsewhere?) — decides whether the extension may use a LAN publish path or must use the public URL.
  5. CT 115 Authentik — restart it, or leave stopped? (Owner decision; the extension does not need it either way.)
  6. Shop identity and shop display for v2 — SETTLED in v1.1.0 (owner pick 2026-11-25): LinkedProducts v3 shops live at .com/<custom> (route linkedproducts.shop, param shop = slug). The listing's subject_id carries the LinkedShop id, subject_type = shop. The shop page includes the maplisting::shop-block partial directly (guarded by View::exists); the middleware injects it only as a fallback when the shop page did not, and injects the owner-only submit CTA (maplisting::shop-cta) when the shop has no listing yet. The location block goes just before </main> on the shop page (same anchor as the product block).
  7. Owner decisions owed: confirm the push-vs-feed transport after the CT 116 inspection; confirm the default map centre/zoom and category list; confirm the $29 sale (same as the other extensions) once v1 is built and proven.
  8. Do the map site and the maps app share one backend/API — and does every surface read the one approved-listings source? (Owner requirement 2026-11-19, generalized: a listing approved once shows up everywhere the maps are used.) If the site and app do not share a backend, what endpoint/feed does the app surface need — a second publish target must be designed before the app surface can be covered. Until this is confirmed, one push is assumed to cover site + app only provisionally. The Paymenter maps section needs no such answer: it reads the extension's own table.
  9. Inventory every surface where Smith & Tech maps appear (beyond the site, the app, and the Paymenter maps section) and confirm each one reads from the shared approved-listings source — the GeoJSON feed or the map backend — rather than carrying its own copy that can drift.

Verification checklist (v1.0.0, build time)

  • php -l clean on all PHP files; harness tests pass (payload shape, idempotency key, validation, no hard-coded Smith & Tech string outside config defaults).
  • Install on staging Paymenter: migration creates ext_map_listings; Filament resource appears under Extensions; config section shows every §12 field and persists.
  • Submit a listing as a signed-in user (pin-drop + typed address); it appears pending; approve it; the pin appears on the map with the right name/category/price/link; the product page shows "Find it on the map"; decline path hides it; withdraw/unpublish removes the pin; disabling submissions closes the form.
  • Publish failure path: stop the map (or point at a dead URL), approve, confirm the listing stays approved with sync_status=failed, then retry succeeds.
  • Approved listings show on every surface the maps are used on (site, app, Paymenter maps section, and any other surface found in the inventory) — confirm each surface reads the shared source at the CT 116 inspection.
  • Live proof on the storefront (owner approval needed before installing on CT 119).

Open items / later versions

  • Image file upload (v1 takes an image URL only, same as LinkedProducts v1).
  • "Listings near me" on the storefront (browser geolocation → map link with the visitor's location as route origin).
  • Per-category pin icons/colors configurable in admin.
  • Submission notifications (email the admin when a listing is submitted).
  • Bulk import of existing map places into Paymenter (if the map already has places when the bridge lands).

v1.0.1 — push integration + uuid fix (2026-11-20, owner pick)

Owner pick 2026-11-20 23:22 EST: "Build the real push integration" (audit #2, item 3) instead of hiding the /map-listings page. The CT 116 inspection (see §4) closed the configure path: no /api/v1/places endpoint and no feed exist, and the app is down.

Extension side (this repo, v1.0.1). (1) uuid fix: the model now generates a uuid in a creating hook when empty. The user submit route was the only path that set one; the admin create form did not, and the column has no database default, so an admin-created listing failed with "Field 'uuid' doesn't have a default value" (live log 2026-11-20 16:16 EST, subject "Idk"). (2) No transport change was needed: ApiPublisher already speaks POST/PUT/DELETE {base}/api/v1/places with a Bearer token, idempotent on uuid, expecting {place_id, url} back. Configure it in admin: transport api, base URL https://map.smithandtech.space, places path /api/v1/places, token = the generated service token.

Map app side (CT 116, server.py — new work). (1) A service-token auth path: a static bearer token (generated at build time, stored in the map app config and in the Paymenter extension settings — never in chat, never in a repo) accepted on a new POST /api/v1/places endpoint (plus PUT/DELETE /api/v1/places/{id}). No Authentik dependency: Authentik is owner-stopped and the extension must not depend on it. (2) The endpoint accepts the extension's payload (uuid, name, category, latitude, longitude, address, description, image_url, website_url, source, price/currency), stores the listing in data.json with the uuid as its stable id, dedupes on uuid (re-POST updates instead of duplicating), creates it as approved (a push from Paymenter is already admin-approved there), and returns {place_id, url} with place_id = uuid. (3) A systemd service so the app runs and survives reboots (none exists today). (4) A Gitea repo for the map app source (code only — never auth.json and never the service token).

Proof (after deploy). Admin-create a listing now succeeds (uuid fix). Approve a test listing → the queued job pushes it → it appears on map.smithandtech.space (GET /api/listings) and as a pin on Paymenter's /map-listings. Withdraw the test listing → the pin is removed from the map. Sale zip rebuilt for v1.0.1 per the sale version rule.

v1.1.0 — maps section inside the storefront + shop listings (2026-11-25, owner pick)

Owner pick 2026-11-25 14:09 EST: "Map inside the storefront + store as first pin", then "Also wire shops to the map" (audit #3, items 25 + 27, plus the shop-location flow designed for v2).

Storefront layout. The maps section, the submission form and my-listings now render inside the storefront layout instead of as standalone pages. The mechanism is <x-app-layout> — the class-based Blade component (App\View\Components\AppLayout) whose render() returns the theme layout layouts.app. It is the same wrapper core error pages and LinkedProducts' shop-create form use; it is what "extend the storefront layout" means in this codebase, because sleek's layout is a component layout ({{ $slot }}), not an @extends layout — there are no @section names to use, and no Livewire component is needed for these plain pages. The views keep their Leaflet maps and scripts; only the standalone HTML shell and the custom dark CSS are gone, replaced by the theme's own classes (the same classes maplisting::block already used), so the pages read like the rest of the store in either theme mode.

Shop listings. The v2 shop flow is live: GET + POST /map-listings/submit/shop/{shop} mirror the product flow exactly — shop resolved by slug via LinkedShop, 404 when missing, when submissions are disabled, when shops_enabled is off, or when LinkedProducts is not installed; same validation, per-user cap and geocode fallback; subject_type = shop, subject_id = the LinkedShop id; status pending; one listing per (user, shop); the website URL defaults to the shop's public URL; a shop listing carries no price (shops have no product plans). Deleting a shop unpublishes its pins first, mirroring the product-deletion hook (guarded by class_exists, so the extension still boots when LinkedProducts is absent).

Owner-only decision (recorded). The submit link on a shop page is offered to the shop's OWNER only: the middleware injects the maplisting::shop-cta partial only when the signed-in user's id matches the shop's user_id, and only when the shop has no approved listing yet and shop listings are enabled. Visitors never see a submit prompt for someone else's shop. The submit form itself mirrors the product form — any signed-in user may submit for a shop, exactly as any signed-in user may submit for a product; the owner-only rule governs discovery on the shop page, not the form. An approved listing's block is shown by the shop page itself (maplisting::shop-block, included by the LinkedProducts shop view); the middleware injects it only as a fallback when the shop page did not.

Proof (after deploy). Turn shops_enabled ON in the extension settings. Create the store listing (admin): name "Smith and Tech", category Shopping, 33.749 / -84.388 (Atlanta, the map's existing default centre), no street address, website https://www.smithandtech.com — approve it and confirm the pin shows on the maps section inside the storefront layout and on the map app. Submit a shop listing as the shop owner and confirm the CTA appears only for the owner, the form accepts it, and approval publishes the pin. Sale zip rebuilt for v1.1.0 per the sale version rule.

v1.1.1 — Leaflet sizing fix (2026-11-25). After the v1.1.0 deploy, /map-listings showed only one tile fragment top-left, the rest grey, the pin invisible, zoom-in disabled. Cause: sleek's storefront layout puts x-cloak on <body> (themes/sleek/views/layouts/app.blade.php line 43), so Alpine hides the whole page until it initializes — and the map views ran their Leaflet init in an inline <script> during HTML parsing, before Alpine removed x-cloak, so Leaflet measured a 0×0 container and never recovered. Fix: all three inline Leaflet inits (maps page, submit picker, shop-block mini-map) now defer to DOMContentLoaded — Alpine's own listener, registered first from the head, removes x-cloak before later listeners run — then call map.invalidateSize() right after init and once more on window load. Second defect in the same fix: with exactly one pin, fitBounds zoomed to maxZoom 19 (hence the disabled zoom-in) — a single pin now centres at the configured zoom capped at 15, multi-pin fitBounds unchanged. The layout offers no @stack for styles/scripts, so the Leaflet CDN links stay where they are. No theme or core change.

v1.1.2 — "Maps" link in the storefront main menu (2026-11-26, owner pick). The maps page (/map-listings) existed but nothing linked to it. Mechanism (verified against Paymenter 1.5.9 source): the sleek theme's <x-navigation /> renders Navigation::getLinks(), which builds Home + Shop and then runs EventHelper::itemEvent('navigation', $routes) — a listener's return is appended to the menu and sorted by priority. MapListing::boot() now registers Event::listen('navigation', …) returning ['name' => 'Maps', 'route' => 'maplistings.index', 'icon' => 'ri-map-pin', 'priority' => 10] (Home and Shop carry no priority, i.e. 0, so Maps sorts after them). The route key is resolved to the URL by Navigation::markActiveRoute(), which also appends -line/-fill to the icon — ri-map-pin-line / ri-map-pin-fill both exist in Remix Icon (ri-map-pin-line is already used by the sleek 404 page). The page is public, so the link shows for guests and signed-in users alike. boot() only runs while the extension is enabled, so disabling the extension removes the link — that is the desired behaviour. No theme or core edit; routes, views, admin, and feed untouched. Suggested version v1.1.2; version in code stays 1.1.1 until the deploy decision.

Proof (after deploy). The link renders in the main menu logged out AND signed in; it goes to /map-listings; on the maps page it shows the active state (filled icon); it disappears from the menu when the extension is disabled and returns when re-enabled. No other menu item moves.