# Plugins (/docs/plugins/overview)





Plugins extend Flowlib with additional capabilities — database tables, API endpoints, flow execution hooks, and frontend components. Pass them in the `plugins` config array:

```ts
import { auth } from '@flowlib/user-auth';
import { rbac } from '@flowlib/rbac';

const router = await createFlowlibRouter({
  // ...
  plugins: [
    auth({
      /* Better Auth options */
    }),
    rbac(),
  ],
});
```

After adding plugins with database tables, regenerate and migrate:

```bash
npx flowlib-cli generate
npx flowlib-cli migrate --push
```

## Official plugins [#official-plugins]

<Cards>
  <Card title="Authentication" description="User login, sessions, and admin-only user management via Better Auth." href="/docs/plugins/authentication" />

  <Card title="Access Control" description="Flow-level RBAC — control who can view, edit, and run each flow." href="/docs/plugins/access-control" />

  <Card title="Webhooks" description="Trigger flows from external HTTP requests with unique webhook URLs." href="/docs/plugins/webhooks" />

  <Card title="Version Control" description="Flow export/import and version management." href="/docs/plugins/version-control" />

  <Card title="MCP (Model Context Protocol)" description="Let AI assistants build, run, and debug flows via Claude, Copilot, or Cursor." href="/docs/plugins/mcp" />
</Cards>

## Build your own [#build-your-own]

Plugins are plain objects with an `id`. Add hooks, actions, database tables, API endpoints, and frontend components — only what you need. See [Build Your Own](/docs/plugins/build-your-own) for the full guide.
