First-party napps
The hosting panel needs apps to offer, and content surfaces need a reference napplet to prove they work. This page covers the kit for writing Flotilla-ready napplets and the apps proposed for the first catalog.
Authoring kit#
The kit is a template repository. It builds a single index.html with Svelte and Vite, and uses @napplet/vite-plugin to write the manifest and @napplet/sdk for the domains. It adds four pieces Flotilla's surfaces need.
- A surface router. It registers
intent.onDeliverybefore anything else, and renders the view that matches the delivered convention, such as the create form fornapplet:kind-30818/create. - Theme variables. It maps NAP-THEME colors and fonts to CSS variables, so a napplet matches the space's theme and follows changes.
- Context. It reads
context.get()and loads the space's NIP-11 document or the room's metadata, so the napplet can show names and hide moderation controls from members who aren't admins. - Publishing helpers. They build templates for the napplet's kinds and treat the first publish of the surface's kind as the end of a create or edit surface.
Authors deploy with the napplet CLI, which uploads the artifact to Blossom and publishes the manifest and, with P7, a snapshot.
Development mode#
Flotilla's development builds can load a napplet from a local URL. The napplet gets an unsigned development identity, and a badge marks it, as Paja does with development wrappers. Production builds don't include the option. Authors can then try a napplet in a real space with real surfaces before deploying it.
Kinds#
New content types use existing NIP kinds where one fits. A new kind gets a NIP draft before it ships in a bundle, so other clients can render it and the alt text isn't its only description. Napplets always set alt on the events they publish, which gives every client a fallback.
Proposed napps#
| Napp | Kinds | Surfaces | Appears as | Bundle | Milestone |
|---|---|---|---|---|---|
| Polls | 1068, 1018 (NIP-88) | create, view, list | Content type | None, test only | M3 |
| Wiki | 30818 (NIP-54) | create, edit, view, list | Content type | Knowledge | M3 |
| Questions | New, with a NIP draft | create, view, list | Content type | Knowledge | M4 |
| Tasks | New, with a NIP draft | create, edit, view, list | Content type | Organizing | M4 |
| Sign-up sheets | New, with a NIP draft | create, view, list | Content type | Organizing | M4 |
| Badges | 30009, 8 (NIP-58) | create, view, list | Content type | Recognition | M4 |
| Whiteboard | Ephemeral, room-scoped | open | App room or pinned app | Play | M5 |
| Chess | 64 (NIP-64) | open, view | App room | Play | M5 |
| Trivia | New, room-scoped | open | App room | Play | M5 |
Polls comes first because Flotilla already has native polls. Running both side by side shows whether the content surfaces can reach parity with a native type: creating from chat, items in chat, voting, the list and detail pages, and unread dots. It stays out of the catalog while native polls exist.
Wiki is the first real content type. NIP-54 already defines its kind, it has an edit surface, and it gives the Knowledge bundle a core app.
Questions, Tasks and Sign-up sheets each need a new kind, so each starts with a NIP draft.
Badges gives admins a way to recognize members with NIP-58 badges. Its create surface defines a badge, and awarding happens from the badge's detail page.
Whiteboard, Chess and Trivia exercise app rooms. They're live and shared by everyone in a room, and they test the room scope.
Napplets that other authors publish to napplet.run can join the catalog after review, starting with games and tools that only need reads.
Work#
| Item | Milestone |
|---|---|
| Template repository with the surface router, theme variables, scope context and publishing helpers | M3 |
| Development mode in Flotilla's development builds | M3 |
| Polls, then Wiki | M3 |
| NIP drafts and napps for Questions, Tasks and Sign-up sheets, and the Badges napp | M4 |
| Whiteboard, Chess and Trivia | M5 |