Phase 10, part 9: the server package

compose.server.yaml runs Supermarket behind Caddy (HTTPS from Let's
Encrypt, Caddy's own CA or the team's), with Postgres on an internal
network and a nightly pg_dump kept two weeks. install-server.sh asks for
the domain, certificate and mail server, makes the secret key and database
password, starts it all and prints the setup link. Settings → Backups lists
the dumps on a server, and how the operator restores one. Checked end to
end in Docker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 09:37:34 -07:00
co-authored by Claude Opus 5.5
parent c8964cec12
commit da16736fb4
15 changed files with 532 additions and 17 deletions
+37 -2
View File
@@ -797,8 +797,8 @@ Throughout, also notice:
64-digit key each time.
- [ ] Started with `SUPERMARKET_MODE=server` and nothing else, Supermarket
doesn't start: its log names each missing setting (database, secret
key, mail, an https:// address). With them all set, it says the
server edition isn't built yet. `supermarket config` never shows a
key, mail, an https:// address). With them all set, the server edition
starts (Phase 10); multi-tenant says it isn't built yet. `supermarket config` never shows a
password or the key.
- [ ] `supermarket config` also checks the file storage ("writable"), and on
the other editions that Postgres can be reached. With a wrong S3 key or
@@ -814,3 +814,38 @@ Throughout, also notice:
aren't in it. With `--with-secrets`, it says how many are, and warns.
- [ ] `supermarket import <that file>` on this install refuses: the database
isn't empty. Nothing changes.
## 14. The server edition (Phase 10)
On the local edition first:
- [ ] Nothing asks anyone to sign in; Settings has no Users or Your account.
Every form still works (each now carries a hidden `csrf` field).
- [ ] Your old X, LinkedIn and Reddit sign-ins show under Social accounts as
the company's accounts, with *Sign out*; Settings → Posting accounts
lists them. A LinkedIn draft's *Post as* lists the member and the page.
- [ ] Settings → All connections lists every service, who connected it, and
the last Test; a failing Test shows there as *Failing*.
- [ ] Settings → Activity shows what you published and deleted.
On a server (`./install-server.sh`; with Caddy's own CA on a test machine):
- [ ] The setup link from the install creates the owner and opens the
company profile; the link doesn't work twice. Before it's used, every
page says Supermarket isn't set up yet.
- [ ] Signing out and in works; a wrong password says so without saying
whether the address has an account. Five wrong tries for an address
make it wait; ten in a row lock the account and email its owner.
- [ ] *Forgotten your password?* emails a link that works once, for an hour;
afterwards the old sessions are signed out.
- [ ] Your account: turn on two-factor sign-in from the QR code; signing in
then asks for the code; a recovery code works once.
- [ ] Settings → Users: invite an admin and a member with only SEO (edit).
Both get emails; the invitation's page sets their password.
- [ ] The member sees only SEO in the menu and on the Overview; every
other module and Settings answer *No access*. With SEO as *view*,
SEO's pages show their forms greyed, without buttons.
- [ ] The member connects their own X under Your account and posts as it;
they can't choose the company's account until it's ticked for them on
Settings → Posting accounts.
- [ ] Settings → Activity shows each step above, with who and from where.
- [ ] Settings → Backups lists the nightly dump the morning after.