Commit Graph
8 Commits
Author SHA1 Message Date
davidandClaude Opus 5.5 5ea620a091 Phase 3 part 1: Search Console and what already ranks
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>
2026-11-22 07:17:37 -07:00
davidandClaude Opus 5.5 9c62680927 Remind before LinkedIn's sign-in expires, and stop posting once it has
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>
2026-11-21 11:43:59 -07:00
davidandClaude Opus 5.5 a2c8889599 Log OAuth sign-ins and failures; show providers' error text unescaped
Sign-in starts (with the redirect URI sent) and failures are logged, so
a failed connection can be diagnosed from `supermarket logs`. LinkedIn
sends error_description HTML-escaped, which showed as &quot; on the
error page; it's unescaped before display.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 11:39:27 -07:00
davidandClaude Opus 5.5 1f181ed554 Social accounts: X's 127.0.0.1 callback, "Get it" links, save in place; cart logo
- 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>
2026-11-21 11:01:01 -07:00
davidandClaude Opus 5.5 a89121f1ec Redesign the UI on brain's look: sidebar with search, Overview, modules, grouped Settings
- 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>
2026-11-21 07:50:24 -07:00
davidandClaude Opus 5.5 81a7d0596c Let Supermarket use Hermes' Anthropic key and model
Hermes is already set up with an Anthropic key, so AI needn't be set up
twice. `supermarket hermes` asks once, then it and update.sh copy just
the key and model to hermes-ai.json in the data folder (0600). The app
uses them when it has no key of its own, re-reading the file on each use.

Generation still calls the model directly rather than through Hermes'
API: post writing feeds it text from the web, which must not reach an
agent with a terminal, a browser and write access to the CRM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 14:58:06 -07:00
davidandClaude Opus 5.5 0e34f574b7 Phase 1, part 3: Reddit
- Sign in with a Reddit web app; access tokens refresh automatically,
  and an app-only token reads rules before sign-in.
- Reddit drafts: a title and text for one subreddit, chosen when
  writing. The subreddit's guidelines and rules go into the prompt, which
  asks for a community member's post that discloses the affiliation and
  avoids marketing language.
- The Inbox shows the subreddit's rules (cached for a day, with Refresh)
  and warns, without blocking, about promotion rules, restricted
  subreddits, link-only subreddits, posting in the same subreddit within
  a week, more than 1 in 10 recent posts linking to the company's sites,
  and new accounts.
- Publishing makes a text post with the source link at the end, or a
  link post where the subreddit takes only links.
- Migration 4 adds the draft's title and subreddit, and the rules cache.
  Publishers now take a Post, which carries the title and subreddit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 13:51:16 -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