Automatic submissions
An optional extra. Steps 1 to 3 already make a complete, working directory. Without this,
each submission arrives by email and you add the listing yourself (or import a batch with
npm run submissions:import).
What you get: each submission becomes a draft listing for you to approve, with its logo and details filled in. The submitter’s personal details are emailed to you, and never go into your repository. Your site also keeps a private copy of them for 90 days, in its own store on your host (the one that keeps the rate limits), so the editor shows who sent each submission even if the email goes astray.
Setting up in your browser instead? Start here → Automatic submissions.
You need:
- Put your site online, Connect your forms and Connect GitHub. The submit form must use Formspree, Web3Forms (paid plan) or your own form address: your site emails you the submitter’s details through it.
- A host that runs functions. Not GitHub Pages, and not a Render static site.
With the setup
Section titled “With the setup”Run npm run setup and choose 4. Automatic submissions. It:
- Uses your site’s GitHub app, the one Connect GitHub made, to write the drafts. If there isn’t one yet, it makes it now: GitHub opens with everything filled in; click Create GitHub App for your username, then install it on your site’s repository only (choose Only select repositories). It can touch nothing else. If an App from an earlier setup is there, it offers to use it with a new private key (GitHub makes one in one click; the old one can’t be recovered).
- Saves the App’s three values on Cloudflare. If one can’t be saved yet, it’s kept safe in your system’s keychain, and saved the next time you run the setup: the App’s private key is never lost.
- Creates the spam check (Cloudflare Turnstile), a free check that a visitor is a person, and saves its secret key.
- Asks about AI suggestions for each submission’s categories and tags (optional: your own Anthropic or OpenAI key).
- Sets the limits per visitor, so nobody can flood you (a small store on Cloudflare).
- Puts it live.
Who the pipeline writes as
Section titled “Who the pipeline writes as”| The GitHub App (recommended) | A token from a separate account | |
|---|---|---|
| Setup | Two clicks | A second GitHub account, invited with the Write role, and a token |
| What it can reach | One repository, two permissions | Everything that account can reach |
| Its token | Lasts an hour, made fresh each time | Lasts until you renew it |
| Suits | Almost everyone | A team that already has a bot account |
Never use your own token: it carries your right to skip the review. The setup refuses it.
On a host without functions, there’s nothing to save the key on: the setup keeps it in a file only you
can read, outside your project, and says which. npm run submissions:import reads it from there
(GITHUB_APP_PRIVATE_KEY_PATH).
The spam check
Section titled “The spam check”By hand: make a Turnstile widget in Cloudflare
(Cloudflare’s help), in Managed mode,
with your site’s address, without https://, as its hostname. It gives you two keys: put the site key
in submissions.turnstileSiteKey (in the editor, Settings → Submissions → Spam check: site key;
it’s public), and the secret key on your host as TURNSTILE_SECRET, as a secret.
Secrets go on your host, never in the project:
| Secret | What it is |
|---|---|
| The App’s three values | GITHUB_APP_ID, GITHUB_APP_INSTALLATION_ID, GITHUB_APP_PRIVATE_KEY (or GITHUB_TOKEN for a separate account) |
TURNSTILE_SECRET |
The spam check’s secret key |
AI_API_KEY |
Only with AI suggestions on |
On Cloudflare Workers, set each with npx wrangler secret put NAME, which asks for the value. Other
hosts: Hosting.
The duplicate check (“already listed”, “already waiting for review”) needs no secret: each build writes the listings already in your directory into the function’s own code, never into a public file.
Rate limits
Section titled “Rate limits”5 submissions an hour per visitor, and 1 a day per website. The counts need somewhere to live:
- Cloudflare Workers: a KV namespace. By hand:
npx wrangler kv namespace create RATE_LIMIT, then add the line it prints towrangler.jsoncunderkv_namespaces. The same store keeps the private copy of each submitter’s details (90 days); without it, the email is the only copy. - Netlify: a free Upstash Redis database. Set its
UPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKENon your host. - Render with the Node server: nothing to do on one instance.
Labels
Section titled “Labels”The drafts carry a submission label, and with the editor reviewing listings,
sveltia-cms/pending_review. The setup creates them. By hand: Issues → Labels → New label.
Turn it on
Section titled “Turn it on”By hand: in directory.config.json, set submissions.enabled to true and submissions.repository to
"your-username/your-repository". Then put the site live.
Try it
Section titled “Try it”Send a submission at https://<your site>/submit/, a real product’s website, with your own email
address. Within a minute, a draft appears in your repository on GitHub under Pull requests (and in
the editor, on the Editorial Workflow board under In Review, with who sent it), and the email
arrives, with one link: to the submission in your editor. Check the draft doesn’t contain your name or
email, then delete it in the editor, or close it on GitHub.
No email? Look in Formspree’s Spam folder: its filter can keep the email about a submission there. The editor still shows who sent it.
A dry run, with nothing sent: npm run submissions:test -- https://a-real-product-site.com.
If something’s wrong
Section titled “If something’s wrong”Run npm run doctor. The submitter only ever sees a generic message, so the reason is in your host’s
logs, in lines that start [submissions]. On Workers, run npx wrangler tail to see them.