Reddit: posted by hand, with the rules pasted

Reddit's API isn't open to apps like this one, so Supermarket no longer
signs in to Reddit, publishes or schedules there, or reads subreddits and
the account's posts. The internal/api/reddit client, Reddit's OAuth, its
keys and its Social accounts card are gone.

Supermarket still writes the post. Each Reddit draft in Posts has a box
for its subreddit's rules, with a link to them on Reddit: pasted once,
they're kept (subreddits.data, as pasted_rules) and given to the model
for later drafts. Open in Reddit saves the edits and opens the submit
page filled in; Copy title and Copy text (with the tagged source link)
cover a box that comes up empty; Mark as posted records it. Warnings come
from the pasted rules and the posts marked as posted. Fill's subreddit
suggestions are kept unchecked, and say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 11:48:54 -07:00
co-authored by Claude Opus 5.5
parent bae468e01c
commit 5451fe6d63
33 changed files with 382 additions and 1107 deletions
+15 -15
View File
@@ -6,13 +6,13 @@ Everything starts from your **company profile** (what you sell, to whom, in what
| Module | What it does | Status |
|--------|--------------|--------|
| Content | Drafts posts from partner and competitor news and your own products; you review them and publish to X, LinkedIn and Reddit | Phase 1: done |
| Content | Drafts posts from partner and competitor news and your own products; you review them and publish to X and LinkedIn, and post Reddit ones yourself | Phase 1: done |
| Prospects | Finds companies and people who fit your targets; the ones you approve go into your Core's EspoCRM through Hermes | Phase 2 |
| SEO | Audits your websites for Google, Bing/DuckDuckGo and Brave, and opens fixes as pull requests on your Hugo repositories | Phase 3 |
| Metrics | Pipeline influence, CAC, CLV and NRR, from Stripe, EspoCRM and Plausible | Phase 4 |
| Sites | Builds pages and sites from a component library and publishes them through Gitea | Phase 5 |
This version has the foundation (Phase 0): the web app, the company profile, the inventory, the AI provider, credentials, and the bridge to your Core through Hermes. It also has the Content module (Phase 1): posts about partners, competitors and your own products, a Posts page for approval, scheduled publishing to X, LinkedIn and Reddit, and UTM tags. See [PLAN.md](PLAN.md) for the whole plan.
This version has the foundation (Phase 0): the web app, the company profile, the inventory, the AI provider, credentials, and the bridge to your Core through Hermes. It also has the Content module (Phase 1): posts about partners, competitors and your own products, a Posts page for approval, scheduled publishing to X and LinkedIn, Reddit posts written for you to post yourself, and UTM tags. See [PLAN.md](PLAN.md) for the whole plan.
## Install
@@ -36,8 +36,8 @@ Then open Supermarket and:
1. **Settings → AI**: Anthropic, with Hermes' key (shared by `supermarket hermes`) or your own, or an LLM server on your network, such as Ollama. Servers found by CoreDesktop's `configure ai-servers` are offered.
2. **Settings → Profile**: enter your website and press *Draft*. Correct the draft and save it.
3. **Inventory**: add your partners and competitors, or import a list. On an entry, *Fill in the empty boxes* reads their website: links, accounts and feeds come straight from the pages, and the AI drafts a description, talking points set against your profile, keywords, hashtags and subreddits. Suggested subreddits are checked with Reddit first (with the Reddit client ID and secret saved), and ones that don't exist, are private or are restricted are left out. What you typed stays; nothing is saved until you press Save.
4. **Settings → Social accounts**: connect X, LinkedIn and Reddit.
3. **Inventory**: add your partners and competitors, or import a list. On an entry, *Fill in the empty boxes* reads their website: links, accounts and feeds come straight from the pages, and the AI drafts a description, talking points set against your profile, keywords, hashtags and subreddits. Suggested subreddits aren't checked with Reddit: open each before posting there. What you typed stays; nothing is saved until you press Save.
4. **Settings → Social accounts**: connect X and LinkedIn. Reddit needs nothing: you post Reddit drafts yourself.
The menu on the left has a search box at the top (press `/` to jump to it), then the **Overview** with a card per module, the **Inventory**, and the modules: **Content** (Posts, Sources, Scheduled, Published), and the ones still to come. **Settings**, at the bottom, holds the Profile, Social accounts, Core & Hermes, and AI. Search finds posts, fetched items, inventory entries, your products and settings pages. The look follows brain (Federated's superbrain), including a dark theme that follows your system's setting.
@@ -187,23 +187,23 @@ Reading X needs a bearer token from an X API plan with read access; YouTube need
### Reddit
A Reddit draft is a title and a text for one subreddit, which you choose when writing (suggestions come from the entry's and the profile's subreddits). The subreddit's rules and posting guidelines are read, given to the model, and shown with the draft in Posts. Reddit drafts are written as a community member who says where they work, without hashtags or marketing language. The source link goes at the end of the text; a subreddit that only takes links gets the title and the link.
Reddit's API isn't open to apps like Supermarket, so Reddit posts are written by Supermarket and posted by you. A Reddit draft is a title and a text for one subreddit, which you choose when writing (suggestions come from the entry's and the profile's subreddits). It's written as a community member who says where they work, without hashtags or marketing language. The source link goes at the end of the text.
Before you publish, Posts warns, without blocking, when:
- the subreddit has a rule about self-promotion, is restricted, or doesn't take that kind of post,
- you posted in that subreddit in the past week,
- more than 1 in 10 of your posts in the past 30 days would link to your own sites (Reddit's guideline),
- the account has no posts yet.
Supermarket can't read a subreddit's rules either, so you paste them: each Reddit draft in Posts has a box for its subreddit's rules, with a link to them on Reddit. Pasted once, they're given to the model for every later draft for that subreddit.
Reddit's Data API terms need Reddit's approval for commercial use. Supermarket is meant for a few hand-approved posts, never volume or automation: every post needs you to press Publish or Schedule.
To post: *Open in Reddit* saves your edits and opens the subreddit's submit page with the title and text filled in (links to your sites tagged); *Copy title* and *Copy text* are there for a box that comes up empty. Post it on Reddit, then *Mark as posted*, with the post's link if you like: it moves to Published.
## Signing in to X, LinkedIn and Reddit
Posts warns, without blocking, when:
- the draft promotes your own work,
- the pasted rules have a line about self-promotion, advertising or spam,
- you marked a post in that subreddit as posted in the past week.
## Signing in to X and LinkedIn
Sign-ins come back to Supermarket at `http://localhost:8470/auth/<provider>/callback` (X: `127.0.0.1` instead of `localhost`). Register these callback URLs in your apps:
- X developer portal, your app's *User authentication settings*: `http://127.0.0.1:8470/auth/x/callback`. X refuses `localhost` in callback URLs; `127.0.0.1` is the same machine, and Supermarket sends X this address.
- LinkedIn developer portal, your app's *Auth* tab: `http://localhost:8470/auth/linkedin/callback`
- Reddit, [reddit.com/prefs/apps](https://www.reddit.com/prefs/apps): create a **web app** with the redirect URI `http://localhost:8470/auth/reddit/callback`, and put its client ID and secret under Settings → Social accounts
The old terminal app used `http://localhost:8080/callback`; you can remove that one.
@@ -251,8 +251,8 @@ unlocks it). Settings → Activity shows who did what.
**Social accounts and Search Console.** Each service's developer app needs the
server's addresses as its redirect URLs: `https://<domain>/auth/x/callback`,
`…/auth/linkedin/callback`, `…/auth/linkedin-page/callback`,
`…/auth/reddit/callback` and `…/auth/google/callback`.
`…/auth/linkedin/callback`, `…/auth/linkedin-page/callback` and
`…/auth/google/callback`.
**Backups.** Postgres is dumped every night at 03:00, and two weeks of dumps
are kept, in the `pgbackups` volume; Settings → Backups lists them and says