Commit Graph
7 Commits
Author SHA1 Message Date
davidandClaude Opus 5.5 f4c31c9fa3 Phase 13, part 9: running at scale, and the proof
The multi-tenant edition starts. compose.multi.yaml runs several copies
behind Caddy, with the managed Postgres and Garage outside. A test walks
every page and fragment, with ids filled in, and every MCP tool, as one
team, and none shows another team's data or changes it; another has three
copies share six teams' work, each team's turn once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 12:46:01 -07:00
davidandClaude Opus 5.5 8040512a18 Phase 10, part 3: signing in and out, resets, locks and two-factor
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>
2026-11-25 09:01:29 -07:00
davidandClaude Opus 5.5 d2f1658708 Phase 9, part 5: file storage, a folder or an S3 bucket
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>
2026-11-25 07:42:11 -07:00
davidandClaude Opus 5.5 c76a7791ee Phase 9, part 4: secrets in the database, encrypted
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>
2026-11-25 07:31:41 -07:00
davidandClaude Opus 5.5 7a857c7346 Phase 9, part 1: editions and their settings
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>
2026-11-25 06:55:30 -07:00
davidandClaude Opus 5.5 d039484a4a Phase 0: turn Supermarket into a Dockerized local web app
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>
2026-11-19 08:38:09 -07:00
davidandClaude Opus 5.5 4d304cd65b Stop committing credentials; fix posting length, partial posts, and data safety
- Untrack config.yaml (now gitignored) and add config.example.yaml with
  blank credentials; install.sh copies the example and sets mode 600
- Reserve room for the appended source link when asking Claude for a
  post, count length the way X does, and refuse over-length tweets
  before posting
- Return https://x.com/i/status/<id> for posted tweets
- Track which platforms each queued post reached so a partial failure
  can be retried without double-posting
- Write config, state, posts and dismissed files atomically with 0600
- Keep refreshed Twitter tokens in memory if saving them fails, and log
  the failure instead of writing to the hidden stderr
- Exit with a clear message on corrupt data files instead of panicking
- Surface save errors in the UI; show status/error messages on home
- Add tests for X length counting, the post store, and token updates

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 06:14:40 -07:00