Docs
/

@leumas/router-kit

Shared plugin routers for leumas-api — P1: typed universal CRUD (RBAC + ownership) + social (feed/likes/friends/chat/notifications).

@leumas/router-kit

Shared plugin routers mounted by leumas-api. P1 slice of the eventual 41-router family.

  • createCrudRouter() — typed universal CRUD over the @leumas/db repository. Allowlisted

collections only (default: posts, comments, notifications, admin-only roles/permissions/ levelBadgeDefinitions). Enforces RBAC (createPerm), ownership (owner field), public-read, and drizzle-zod validation. Identity/money tables are handled by @leumas/auth, never exposed here.

  • createSocialRouter() — feed, post likes, friend request/respond, friends list, notifications,

and conversations/messages (REST). Realtime lands in shared/services/social at P6.

import { createCrudRouter, createSocialRouter } from '@leumas/router-kit';
app.use('/api/crud', createCrudRouter());
app.use('/social', createSocialRouter());

Extend CRUD safely by passing your own collections policy map to createCrudRouter({ collections }).

Source shared/engines/plugins/router-kit/README.md (no-git)markdownjson
Generated from the Leumas repository. Every page cites the file it came from.leumas.techllms.txt