Customization/Board templates

Board templates

The Template Center's 20 whiteboard templates are short descriptions in one file. Change them, remove them or add your own, and they fill in for a customer without extra work.

How templates are built

Every template lives in src/lib/whiteboard/templates.ts. A template doesn't list positions. It describes rows of sections, each with a title, a sticky colour and sample notes, and buildTemplate lays them out:

  • A title, and a How to use this board note on the left from howTo.
  • Sections as frames, with their notes in a grid (cols per row, 2 by default) and an optional background tint.
  • Arrows from section to section in the rows listed in flow.
  • With records: true and a customer, a From the CRM section with live cards for the customer, two contacts and two contracts.

Add a template

Add an entry to TEMPLATES. Its spec is a function, so the notes can use the customer's details (next section):

src/lib/whiteboard/templates.ts
{
  id: "sprint-retro",
  name: "Sprint retro",
  category: "strategy",
  description: "What went well, what didn't and what to change.",
  when: "At the end of every sprint, with the whole team.",
  spec: () => ({
    howTo: ["One idea per sticky", "Vote on the top three", "Agree owners for each action"],
    rows: [
      [
        { title: "Went well", color: "green", notes: ["Shipped on time"] },
        { title: "To improve", color: "orange", notes: ["Too many meetings"] },
        { title: "Actions", color: "blue", notes: ["Move stand-up to async"] },
      ],
    ],
  }),
},

Save. It shows in the Template Center straight away, with a preview, its sections listed under "What's inside", and in search.

Sticky colours are the 12 in StickyColor (src/lib/whiteboard/types.ts): yellow, orange, red, pink, violet, blue, cyan, teal, green, lime, gray and white. Their light and dark values are the --sticky-* tokens in globals.css.

Fill in for a customer

When someone picks a customer, spec receives a TemplateContext with:

FieldWhat it holds
customerThe customer's id and name, or null for a blank template
contactsTheir contacts, primary contact first: id, name and role
contractsTheir contracts that haven't ended: id, title, status, yearly value and end date
ownerThe person making the board

The words(ctx) helper turns these into ready-made phrases with sensible text when there's no customer, such as w.co ("Pinnacle Software" or "the customer"), w.champion, w.contract, w.value and w.renewal. Use them in notes, and add records: true to bring the customer's records onto the board as live cards.

Categories and removing templates

  • Categories are TEMPLATE_CATEGORIES at the top of the file. Add, rename or reorder them there; the Template Center's list and counts follow.
  • Remove a template by deleting its entry. If you remove renewal-plan or stakeholder-map, also remove the sample boards built from them in src/lib/data/whiteboards.ts.
  • Change the look of every template (note size, gaps, section padding) with the constants above buildTemplate.

Suggestions on a new board

An empty board suggests three templates. They're the ids in EmptyBoard, in components/whiteboards/board-page.tsx: one list for boards linked to a customer, one for the rest.

Teach Rune a template

When someone asks Rune for a board, src/lib/board-ai.ts picks the template whose name, or one of its ALIASES, appears in the question, and the customer whose name does. Add the words people use for your template to ALIASES, under its id:

src/lib/board-ai.ts
"sprint-retro": ["retro", "retrospective", "sprint review"],

This matching is simple on purpose, for the demo. With a real model connected (see AI models), give it the template list and let it choose, and even write the notes.