# Deadlines

> Platform-owned rule sets per jurisdiction and kind, versioned and approved once with a content hash and a citation per rule, and the deadlines computed from a subject's facts: due on a date or unknown with the facts still missing.

- Category: Work management
- Module: `deadlines`
- Modes: `managed`, `custom`
- Docs: https://bettersupabase.com/docs/blocks/deadlines
- Page: https://bettersupabase.com/blocks/deadlines

## Install

```bash
npx better-supabase add deadlines
```

The command also installs `updated-at`, `memberships`, `permissions`.

## Configure

Add the block to `better-supabase.config.ts`:

```ts
import { defineConfig } from "better-supabase/config";

export default defineConfig({
  blocks: {
    // Required by deadlines; add installs them too.
    "updated-at": {},
    memberships: {},
    permissions: {},
    // Modes: "managed", "custom". The default is "managed".
    deadlines: { mode: "managed" },
  },
});
```

## Client

The block has no React entry yet. Its server-side TypeScript is in `better-supabase/blocks/deadlines`.

## Events

- `deadline.computed`
- `deadline.satisfied`

## Related blocks

Requires: [memberships](https://bettersupabase.com/blocks/memberships.md), [permissions](https://bettersupabase.com/blocks/permissions.md)

Works with: [outbox](https://bettersupabase.com/blocks/outbox.md), [audit](https://bettersupabase.com/blocks/audit.md), [approvals](https://bettersupabase.com/blocks/approvals.md)
