The server edition now starts. Sign-in by email and password, limited per
address and per IP; ten failures in a row lock the account and email its
owner, and a reset by email (or an admin) unlocks it. Settings → Your
account has the profile, the password, where you're signed in, and
two-factor sign-in with an authenticator app (TOTP, from a QR code) and
ten recovery codes. The app's own mail goes through SUPERMARKET_MAIL_URL.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new server prints a link to create its owner (supermarket setup-link
makes another); until it's used, every page says the setup isn't
finished. One-time links (schema 33) are kept as hashes and used up in
one statement; resets and invitations will use them too. The server
edition opens Postgres.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Schema 32 adds users, memberships and sessions, on both databases.
internal/users keeps accounts (Argon2id passwords), roles and modules,
and sessions whose rows hold only a hash of the cookie's value; they end
after a week unused or 30 days. On the server edition, every page but the
public ones needs a session and sends others to /signin. Every edition's
forms now carry a CSRF token (a cookie repeated in each form, added as
pages render; htmx sends it as a header), besides the same-origin check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
supermarket export [--with-secrets] writes a whole Supermarket as a
.tar.gz (a manifest, each table as JSON lines, secrets if asked for) to
the file storage. supermarket import loads one into an empty database at
the same schema, SQLite or Postgres, in one transaction, parents first,
checking row counts and moving Postgres' identity counters past the
imported ids.
Checked on Federated's 112,543 rows: imported into Postgres and SQLite,
every table and total matches, and TestPagesOnRealData renders all 57
pages the same from both. That found unsettled ordering (case-alike
campaigns, customers with the same name, metrics' float sums), now fixed
with ORDER BY and tie-breakers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
internal/jobs keeps named locks as leases in the database (schema 31:
locks, instances), taken with one conditional UPDATE on SQLite or Postgres,
renewed while the work runs and lapsing if its copy stops. Each background
loop's turn, sending an email, audits, discovery runs and imports run
under a lock; OAuth sign-ins under way are kept in the database. Copies
check in, and work marked running is recovered at start only when no
other copy is alive. Settings -> About lists the copies and work under
way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
internal/storage keeps files that must outlast the app's disk (exports,
uploads) behind one interface: a folder (<data>/files) or an S3-compatible
bucket (minio-go, path-style, for Garage). Names that would reach outside
the store are refused. An S3 store is checked at start; supermarket config
checks the storage and Postgres for real. The same tests run on a folder
and on Garage (SUPERMARKET_TEST_S3).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server and multi-tenant editions keep keys and tokens in a secrets
table (schema 30, the first migration for both databases), each sealed
with AES-256-GCM under a key derived from SUPERMARKET_SECRET_KEY and bound
to its name. A wrong key stops the start with a clear message;
SUPERMARKET_SECRET_KEY_OLD reseals everything under a new key. Values are
read when asked for, so several copies of the app agree on a refreshed
token. The local edition keeps secrets.json.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
db.DB wraps database/sql for either database. The SQL stays SQLite's: on
Postgres each statement's ? become $n and LIKE ignores case as SQLite's
does, and the Postgres schema (postgres.sql, schema 29 as a whole) adds
SQLite's instr, json_extract and two-argument max/min, and a nocase ICU
collation. Needs Postgres 18.
LastInsertId became db.Insert (RETURNING id), INSERT OR IGNORE became ON
CONFLICT DO NOTHING, upserts qualify their columns, and three queries
group by every column they use. SUPERMARKET_TEST_POSTGRES runs the test
suite on Postgres, a new schema per test; all tests pass on both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SUPERMARKET_MODE picks local (the default), server or multi. internal/config
reads and checks every setting the editions need (database, secret key,
storage, the app's own mail, an https address), reporting all problems at
once. supermarket config prints them without passwords; supermarket
secret-key makes a key. Settings -> About shows the edition. Server and
multi-tenant are checked but refuse to start until they're built.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings → Email → Mailing lists connects Listmonk (the Core's, by
default) with an API user and its token; Test reads the lists. A person
in Review can be added to a list, with their company, title and signal:
a double opt-in list asks them to confirm unless they already agreed; a
single opt-in list takes them only once they have; a suppressed address
is refused. Their card shows the lists they're on (a new list_members
table). Every hour, or on Sync now, everyone blocklisted in Listmonk or
unsubscribed from one of its lists goes on the suppression list, with
the reason; an address already there keeps its own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Everything the user sees says Market: the sidebar, titles, breadcrumbs,
help text, messages, suggestions and the agent tool's description; the
export downloads as supermarket-market.yaml. Its pages live under
/market, and the old /inventory addresses redirect there (308, so a
form's POST stays a POST). The YAML format (inventory:), the database
and the code's names are unchanged, so exported files still import. A
breadcrumb no longer repeats the page's own title.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Supermarket looks at each Inventory partner's pages that list providers,
hosts or partners (from their sitemap and home page) and keeps the ones
that list others but not the site; once a month by itself, or on
request. On request (up to 4 web searches), the AI finds lists of
alternatives to a competitor, and each page is read to keep the ones
that name others but not the company. Each opportunity can be marked
asked, won or dismissed; it's marked won when a link from its site shows
up. SEO → Links lists them; open ones join What to write next. Nothing
is sent: asking is the user's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each known linking page (from Bing, Plausible or added by hand) is
opened once a week, at most 100 a day, to check it still links to the
site: kept, gone (the page no longer has the link), page gone (404, 410
or moved elsewhere) or pointing at a 404 (our page it links to is gone).
SEO → Links lists the lost ones with what happened, when last seen and
what the site brought; links can be added by hand (checked at once),
checked now, or forgotten. What to write next suggests a redirect for a
link to a 404, and asking for a lost link back when it brought visitors.
Links and What to write next now work for websites without Search
Console too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a Bing Webmaster key, Supermarket reads once a week (or on Read
now) how many links Bing knows to each page of the site, and for the 25
most linked pages, the pages that link and their anchor text, into the
backlinks table. SEO → Links lists the linking sites, new ones first,
with the pages they link to and their link text; without a key it says
how to get one. A refused key keeps the last read, with the error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The daily Plausible import also reads the visitors by referring site,
linking page and entry page, with their sign-ups and leads (a new
referrer_days table). Search engines, social networks, AI assistants,
email and mail filters, work apps, the company's own sites and tagged
links are told apart from links on other sites. SEO → Links lists the
sites that sent visitors in 90 days, the pages they landed on and the
sign-ups they brought, new ones first. A linking page Plausible names
in full is kept as a known backlink (a new backlinks table, for parts 2
and 3); browsers mostly send only the site, so most aren't.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each Inventory entry can hold its plans' prices: the plan, the price,
what it's per, when it was checked and where. Comparison and alternative
pages, and new sections, state a competitor's price only as entered,
with the month it was checked; a missing one is left out and listed as a
to-do. A price checked more than six months ago is flagged on the entry
and adds a to-do to every page that names the competitor. Prices go out
and come back with the Inventory's YAML.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sites → Sections and pages → Add a section, on any page built from
sections: choose one of the site's section types and where it goes; the
AI writes it from the page, its searches, the profile and the Inventory,
with the same rules as a new page. It's reviewed like a page (claims to
confirm, to-dos), and the pull request inserts it into the page's file as
text, so only that section is added; the build checks it. What to write
next suggests a FAQ for a section page found with questions, and a
comparison for one searched against something else.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One list per website of everything worth writing: new wording for pages
(Push pages and the audit's title and description issues), landing
pages for signals that get replies, pages for apps people name in their
replies (their own words, without quoted mail or signatures), and
keywords or briefs that stalled. Ranked by the sign-ups each is expected
to bring, at most 10 shown, each with its reason in numbers and the
button that starts its flow; Not now hides one for 90 days. The SEO
module still opens on the Morning check; the Monday report links here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new package, next, finds the pages the funnel asks for: a landing page
for a signal with replies or interested people in 90 days and none yet;
a product or alternative page for an app two or more people name in
their replies (outreach email, origami.chat, explee.com) that the site
has no page for; and picked keywords with no brief, briefs left
unanswered. Sites → New pages can be filled in from a link (kind,
signal, notes).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Push pages and change candidates are ordered by the sign-ups a page
would bring if clicked as usual for its position (impressions × the
clicks it misses × its sign-up rate, or the site's), and say so. What
ranks flags pages by what they convert: traffic with no sign-ups, and
pages that convert but Google hardly shows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings → Website & sales says which clicked links count as a sign-up:
Supermarket suggests the sign-up, trial and checkout links visitors
clicked, and the user ticks, unticks or adds their own. The Plausible
import reads, per page a visit began on, the visitors, sign-ups and form
leads (a new page_days table); What ranks, the audit and Sites show
visits and sign-ups next to each page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The morning check draws clicks by day, this week over the week before.
- The morning check and the Monday report list the searches that gained
and lost most clicks (any size; real moves stay on their own list).
- The week's clicks and impressions show their change in percent.
- Settings → Search engines can email the morning check, at most once a
day, when something really moved. Both emails carry the new lists.
- With a domain property, a line says how many clicks went to its other
hosts (a shop, a Gitea…) and for which search.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Overview's module cards drop their "Phase 1"–"Phase 5" badges. The
Content module opens on Posts and the SEO module on the Morning check,
from the sidebar and from the Overview.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SEO: a domain property (sc-domain:) covers every subdomain, so the shop,
Gitea and forum were counted as the website. What ranks, the morning
check, the Monday report, keywords, change candidates and the audit's
traffic now read only the website's own host (with or without www).
The report keeps pages worth a proposal apart from "Waiting for your
yes", explains only moves past the thresholds, and says "places up/down".
Also:
- Feed summaries drop the posts' scripts and styles.
- Spend you log can't be negative.
- Test and check buttons can't be clicked twice while they run.
- Previews show the site's web fonts and icon sprites.
- Backups are read without leaving -wal/-shm files; deleting one removes
them, and leftovers are swept at start.
- The Overview's setup flags a CRM that Hermes can't reach.
- Import now says what came in; adding a prospect that exists says so;
prospects can be deleted.
- Signal tags and brief addresses keep accented letters (Ü → u).
- Page errors start with a capital; clearer messages for bad uploads,
CRM retry and cancel, keywords, and the finished audit.
- The module you're in stays unfolded in the sidebar.
- A picked keyword can be unpicked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The theme carries a MANIFEST of its files' SHA-256s. A site's Theme card
shows its copy's version against Supermarket's and any files changed by
hand; Update the theme opens a pull request that writes new and changed
files, removes retired ones, rebuilds, and lists what it replaces.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A chevron beside each module folds or unfolds its pages. The current
module is always open; the others keep the state you left them in; a
folded module shows its pages' counts added up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sites → New site fills an empty Gitea repository with the theme, a
hugo.toml in the site's brand and a starter home page: checked that the
repository is empty and builds with Hugo, then the first commit is pushed
to its default branch. The site joins the profile, and a First pages card
builds its Home, About, Contact and product pages with the page builder;
About and Contact join the top menu.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A second LinkedIn app (Community Management API) with its own sign-in on
Settings → Social accounts: the pages the member may post for are listed
and one chosen, new LinkedIn drafts default to the page or to you, and
each draft can switch before it's published. Schema 25.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sites → Lead forms sets up the site's forms to create EspoCRM Leads
through its Lead Capture: the address saved and tested with a CORS
preflight, and a pull request adding a script that maps the form's fields
onto a Lead (campaign, page and form in the description). Plausible's
Lead goal is imported per signal as interested.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A restore is staged (checked, the current database backed up) and swapped
in when the app next starts. Settings → Backups restores with a
self-restart, cancels a waiting restore, and takes uploads; supermarket
restore takes a backup name or a file; supermarket backup --with-secrets
makes an archive with the keys, for moving machines.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Backups with SQLite's VACUUM INTO into <data>/backups: on request
(Settings → Backups, supermarket backup [note]), before every schema
migration, and daily, keeping 7 dailies and 4 weeklies. Listed with size
and schema; downloadable and deletable. The old app.db.pre-* copies are
moved in, with their -wal files folded in first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged Sites pages are checked on the live site until they answer with
their own words and title; removed ones until they're gone. The SEO loop,
the page, the signal's page and Sites → Publishing check (or Check now);
two hours without the page points at the deploy hook. Pages going live or
away go to IndexNow. Sites → Publishing lists what's waiting, open pull
requests and recent merges. Schema 24.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each signal's page lists its landing pages with their Gitea status, live
address and 30-day visitors from Plausible, and builds a new one. Pages
can be duplicated as variants (B, C…, with their own utm_content), taken
off the site through a pull request that deletes the file, or have their
pull request closed. The scorecard counts live pages. Schema 23.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sites → New pages: the AI composes a landing, product, alternative,
comparison or blog page as the site's own sections, from the profile and
optionally a product, competitor, buying signal or SEO brief. Code checks
every section type, warns on unknown fields and missing pages, tags a
signal's links with its campaign and finds experience claims. Pages are
edited here, pushed to their own branch with a preview, and opened as pull
requests after the claims are confirmed. Schema 22.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sites → Previews builds a branch with Hugo (drafts included) and serves it
under /preview/<site>/<branch>/, links rewritten to stay inside, behind a
sandboxing CSP so a branch's scripts can't act on the app or phone home.
The image now builds Hugo v0.170.1 from source; Alpine's 0.147.2 couldn't
build the site. Hugo's errors show their innermost cause.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sites → Sections and pages reads the website's Hugo repository: each
section type with the README's description, the fields in use and the
layout's, the pages using it and a real example; the pages and their
sections; the latest commits. Working copies are now held by one job at a
time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The MRR page adds churn, CLV, CAC and CLV:CAC. Eight tables download as
CSV (MRR, NRR and revenue cohorts, CAC by month and channel, spend,
products, customers). Metrics → Publish builds an open metrics page from
chosen totals only (never a customer) and opens a pull request that adds
or updates it on the site, checked with a Hugo build.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CLV = ARPA × revenue-weighted gross margin ÷ customer churn averaged over
up to 12 complete months, with lifetime and CLV:CAC (CAC over its own
12-month window). Revenue by cohort from money that came in: paid
invoices less refunds and post-payment credits not refunded, cumulative
per customer, with a gross profit view; months not reached are told
apart from negative amounts. Metrics → CLV and cohorts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Spend by month and channel (the funnel's channels and general), by hand
or from pasted CSV (all or nothing); origami.chat and explee.com campaign
spend added hourly as the difference since last seen. CAC per month and
over three months, and per channel over 12 months from each new
customer's first funnel step; unknown, not $0, without spend. Metrics →
Spend and CAC. Schema 21.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every customer with billing is matched to an Account copied from the
CRM: the user's choice, then an Account Hermes created from here, a
stored ID on either side, an email (the Account's or a Contact's), or
the email's domain (not free mail). Several candidates wait for a
choice. Metrics → Customers and the CRM fixes matches, marks customers
not in the CRM, and queues paying ones as new Accounts. Schema 20.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each customer's MRR at each month's end, from the recurring lines of paid
and open invoices: the amount after discounts over the billing interval,
prorations over their part-period. Moves are new, expansion, contraction,
churn and reactivation (sub-dollar noise ignored); NRR monthly and over
12 months; cohorts by first paid month. A start month, suggested when
most of the business appears at once (billing moved to Stripe), makes
those customers the base. Metrics page with a chart, the month table,
cohorts, and each month's customer moves.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Customers, invoices with all their lines (both of Stripe's line shapes),
credit notes, refunds (with their customer) and products: a backfill,
then the Events API every hour, and a new backfill when events have
expired. Metrics page with sync status. Gross margin per product: a
default (60%) and overrides, with names from Stripe's products or the
invoice lines. Schemas 18 and 19.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SEO → Search engines: a pull request that adds the IndexNow key file, a
robots.txt naming the sitemap, and turns the sitemap on when the Hugo
config disables it (checked with a build); IndexNow submissions of pages
that go live through Changes or Briefs once the key file is served; the
sitemaps Search Console has; and, with an API key, Bing's traffic,
searches and crawl issues. NewlyLive no longer queries while a result
set holds the database's only connection.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test asked Gitea for the token's user, which needs read:user; a token
scoped to write:repository (all Supermarket needs) failed. It now checks
the websites' repositories and only names the user when it can.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A brief for a search (a new page) or a page (a rewrite) starts from what
Search Console shows the page for, reads the live top 5 with Claude's web
search (unread results marked, never guessed), and gives the title,
description, H1, angle, sections, questions, internal links to pages we
have, and the questions only the owner can answer. The page is drafted
around those answers, with no invented tests, prices or customers; every
sentence claiming an experience must be confirmed before a pull request
adds or rewrites the page, checked with a Hugo build. Merged pages are
followed to the live site. Schema 17.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Candidates a site has no page for, from Search Console searches it ranks
weakly for, the profile's keywords and customers' problems, the signals'
search lines, and competitors' sitemaps; each checked against our own
pages. Buyer searches first. On request, Claude's web search reads the
live top 3 and types each result (big brand, marketplace, forum, small
site), and keywords are ranked by who has to be beaten. Pick, dismiss or
bring back. Schema 16.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Proposals (at most 3 waiting) for pages on page one without clicks and
for the audit's title and description issues: the AI writes the title
(without the site's suffix, within the pixel budget) and description
from the live page and its searches. A yes syncs a working copy of the
site's Gitea repository (token as a header only), finds the page's Hugo
content file, sets title and description in its front matter, builds
with Hugo to check the page comes out as proposed, pushes a branch and
opens a pull request; it never merges. Merged changes are checked on
the live site, then compared before and after from Search Console.
Hugo is in the image. Schema 15.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A polite crawl of each website (Search Console's busiest pages, the
sitemap, then links; up to 300 pages; robots.txt honoured) checks titles
and descriptions (characters and pixels), headings, canonical, noindex,
status and redirects, broken links (outside ones twice), alt text, Open
Graph, JSON-LD, text without JavaScript, and whether the title says what
the page's main search asks. Issues are ranked by severity, then the
page's clicks and impressions. AI visibility: AI crawlers in robots.txt,
llms.txt, structured data, Organization data. Optional PageSpeed checks.
Weekly in the background, or Audit now. Schema 14.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Connect Search Console posts a form that redirects to accounts.google.com,
which the Content-Security-Policy's form-action didn't list, so browsers
refused it silently. A test now checks every sign-in host is allowed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>