jonas.splinter
Search
Blog

My projects post their own updates

Blockspot, VoucherAlarm and Automate & Tweak can now post to the updates feed on this site through its own API, with the guardrails in the API instead of a review step.

This site has a feed of short updates, with RSS, and until now I wrote every entry myself. Now Blockspot, VoucherAlarm and Automate & Tweak can post to it themselves, through an API of this site. Their posts go live without review. That is my choice, and it means the guardrails have to sit in the API rather than in a person reading each post. This post describes those guardrails in general terms, so you can apply the same ideas to your own site.

From a feed I write to one my projects write

The updates feed collects short notes about what changes in my projects. Writing every entry by hand means the feed depends on me remembering to do it. The projects themselves know when something changes, so letting them post directly is a natural step for this kind of automation.

The catch is that a post going live without review has to be safe by construction. If nobody reads a post before it appears, the API is the only place where a mistake can be stopped. So I designed the rules first, and the rest followed from them.

Each project stays in its own lane

The first rule is about scope:

  • Own access. Each project has its own access, valid only under its own project label. Blockspot can post as Blockspot, and only as Blockspot.
  • Own posts only. A project can correct or withdraw its own posts and touch nothing else. It cannot change what another project wrote, or anything I wrote.

This keeps a problem in one project from spreading. If one of them sends something wrong, the damage is limited to its own posts under its own label, and it can correct or withdraw them itself.

Checks instead of review

Because there is no review step, the API checks every post before it accepts it:

  • Text. Technical details that should never be public are refused.
  • Links. A link to anywhere other than that project's own website is refused.
  • Own id. Each post carries the project's own id, so a retry never creates a duplicate. If a request is sent twice, the feed still shows one post.
  • Envelope. Every answer is a small JSON envelope with ok and a schema version, so a project can tell clearly whether its post was accepted.

The id matters more than it looks. Sending a post and not hearing back is normal on any network, and the safe reaction is to send it again. With the project's own id on every post, sending again is harmless.

The first post through this API went out today: "My projects can now post updates here themselves". Since then, Blockspot and Automate & Tweak have posted their first updates themselves.

Reading before writing

Posting is only half of it. A project can also read the feed through the same access:

  • Recent posts. The latest published updates and blog posts, newest first, for a period it chooses, optionally for one project or one tag.
  • Tags. Every tag that is live on this site, with its page and how often it is used.

That lets a project check what is already in the feed before it writes, so it does not repeat its own news, and pick tags that exist instead of guessing. Reading only returns what is public on this site anyway.

What I do not know yet

Blockspot and Automate & Tweak are connected and have posted; VoucherAlarm is next. A handful of posts says little yet: I cannot tell how the checks hold up over months of real posts, or whether the rules will need adjusting.

Frequently asked questions

Can a project post under another project's name?

No. Each project's access is valid only under its own label, and it can only correct or withdraw its own posts.

What happens if a project sends the same post twice?

Nothing extra. Each post carries the project's own id, so a retry returns the existing post instead of creating a duplicate.

Are the projects' posts reviewed before they go live?

No, that is my choice. Instead the API checks every post: technical details that should never be public are refused, and so are links to anywhere other than that project's own website.

Can a project read the feed too?

Yes. With the same access it can list the most recent posts for a period, and every live tag. That is how it avoids repeating news and picks valid tags.

What to do first

  1. Give each project its own access, valid only under its own label.
  2. Let each project correct or withdraw only its own posts, and nothing else.
  3. Require the project's own id on every post, so a retry never creates a duplicate.
  4. If posts go live without review, check the text and the links in the API before accepting them.
  5. Answer every request with a small JSON envelope that has ok and a schema version.
  6. Let projects read before they write: the latest posts for a period, and the list of valid tags.

The feed itself is on the updates page. On the same day I also wrote about measuring accessibility after a redesign and Lighthouse on every page type.

Related updates

Short notes on the same topics