Plan ยท area

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.onDelivery before anything else, and renders the view that matches the delivered convention, such as the create form for napplet: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#

NappKindsSurfacesAppears asBundleMilestone
Polls1068, 1018 (NIP-88)create, view, listContent typeNone, test onlyM3
Wiki30818 (NIP-54)create, edit, view, listContent typeKnowledgeM3
QuestionsNew, with a NIP draftcreate, view, listContent typeKnowledgeM4
TasksNew, with a NIP draftcreate, edit, view, listContent typeOrganizingM4
Sign-up sheetsNew, with a NIP draftcreate, view, listContent typeOrganizingM4
Badges30009, 8 (NIP-58)create, view, listContent typeRecognitionM4
WhiteboardEphemeral, room-scopedopenApp room or pinned appPlayM5
Chess64 (NIP-64)open, viewApp roomPlayM5
TriviaNew, room-scopedopenApp roomPlayM5

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#

ItemMilestone
Template repository with the surface router, theme variables, scope context and publishing helpersM3
Development mode in Flotilla's development buildsM3
Polls, then WikiM3
NIP drafts and napps for Questions, Tasks and Sign-up sheets, and the Badges nappM4
Whiteboard, Chess and TriviaM5