Example: a complex app

A support desk Pulse, built with bricksui one step at a time.

This shows how to build a bigger Pulse, a support desk, by talking to bricksui in small steps. Each step is one ask. Check the result before you move on.

The replies are shortened. bricksui's real questions will be more detailed.

Don't start like this#

Build a full support desk Pulse: KPIs, a ticket table with filters and search, ticket details with history, SLA alerts, an agent leaderboard and charts. Here's our whole database schema...

That's six widgets and a schema in one go. bricksui will rush, guess field names and miss details.

Step 1: the first widget only#

You: /bricksui A row of three KPI cards: open tickets, high-priority tickets, and SLA breaches. Data from the Supabase table tickets.

bricksui: Which spec version? Is this Pulse or Chat?

You: The version on our dev environment. Pulse.

bricksui: What counts as an SLA breach?

You: status isn't closed and hours_open is over 24.

bricksui: Here's a preview using MetricCardStack. Does it match?

You: Yes.

You get one widget's JSON. Check it with the Checklist before going on.

Step 2: the next widget, separately#

You: /bricksui A new widget: a table of open tickets from tickets. Columns: ticket ID, customer, priority, status. Newest first, 50 rows, live updates.

bricksui: Should priority show as a badge? Which colours for high, medium and low?

You: Badge. High red, medium amber, low grey.

Step 3: one change#

You: Here's the tickets table JSON. Add a status filter above it: All, Open, Pending. Nothing else.

Step 4: one more change#

You: Now add a search box that filters by customer name. Keep everything else the same.

Step 5: the details panel#

You: Add a View button on each row. It opens a side panel with the ticket's details and history. Only fetch the details when the panel opens.

bricksui: I'll use an aside panel with its own data source, so the details load only on open.

Step 6: review#

You: Check this widget against these rules: built-in components, query does the sorting, each API call defined once, no keys in the spec. List anything that breaks them. Don't change anything yet.

Then fix what it finds, one item at a time.

Tip

Six small asks take a few more minutes than one big one. They save hours of fixing a widget nobody understands.