# Incidents

> Incidents with a severity, a status timeline of updates, the components they affect and a postmortem, plus a public status page: component status, public incident updates and uptime history, readable anonymously through one function that returns only the fields marked public.

- Category: Developer platform
- Module: `incidents`
- Modes: `managed`, `custom`
- Docs: https://bettersupabase.com/docs/blocks/incidents
- Page: https://bettersupabase.com/blocks/incidents

## Install

```bash
npx better-supabase add incidents
```

The command also installs `updated-at`, `tenant`, `access`.

## Configure

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

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

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

## Client

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

## Events

- `incident.opened`
- `incident.resolved`
- `incident.updated`
- `postmortem.published`
- `status_component.changed`

## Related blocks

Requires: [tenant](https://bettersupabase.com/blocks/tenant.md), [access](https://bettersupabase.com/blocks/access.md)

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

## Recipes

- [Status page](https://bettersupabase.com/recipes/status-page.md): A public status page: the overall status, each public component with its daily uptime, and the public incident updates.
