Feed service
The feed service answers one question: given this request, which pilets should load? It is the operational control plane for your micro frontend system.
The protocol
The app shell makes one GET request at startup:
The feed responds with a JSON array:
Feed item fields
Runtime configuration via config
The config field is underused. It lets you parameterise pilet behaviour from the feed — changing it without redeploying the pilet:
Different environments, tenants, or experiment groups can receive different configs. One pilet build, multiple runtime behaviours.
Hosting options
Piral Cloud — the official, managed feed service from the Piral team, and the recommended starting point. It adds a dashboard for managing pilets, canary rollouts, instant rollback, and per-user targeting.
- Learn about it at piral.cloud.
- To get started, the online community edition at feed.piral.cloud is free of charge — ideal for evaluation and small projects.
- For production, request a demo and a license via partner.piral.cloud. That gives you the ability to run the feed service on-premises for production workloads, and to get professional support backing your project.
Static JSON — The simplest possible feed: a .json file hosted on a static CDN. Useful for demos, integration tests, and simple internal tools. Zero infrastructure, no targeting, no rollback.
Self-hosted — Implement the protocol yourself. The sample-pilet-service provides a Node.js reference implementation. See Custom feed services for a production guide.
Per-user pilet targeting
Because the feed has the user's auth token, it can return different pilet sets for different users:
Users who shouldn't see an admin pilet never receive it — and never download its code. This is stronger than route-level guards inside a pilet.
Rollback
To roll back a misbehaving pilet:
- Update the feed to return the previous version (
version+linkfields) - Users who reload get the old version
- The app shell does not need to change or redeploy
With Piral Cloud, this is a single click. With a self-hosted feed, it's a database update. Either way: no CI pipeline, no git revert, no on-call emergency.
Cache GET /api/v1/pilets at your CDN with a short TTL:
Most requests are served from cache (fast), but the cache refreshes every 30 seconds. A rollback propagates to all users within 30–60 seconds of the database update.
Publishing a pilet
pilet publish POSTs to the feed's publish endpoint. When you have a browser available, prefer the interactive login — you don't have to handle or paste any secret:
For CI/CD and other automation, use an API key instead (typically from a secret):
The feed unpacks the .tgz, extracts the bundle, uploads it to your CDN, and records the new version. The next feed response will include it.