@kittlekit/crud-core
v0.1.1
Published
Core contracts and config helpers for Kittlekit CRUD packages
Readme
@kittlekit/crud-core
Core contracts and config helpers for the Kittlekit CRUD package family.
What This Package Is
Use this package when you want a framework-agnostic CRUD contract layer.
It provides:
- CRUD option/config types
- access, validation, audit, cache, event, and diff adapter contracts
- normalized helper functions for OpenAPI, access, audit, and route toggles
This package does not register routes and does not talk to a database directly.
Install
npm install @kittlekit/crud-coreMain Exports
Core config types
CrudOptionsCrudAccessConfigCrudRoutesConfigCrudValidationCrudRateLimitCrudOpenApiCrudAuditConfigEventConfig
Adapter contracts
CrudAuthAdapterCrudValidationAdapterCrudAuditAdapterCrudEventBusAdapterCrudCacheReadAdapterCrudCacheKeyAdapterCrudDiffAdapterCrudMutationCacheInvalidationAdapter
Helpers
buildCrudOpenApiMetagetCrudAuditConfiggetCrudAccessConfiggetCrudRoutesConfig
Package Relationship
crud-core -> crud-fastify
-> crud-express
-> crud-drizzle-mysql
-> crud-drizzle-postgresWhy This Split Exists
This package is what makes it possible to:
- reuse the same CRUD config model in Fastify and Express
- reuse the same CRUD lifecycle contracts across MySQL and Postgres
- keep cache/audit/event/auth integrations host-controlled instead of hardwired
Out of Scope
- route registration
- SQL execution
- framework middleware binding
- app-specific auth/session logic
Publish
npm run build --workspace @kittlekit/crud-core
npm publish --workspace @kittlekit/crud-core --access publicExamples
- smoke setup:
sandbox/crud-smoke - server wrapper reference:
server/src/core/crudFactory.helpers.ts
Release Notes
0.1.0
- first public extraction of CRUD core contracts and adapter interfaces
