THE BARBERGAME / DIRECTORY OPERATIONSProject index

TBG Network LLC / Production directory / Read-only status

Your directory.

One authoritative corpus: 351 Designworks shops now hosted in TBG Cloudflare D1 and serving thebarbergame.com.

Production cutover complete · November 11, 2026. Customer shop search, city pages, profiles and sitemap now use the TBG-owned D1 directory. Verified: 351 shops and 351 unique shop URLs in the sitemap. The prior directory API remains online pending a dependency audit; the separate submission intake is unchanged. No automatic imports or publications from this page.

Authoritative data.

Live canonical directory / shops
—
Imported from Designworks and verified in TBG Cloudflare D1. Last recorded verification: —. Counts are a verified checkpoint, not a live query.
Live on thebarbergame.com
Separate intake submissions
—
— pending in Cloudflare D1; not automatically part of the directory.

Verified checkpoint · November 11, 2026

Directory Admin: live publishing and permanent team address.

Owner-verified: 351 shops searchable in the separate Cloudflare-hosted Directory Admin; an edit to Chop it Up – Bellevue was saved as a draft, reviewed, explicitly approved, and displayed on the live customer profile. The customer site now renders approved descriptions under “About the shop.”

Team bookmark: directory.thebarbergame.com. This production custom domain is connected to barbergame-directory-admin-poc. Cloudflare Access uses the existing BarberGame Team Members Allow policy for all traffic; the owner verified Access email sign-in followed by the existing Admin password.

Permission boundary: Application-level Editor and Publisher roles are not yet implemented. The shared Admin password currently grants publishing powers and must not be shared with editors. Next: enforce permissions on every server-side edit and approval action using verified Access identity; test that Editor can propose but not publish.

Next / proposed feature roadmap

Stabilize. Review. Approve. Publish.

With the 351-shop directory now live, the next release is an owner-controlled directory operating system. Stabilize the production site first, then add a protected admin panel, a review queue and an explicit approval gate before any new shop or change reaches the public directory.

Publication rule: A submitted or edited record is a draft, not a public listing. Only an explicit Approve & publish action by the owner can release it to production; preview/review and publication are separate steps. Every publication records who approved it and when, and supports rollback.
OrderFeatureAcceptance / outcomeState
01 · NowStabilization & recoveryKeep the original SQLite/export and Git/Worker rollback; confirm built-in D1 Time Travel is available; perform one non-production recovery rehearsal. Avoid extra backup infrastructure until needed.In progress
02 · NextProtected directory admin panelOwner can search all 351 shops, view provenance/status, edit draft changes, inspect duplicates and missing data. Authentication and authorized roles; no public editing of D1.Proposed
03 · NextReview → approve → publishSubmissions and edits enter a private queue. Review proposed changes versus the published record, resolve duplicates, preview the result, then the owner explicitly approves and publishes. Capture audit history and offer rollback.Proposed
04 · AfterPhoto-first crowdsourcingCustomers, barbers or shop owners can submit one storefront photo with no required typing; signage and optional consent-based location help create a draft for the same review queue. Never auto-publish photos or shops.Proposed
05 · AfterBronze quality & expansionQueue missing coordinates, incomplete hours and duplicate candidates; add Washington chain/city records through source-linked reviewable imports.Proposed
06 · AfterLatent Silver & Gold enrichment fieldsSupport valuable optional data before it is collected for every shop: Silver candidates include descriptions, verified hours, service menus, booking/social links and photos; Gold candidates include barber profiles, specialties, accessibility, amenities and portfolios. Keep unfilled fields hidden, retain source/provenance, and publish only useful verified information after owner approval. Tiers remain flexible, not mandatory checklists.Proposed
07 · FutureOptional Walking CompassConsider close-range directional guidance from phone orientation and bearing to the shop to answer “Which way should I walk?” Preserve the circular map and existing blue-dot behavior; request sensor permission separately, retain walking directions for routing, and validate mobile browser support. No implementation now.On hold

Approval design: submitted → pending review → changes reviewed → approved by owner → published. Rejected or needs-information items stay private. Draft storage must be separate from the published record until approval; the approval button is not an automatic deployment of unrelated website code.

Stabilization / basic recovery

If something breaks.

We already have layered protection. No new scheduler is needed if Cloudflare D1 Time Travel is enabled for our production database—it automatically records recovery history. The original private SQLite and SQL export remain the older recovery baseline; Git and Cloudflare Worker versions protect the website code.

ProtectionWhere / useVerification
Original source & SQL exportDesignworks barbergame-original.sqlite3 and ~/barbergame-private/. A preserved 351-shop baseline, not a live mirror of future edits.Preserved during migration
Cloudflare D1 Time TravelCloudflare automatically retains recent recovery history on production D1: typically 7 days (Workers Free) or 30 days (Workers Paid). No setup required if D1 version is production.Read-only version and bookmark check pending
Git + Worker deployment historyGit checkpoints 5d8cd52, 7c25777; Worker version ea48fe7c-302d-41cc-84d2-6e737991df17. Restore code separately from database content.Release checkpoint saved

Safe verification: On Designworks with TBG Wrangler authenticated, run npx wrangler d1 info barbergame-directory and npx wrangler d1 time-travel info barbergame-directory. Check version: production and confirm a bookmark is returned. Both commands are read-only.

Recovery rule: A D1 Time Travel restore overwrites the database in place and can discard newer changes; never run it on production as a routine test. Rehearse any destructive restore only on the separate disposable test database with its own bookmark. Before a real emergency restore, record the current bookmark, record the target timestamp, pause directory edits and obtain explicit owner approval.

Cloudflare documentation: Time Travel and backups · Wrangler D1 commands. This is a recovery guide, not an automated restoration service.

Production connection.

ComponentCurrent stateNext
Original Designworks shops
barbergame-original.sqlite3 · recovery copy
Preserved351 original rows and private SQL export retained
TBG Cloudflare directory storage
barbergame-directory / shops
351 imported and verifiedWorker binding: DIRECTORY_DB; 7 confirmed / 344 entered
Customer shop search and profilesProduction liveCloudflare Worker barbergame-customer; stable designworks-{id} shop URLs
Shop submissionsSeparate D1 barbergame-shop-intake7 previously recorded; new end-to-end submission check remains outstanding
Release and legacy APIOwner-deployed Nov 11Retain old public API until other consumers are audited; no automatic publishing

Migration history · November 10–11, 2026

How we got here.

The goal was to establish one owner-controlled BarberGame shop directory. We started with an authoritative Designworks SQLite file, moved its complete contents into TBG Networks LLC’s Cloudflare account, and changed the existing customer Worker to read that database. This page records the decisions and locations so the setup can be recovered later.

  1. Selected the authoritative corpus.
    351 Designworks-owned shop records, not the larger unrelated directory returned by the old API. No merges and no pre-migration cleanup.
  2. Imported and verified all 351 rows.
    Private SQL export on Designworks → barbergame-directory D1. Verification: 7 confirmed, 344 entered; 88 distinct raw city values. Nine missing/invalid coordinates retained for later enrichment.
  3. Rewired the customer website.
    The existing barbergame-customer Cloudflare Worker now reads via DIRECTORY_DB. Search, city browsing, location radius, maps, shop detail pages and sitemap use D1. Stable profile IDs: designworks-{id}.
  4. Preserved the separate intake workflow.
    The form checks duplicates against the directory but still writes to SHOP_INTAKE_DB; seven earlier submissions remain distinct from published shops. No automatic publication.
  5. Built, tested and deployed manually.
    Shop search/map/profile tests passed locally; sitemap had 351 unique shop IDs. Production /shops, /city/seattle, /sitemap.xml and /add-barbershop returned HTTP 200. Owner visually verified live Seattle and Bothell profiles.

Recovery reference

Where everything lives.

ItemLocation / identifierWhy it matters
Original databaseDesignworks: ~/designworks/projects/barber-directory/data/barbergame-original.sqlite3Preserved source / recovery copy
Private SQL exports~/barbergame-private/d1-directory-shops.sql
d1-directory-import.sql
Original and D1-ready snapshots; private, not website assets
TBG Cloudflare account707cdd30dab4f1606629739fce05a265Owner-controlled Cloudflare account
Production directory D1barbergame-directory
8427bee6-6d91-4bc3-aac9-3b2a8f644aec
shops table · Worker binding DIRECTORY_DB
Separate intake D1barbergame-shop-intake
Worker binding SHOP_INTAKE_DB
Submitted shops are review records, not automatically in the directory
Customer website sourceDesignworks: ~/designworks/projects/barbergame-map-home-v01Existing project; unfinished Map Home edits preserved separately
Clean release worktree~/designworks/projects/barbergame-d1-release
release/cloudflare-d1-directory
Release snapshot that was deployed
Integration codecloudflare.config.ts
src/lib/directory/public-json.ts (D1 reader)
src/app/sitemap.ts and src/app/api/shop-intake/route.ts
Bindings, public search/data mapping, sitemap and intake duplicate check
Production Workerbarbergame-customer
Version ea48fe7c-302d-41cc-84d2-6e737991df17
Serves thebarbergame.com and www
Git checkpoints5d8cd52 · 7c25777Binding addition and D1 reader/sitemap/intake integration

Owner decisions

What we decided.

DecisionReason / operating rule
One directory corpusThe 351 Designworks rows are the only approved authoritative directory; no silent merge with the old API’s larger dataset.
Preserve the complete snapshotKeep existing IDs, provenance and statuses. Defer potential duplicates, coordinate gaps and city-name cleanup rather than delaying deployment.
Keep publication separate from intakeExisting submissions stay in a different D1 database and do not become public shops automatically.
Use the existing WorkerRead directory data directly through DIRECTORY_DB instead of introducing another customer API service.
Owner-controlled deploymentBuild with vinext, deploy manually to Cloudflare, and retain Git/Cloudflare release history for rollback.
Do not retire legacy services prematurelyAudit any other consumers of the former directory API before removing it. A working customer site does not prove all other integrations have moved.

Migration record and remaining actions.

The beta cutover is complete. This checklist records the accomplished migration and the small number of remaining cleanup tasks.

    Related destinations.

    These remain separate from the canonical published data until you approve an import.