The multi-tenant edition's plans (Free and Paid as decided, or a plans
file) and each team's billing account, with a 14-day trial of Paid. A
team's plan caps what its people and agents may change: modules outside it
stay readable, a lapsed team changes nothing, and agents, Market entries,
crawls and background jobs keep to it. Without a Stripe key, no billing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Admins make the client's secret under Settings → Sign-in, which shows the
entry for the Core's idproviders.yml (the secret's PBKDF2-SHA512 hash, the
redirect address, PKCE). People sign in with their Core account: invited
ones are matched by verified email, then by subject; optionally anyone at
the Core's domain joins. Passwords can be turned off but for the owner's,
and signing out ends the Core's session where it can. On multi-tenant, the
team is found by its proved domain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The people running the multi-tenant service (SUPERMARKET_PLATFORM_ADMINS,
with two-factor sign-in) see every team at /platform with its size, people
and what failed lately, and can suspend or restore a team, resend its
invitations and release its domain. They don't see a team's data unless
they view as it: with a reason, for at most an hour, read-only, recorded in
the team's own audit log.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Background jobs run for each active team on its own Server and under its
own locks, a few teams at a time and from a different team each round, so
the work is shared between copies of the app and no team holds up another.
Each team's files are under its own prefix, and an OAuth sign-in comes
back only to the team that started it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the multi-tenant edition anyone can set up a team: their account, the
company and its website, whose registered domain the team works on (the
profile keeps to it). A person can belong to several teams and switch
between them from the sidebar, or set up another. Inviting someone who has
an account adds them to the team.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the multi-tenant edition each team's data is in its own schema; the
tables every team shares (people, sessions, memberships, keys, locks, and
a new teams table) stay in the main one. A team's connection pool searches
its own schema first, so the app's SQL runs unchanged and can't reach
another team's tables. Each request is served by a copy of the Server for
the viewer's team, with that team's database, secrets and caches; agents
work on their own team's. The local and server editions are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/api/v1 offers the MCP tools as plain HTTP for scripts: GET /api/v1/tools
lists what a key may call, POST /api/v1/<tool> calls one with JSON. Each
call goes through /mcp internally, so keys, scopes, limits, logging and
approvals are the same. /api/v1/docs documents every tool.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>