Insurance and claims
The claims preset installs claimants, a claim state machine, approvals, evidence attachments, SLA clocks and comments.
The claims preset is for a claims system in the style of Guidewire. A
claimant reports a claim, an adjuster investigates it with the evidence
attached, a payout above a limit needs approval, and SLA clocks keep each
step on time.
Config
import { defineConfig } from "better-supabase/config";
export default defineConfig({ preset: "claims" });npx better-supabase init --preset claims starts a new project from it, and
npx better-supabase apply --preset claims adds it to one you have
(CLI).
Blocks
The preset is saas plus these blocks, and
whatever they require:
| Block | Role in the app |
|---|---|
| parties | Policyholders, claimants and third parties |
| state-machine | The claim's status, from reported to closed |
| approvals | Payout approval above a limit |
| attachments | Photos, reports and invoices as evidence |
| sla | First contact and resolution clocks |
| comments | Adjusters' notes on the claim |
How the blocks connect
A claim is your own table, registered as a subject, with a state machine on
its status column. Mark the edge to approved with requiresApproval, and
give the approvals policy for claims run: { transition: "approved" }: the
final approval of the payout then runs the transition, and nobody can move a
claim to approved without it (approvals).
SLA clocks start when the claim is reported and pause while it waits on the
claimant.
import { defineConfig } from "better-supabase/config";
export default defineConfig({
preset: "claims",
subjects: {
claim: {
table: "public.claims",
idType: "uuid",
tenant: "organization_id",
},
},
blocks: {
"state-machine": {
options: {
machines: {
claim: {
column: "status",
initial: "reported",
transitions: {
reported: ["investigating", "rejected"],
investigating: ["approved", "rejected"],
approved: ["paid"],
paid: ["closed"],
rejected: ["closed"],
},
requiresApproval: { investigating: ["approved"] },
},
},
},
},
},
});With ReUI
- Data Grid for the claim queue, with Filters on status, adjuster and SLA.
- Stepper for the claim's status on its page.
- Timeline for the claim's history, evidence and notes.
Last updated on
Construction
The construction preset installs punch lists and RFIs as work items, sites in assets, daily logs as forms, drawings with revisions, comments and submittal approvals.
Community
The community preset installs forum boards of voted posts with replies, chat channels, reactions, moderation with reports and bans, post scores, tags and search.