One table maps every address to an area (a module, Settings, anything
signed in, or public); each route is checked against it, and the app won't
start with a route missing from it. Changing needs edit on the module. For
members who may only view, forms that would change something are shown
disabled and htmx buttons hidden. The menu, the Overview, Search and the
SEO emails follow each person's modules; Settings is for admins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings → Users lists everyone with their access and status. Admins
invite people by email (a link for 7 days), as admins or as members with
modules each to view or edit; the invitation's page sets the password,
profile and emails wanted. Admins can resend or withdraw invitations,
change access, turn accounts off and on, unlock, reset two-factor, sign
someone out, and remove them; never the owner, nor themselves. Your
account gets the emails wanted and a photo.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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_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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
The morning check compares the last 7 days of final Search Console data
with the 7 before, by page and by search, and lists only moves past the
thresholds (editable). Each move is explained from the data: the search
whose clicks changed, and whether a position change is real or a change
in the mix of searches. Missing rows are "no data", not zero. The Monday
report has three numbers with where the change came from, the 3 pages
that moved most, and "Waiting for your yes"; it's written each Monday,
kept, and optionally emailed through the outreach mailbox. Schema 13.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PLAN: Phase 3 rewritten around a weekly seven-job SEO loop (what ranks,
next keywords, brief, page, approval, morning check, Monday report),
with chatseo.app's ideas borrowed and rankings from Search Console only.
Google OAuth (PKCE, offline, read-only webmasters scope) from Settings →
Search engines, with each website's property. Search Console is synced
into SQLite by day (site, page, and page+query; 16 months, then twice a
day). SEO → What ranks shows the last 90 days: totals, the share of
clicks from hidden queries, best pages, queries shown but not clicked,
and the pages to protect and to push, each with its numbers. Schema 12.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Posts can be written for a buying signal: the prompt gets its hypothesis
and angle, and links carry its campaign tag. Plausible (Stats API v2) is
read once a day for visitors on tagged links, recorded per signal as
Visited. Stripe (restricted key) is read every hour: $0 checkouts are
Signed up, paid invoices and one-time payments are Paid with their value,
tied to a signal by the checkout's utm_campaign metadata or the payer's
email. The Core's Cal.com has no API, so booking emails from Cal.com in
the outreach mailbox count as Booked. New Settings → Website & sales;
the signal page lists its posts and tagged links. Schema 11.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drafts are written by the AI from the person's buying signal (hypothesis
and angle), their company and their history, then reviewed and edited.
Queued emails go out through the Core's mail server one at a time, within
the sending hours, the daily limit and a gap, never to a suppressed or
bouncing address or someone emailed in the last 14 days; with a signature,
an opt-out line, UTM-tagged links and a copy in Sent. The inbox is read
read-only every 10 minutes: replies (by Message-ID or sender) count as
Replied, bounces mark the address, and "stop" replies are suppressed.
LinkedIn messages are copied, sent by hand and marked sent. New pages:
Prospects → Outreach and Settings → Email (with an SMTP, IMAP, SPF, DKIM
and DMARC check). Schema 10; emersion/go-imap for IMAP.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Schema 7 adds signals (hypothesis, how to spot it, angle, status, utm
slug), funnel_events (stage, channel, subject, campaign, source, deduped
by external ID) and outside_campaigns. Prospects -> Signals is the
scorecard: each signal's funnel from found to paid, people once per
stage, with revenue and outside spend, by period and channel. Each
signal's page shows its funnel by channel, its campaigns and its latest
steps. Prospects carry a signal (filter, change, "found" recorded) and
outcomes can be recorded by hand.
Settings -> Lead sources holds origami.chat and explee.com API keys. Every
6 hours (or Import now) Supermarket reads their campaigns, numbers and
spend, contacted people, replies and hot leads, read-only: interested
people and repliers become prospects, unsubscribes are suppressed, and
each campaign is assigned to a signal. The explee.com client follows its
OpenAPI schema; origami.chat's responses are undocumented, so its client
reads fields loosely and its Test shows the real response.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Schema 6 adds prospect_companies, prospect_contacts (merged by domain and
email, each with its source, detail and date) and suppressions. Prospects
-> Review lists New, Accepted and Set aside: accepting a company queues an
EspoCRM Account, a person a Lead at their company, with provenance and
why they fit in the description; the page warns about records already in
the CRM as of the last sync, and shows each accepted prospect's CRM
progress. Prospects can be added by hand. The suppression list (emails
and domains) is checked on add and again before queueing, and suppressing
sets matching new prospects aside. Search finds prospects too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Supermarket queues CRM work in crm_actions and never writes to EspoCRM
itself. A Hermes cron job (supermarket-crm, set up by `supermarket
hermes`) runs every 15 minutes behind a monitor script that prints
Supermarket's crm-state file, so unchanged state skips the AI run. Hermes
calls the new MCP tools crm_pending_actions, crm_report_result and
crm_ingest, creating each record through the Core's MCP hub unless a
match exists, and copying Leads, Accounts and Contacts back every 6 hours
for duplicate checks. Schema 5 adds crm_actions and crm_records.
Prospects -> CRM queue shows the queue, a test Lead, sync, Retry and
Cancel. When an action fails with a connection error, the page checks
EspoCRM from this computer and says whether the CRM is down or the hub
can't reach it, with a note to send to the Core's maintainer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LinkedIn:
- The API version was fixed at 202501, retired by LinkedIn (426
NONEXISTENT_VERSION). It's now the month before last, stepping back a
month (up to four) if LinkedIn says a version isn't active.
- The versioned Posts API needs a title for a link's article card (422).
Supermarket reads the linked page's title and description and sends
them, falling back to the page's address as the title.
Tested for real: a post with a link went out to the member's profile.
Inbox is now Posts: the menu, page, messages and docs; the page moves to
/posts, and /inbox redirects there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sidebar logo, the tab icons (favicon.ico at 16-64 px and a PNG) and a
new 180 px home-screen icon are made from neon-S-white.png, cropped a
little so the S fills them. The logo is a rounded tile with a soft shadow
so it stands out on the light sidebar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LinkedIn tokens last 60 days and can't be renewed without signing in
again. The expiry LinkedIn reports is now recorded (60 days from sign-in
for older connections). The LinkedIn card says until when; from two
weeks before, the Overview, the Inbox and the card remind you, with a
Reconnect button. Once expired, LinkedIn counts as not connected, due
posts come back to the Inbox saying why, and a 401 from LinkedIn reads
"reconnect LinkedIn" instead of the raw error.
Also fixes a leftover "Settings → Credentials" in a publish error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- X refuses "localhost" in callback URLs, so its sign-in now uses
http://127.0.0.1:8470/auth/x/callback (shown on the page and sent to X);
LinkedIn and Reddit keep localhost.
- Every key, on Social accounts and the AI tab, has a "Get it" link to the
service's page for it (opens a new tab) and says where on that page to
find it. Addresses checked on 2026-11-21.
- Each network's card saves its own keys in place (htmx swaps the card),
saying "Saved." and enabling Connect when ready; no reload. Without
JavaScript it still saves and reloads.
- The shopping-cart image is the logo in the sidebar, the tab icon (PNG,
and a multi-size favicon.ico at /favicon.ico) and the touch icon.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Left sidebar as in brain: search at the top (press /), Overview,
Inventory, the modules (Content with Inbox, Sources, Scheduled and
Published; later phases greyed out), Settings at the bottom; a top bar
with breadcrumbs, and a menu that slides in on narrow screens.
- brain's colour tokens, type, radius and shadows, with a dark theme that
follows the system setting.
- Settings as grouped tabs: Profile; Social accounts (was Credentials, now
keys and sign-in together per network); Core & Hermes; AI, which now
holds the API keys too. Old addresses redirect.
- /search matches every word across posts, fetched items, the inventory,
products and settings pages.
- Overview: a card per module, then the setup checklist, folded once done.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Inbox: a top-level page, with a count in the menu, for everything
waiting for approval; Content's drafts are reviewed there. /drafts
redirects to it.
- Scheduling: publish a draft now or at a time (migration 3 adds
publish_at). A scheduler in the app publishes due drafts every 30
seconds. Posts more than 12 hours overdue, or refused before posting,
go back to the Inbox with the reason. Content gets Scheduled and
Published tabs.
- UTM tags on links to the company's own websites and product pages,
added when publishing; drafts stay untagged.
- The container runs in the computer's time zone, so times are shown
and read correctly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings back posting, which Phase 0 removed with the terminal interface.
- Content page: per inventory entry, fetch its X account, X hashtag
search, YouTube channel and RSS/Atom feeds (new), then select, dismiss
or restore the fetched items, which are kept in the database.
- Writing: one AI call returns a draft per channel (X and LinkedIn),
prompted from the company profile, the entry's relationship, talking
points and mention policy, and each channel's rules. Fetched text is
quoted as untrusted. An over-long X draft gets one request to shorten.
- Drafts page: edit with a live length counter that counts like X, then
publish each draft on its own. A draft is claimed before posting so it
can't go out twice; failures are kept on the draft for a retry; X
tokens are refreshed and saved.
- Migration 2 adds content_items and drafts, and turns queued posts into
drafts for the platforms they hadn't reached.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The logo was split as Core<span>marketing</span>, so searches for the old
name missed it during the rename.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the old Go TUI with a web app (port 8470) that runs in a
container as a CoreDesktop sibling:
- cmd/supermarket server with htmx web UI: dashboard, company profile,
inventory (partners/competitors), AI and credential settings, and a
Core & Hermes page
- SQLite storage and a secrets store under ~/.local/share/supermarket
- AI providers (Anthropic, OpenAI-compatible) behind one interface
- MCP server and a Hermes bridge to the Federated Core MCP hub
- Import of the old Coremarketing TUI's state
- install.sh / update.sh / lib.sh, Dockerfile, compose.yaml, the
bin/supermarket launcher and hermes/setup.sh
Posting is not wired back up yet; that comes in Phase 1. See PLAN.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>