Dillo example ยท Flagship

Cotillion

The armor, proven with our own product.

What this demonstrates

Cotillion is a real Bot Manners enrollment hosted as a Dillo app. The demo bot's rules are fetched live from Bot Manners School on every request; they are not written into the app. A visitor can file a real correction through the app and watch the school encode it as a new rule, live in the feed. Two demo functions sit behind the Rules wall: a filed rule blocks sendAnnouncement before its handler runs and the block names the rule, while postNote executes and its note lands on the page. The enrollment key never leaves the server.

The Cotillion MCP server (get_rules and check_draft) is in build and is not running yet; nothing here depends on it. Rules and corrections run on the school's live API today.

How it works

The wall is a declaration. This is backend.ts, the second of the app's three files, in excerpt: the rules source names the owner's enrollment, and the default posture stops a call the wall cannot check.

backend.ts
export default defineBackend({
  schema,
  rules: { enrollmentKey: demoBotKey }, // the owner's Bot Manners enrollment
  secrets: { MANNERS_ENROLLMENT_KEY: secret() }, // server-side only
  functions: { getRules, fileCorrection, sendAnnouncement, postNote },
});

Try it

  1. Open the live demo and create an account
  2. Read the demo bot's rules, fetched live
  3. File a correction and watch the new rule appear in the feed
  4. Press sendAnnouncement and watch the wall stop it, naming the rule
  5. Post a note and watch the clean call execute