{
  "schema": "leumas.docs.page/1",
  "id": "pkg:@leumas/router-kit",
  "slug": "engines/router-kit",
  "kind": "capabilities",
  "bucket": "package",
  "title": "@leumas/router-kit",
  "name": "@leumas/router-kit",
  "eyebrow": null,
  "chip": null,
  "summary": "Shared plugin routers for leumas-api — P1: typed universal CRUD (RBAC + ownership) + social (feed/likes/friends/chat/notifications).",
  "keywords": [
    "router-kit",
    "likes",
    "notifications",
    "rbac",
    "friends",
    "router kit api",
    "leumas router kit",
    "router-kit db"
  ],
  "audience": "both",
  "funnel": {
    "product": null,
    "cta": null
  },
  "body": "# @leumas/router-kit\n\nShared plugin routers mounted by `leumas-api`. **P1 slice** of the eventual 41-router family.\n\n- **`createCrudRouter()`** — typed universal CRUD over the `@leumas/db` repository. **Allowlisted**\n  collections only (default: `posts`, `comments`, `notifications`, admin-only `roles`/`permissions`/\n  `levelBadgeDefinitions`). Enforces RBAC (`createPerm`), ownership (owner field), public-read, and\n  drizzle-zod validation. Identity/money tables are handled by `@leumas/auth`, never exposed here.\n- **`createSocialRouter()`** — feed, post likes, friend request/respond, friends list, notifications,\n  and conversations/messages (REST). Realtime lands in `shared/services/social` at P6.\n\n```js\nimport { createCrudRouter, createSocialRouter } from '@leumas/router-kit';\napp.use('/api/crud', createCrudRouter());\napp.use('/social', createSocialRouter());\n```\n\nExtend CRUD safely by passing your own `collections` policy map to `createCrudRouter({ collections })`.\n",
  "source": {
    "path": "shared/engines/plugins/router-kit/README.md",
    "blobSha": "",
    "commit": "",
    "committedAt": "",
    "provenance": "no-git",
    "bytes": 1162,
    "hash": "b39ee38695aa2a9772a705cb18c0591bc3b5801b"
  },
  "urls": {
    "html": "/p/engines/router-kit",
    "json": "/docs/engines/router-kit.json",
    "md": "/docs/engines/router-kit.md"
  },
  "links": {
    "composes": [
      "pkg:@leumas/api-kit",
      "pkg:@leumas/auth",
      "pkg:@leumas/config-registry",
      "pkg:@leumas/db",
      "pkg:@leumas/progression",
      "pkg:@leumas/schemas"
    ],
    "usedBy": [
      "pkg:@leumas/social-service"
    ],
    "product": [],
    "howTo": [],
    "skills": []
  },
  "exports": null
}
