Build a widget
A widget is a folder of plain web files with a manifest. myPA runs it in a sandbox and hands it a small API. Any framework works, as long as it builds to static files.
1. Start from the template
The mypa-widget tool lives in the myPA repo at packages/widget-sdk and runs on Node 24 with no install step.
node packages/widget-sdk/bin/mypa-widget.ts init focus-sounds --id you.focus-sounds
In myPA, open Add widget, Browse the marketplace, Developer, then Load unpacked folder. Your widget reloads every time you save.
2. Describe it in manifest.json
{
"schema": 1,
"id": "you.focus-sounds",
"name": "Focus sounds",
"version": "1.0.0",
"summary": "Rain, cafe and brown noise to work to.",
"publisher": { "id": "you", "name": "Your name" },
"icon": "music",
"category": "focus",
"entry": "index.html",
"size": { "w": 320, "h": 240 },
"permissions": [],
"settings": [
{ "key": "volume", "label": "Volume", "type": "number", "default": 60, "min": 0, "max": 100 }
]
}The id must start with your publisher ID. icon is one of timer, repeat, link, hourglass, globe, cloud-sun, target, quote, calculator, music, book-open, bar-chart, heart, zap, puzzle, sparkles, clock, list-checks. category is one of productivity, focus, planning, tracking, information, fun. Settings become a form in the widget's gear panel.
3. Talk to myPA through the SDK
<link rel="stylesheet" href="/__mypa/theme.css" />
<script src="/__mypa/sdk.js"></script>
<script>
mypa.ready.then(async ({ settings }) => {
const plays = (await mypa.storage.get("plays")) ?? 0;
await mypa.storage.set("plays", plays + 1);
});
mypa.onSettings((s) => setVolume(s.volume));
</script>theme.css gives you myPA's colours, Poppins and ready-made .btn and .field styles, so your widget looks at home. Storage is private to each copy of your widget on a board.
4. Ask only for what you need
Widgets can't reach the network or your data directly. Declare what you need:
tasks:readSee your tasks and goalstasks:writeAdd tasks to your to-do listcalendar:readSee your calendar eventsnotifyShow desktop notificationsnet:api.example.comCall that host over https withmypa.fetch
5. Pack, upload, get paid
mypa-widget pack focus-sounds ✔ Packed you.focus-sounds-1.0.0.mypawidget
Sign in, create your publisher profile and drop the file on your dashboard. We review new publishers' widgets before they're listed; verified publishers go live immediately. To sell, set a price and connect Stripe. Buyers get a license key the moment they pay, and you keep 85% of every sale.
Getting the checkmark
Verified publishers have their identity confirmed by us. The myPA team grants it after reviewing a publisher with a track record. Official is reserved for widgets made by myPA.