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>
This commit is contained in:
@@ -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, in progress: X and LinkedIn work |
|
||||
| Content | Drafts posts from partner and competitor news and your own products; you review them and publish to X, LinkedIn and Reddit | Phase 1, in progress: X, LinkedIn and Reddit work |
|
||||
| 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 most of the Content module (Phase 1): fetching, writing drafts, an Inbox for approval, scheduled publishing to X and LinkedIn, 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 most of the Content module (Phase 1): fetching, writing drafts, an Inbox for approval, scheduled publishing to X, LinkedIn and Reddit, and UTM tags. See [PLAN.md](PLAN.md) for the whole plan.
|
||||
|
||||
## Install
|
||||
|
||||
@@ -103,12 +103,25 @@ Links to your own websites and product pages (from the profile) get UTM tags whe
|
||||
|
||||
Reading X needs a bearer token from an X API plan with read access; YouTube needs a free API key; RSS needs nothing. Posting needs the sign-ins below.
|
||||
|
||||
## Signing in to X and LinkedIn
|
||||
### 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 the Inbox. 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.
|
||||
|
||||
Before you publish, the Inbox 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.
|
||||
|
||||
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.
|
||||
|
||||
## Signing in to X, LinkedIn and Reddit
|
||||
|
||||
Sign-ins come back to Supermarket at `http://localhost:8470/auth/<provider>/callback`. Register these callback URLs in your apps:
|
||||
|
||||
- X developer portal, your app's *User authentication settings*: `http://localhost:8470/auth/x/callback`
|
||||
- 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 → Credentials
|
||||
|
||||
The old terminal app used `http://localhost:8080/callback`; you can remove that one.
|
||||
|
||||
@@ -138,7 +151,7 @@ SUPERMARKET_DATA=/tmp/cm SUPERMARKET_ADDR=127.0.0.1:8470 go run ./cmd/supermarke
|
||||
| `internal/legacy` | One-time import from the old terminal app |
|
||||
| `internal/content` | The Content module: fetched items, per-channel drafts, prompts, scheduling, publishing |
|
||||
| `internal/utm` | UTM tags for links to the company's own sites |
|
||||
| `internal/api`, `internal/fetcher` | X, LinkedIn, YouTube and RSS clients, and fetching for an inventory entry |
|
||||
| `internal/api`, `internal/fetcher` | X, LinkedIn, Reddit, YouTube and RSS clients, and fetching for an inventory entry |
|
||||
| `hermes/setup.sh` | Connects Hermes |
|
||||
|
||||
Database changes go in `internal/db/db.go` as a new migration; never edit one that has shipped.
|
||||
|
||||
Reference in New Issue
Block a user