{"id":42563,"library":"crudora","title":"Crudora","description":"TypeScript framework for automatic CRUD API generation with Drizzle ORM and Express. Version 0.4.3 provides zero-configuration REST endpoints from decorated model classes, supporting PostgreSQL and MySQL. Key features: @Field() decorators with type validation (uuid, string, enum, json, etc.), advanced filtering (range, negation, LIKE, IN), offset and cursor pagination, soft delete, lifecycle hooks, transactional support, built-in Scalar API docs, health checks, graceful shutdown, and request timeout middleware. Compared to feathers.js or LoopBack, Crudora focuses specifically on Drizzle ORM and TypeScript with minimal boilerplate, shipping ESM/CJS dual builds and full type declarations. Maintenance status: active with regular releases.","status":"active","version":"0.4.3","language":"javascript","source_language":"en","source_url":"https://github.com/suryamsj/crudora","tags":["javascript","crud","api","typescript","drizzle","express","framework","backend","rest-api"],"install":[{"cmd":"npm install crudora","lang":"bash","label":"npm"},{"cmd":"yarn add crudora","lang":"bash","label":"yarn"},{"cmd":"pnpm add crudora","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core ORM dependency for all database operations","package":"drizzle-orm","optional":false},{"reason":"Required for built-in API documentation (docs: true)","package":"@scalar/express-api-reference","optional":true}],"imports":[{"note":"ESM default; also works with CommonJS via default export.","wrong":"const CrudoraServer = require('crudora').CrudoraServer","symbol":"CrudoraServer","correct":"import { CrudoraServer } from 'crudora'"},{"note":"Named export only. Never use default import for Model.","wrong":"import Model from 'crudora'","symbol":"Model","correct":"import { Model } from 'crudora'"},{"note":"Field is a decorator from crudora, not from Drizzle ORM.","wrong":"import { Field } from 'drizzle-orm'","symbol":"Field","correct":"import { Field } from 'crudora'"},{"note":"Alias for CrudoraServer; used interchangeably.","wrong":null,"symbol":"Crudora","correct":"import { Crudora } from 'crudora'"}],"quickstart":{"code":"import { CrudoraServer, Model, Field } from 'crudora';\nimport { drizzle } from 'drizzle-orm/node-postgres';\nimport { Pool } from 'pg';\nimport 'dotenv/config';\n\nconst db = drizzle(new Pool({ connectionString: process.env.DATABASE_URL ?? '' }));\n\nclass User extends Model {\n  static schema = 'auth';\n  static tableName = 'users';\n  static hidden = ['password'];\n\n  @Field({ type: 'uuid', primary: true })\n  id!: string;\n\n  @Field({ type: 'string', required: true, unique: true, length: 255 })\n  email!: string;\n\n  @Field({ type: 'string', required: true })\n  password!: string;\n}\n\nasync function main() {\n  const app = new CrudoraServer({ db, models: [User] });\n  const server = await app.listen(3000, () => console.log('Server running on http://localhost:3000'));\n  process.on('SIGTERM', () => server.close(() => process.exit(0)));\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Creates a minimal CRUD API server with a User model and PostgreSQL database."},"warnings":[{"fix":"Ensure schema, tableName, hidden are declared with 'static' keyword.","message":"Static properties (schema, tableName, hidden) must be defined as 'static' on Model subclass; forgetting 'static' will cause runtime errors because they are accessed on the class itself.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Add @Field() decorator to all model properties that should be persisted.","message":"Decorator @Field() is required on every property that should be a database column. Omitting @Field() will silently skip the property, causing missing columns in generated schema.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Ensure the schema exists in your database, or omit static schema to use the default.","message":"The 'static schema' property must match an existing PostgreSQL schema name; if absent, defaults to 'public' for Postgres or 'dbo' for MySQL. Setting an invalid schema will cause query failures.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Always define static tableName to avoid breaking changes.","message":"The 'static tableName' property is recommended but not strictly required in v0.4.x; future versions may require it.","severity":"deprecated","affected_versions":">=0.4.0 <0.5.0"},{"fix":"Run 'npm install @scalar/express-api-reference' and pass { docs: true } to CrudoraServer constructor.","message":"Built-in API docs require installing @scalar/express-api-reference and setting docs: true in CrudoraServer options. Without both, the /docs endpoint will not be registered.","severity":"gotcha","affected_versions":">=0.4.0"}],"env_vars":null,"search_vec":"'0.4.3':15 'activ':98 'advanc':42 'api':7,62,104,112 'automat':5 'backend':109 'boilerpl':87 'build':91 'built':59 'built-in':58 'check':65 'class':25 'compar':72 'configur':19 'crud':6,103 'crudora':1,77 'cursor':50 'declar':95 'decor':23,33 'delet':53 'doc':63 'drizzl':10,81,106 'dual':90 'endpoint':21 'enum':39 'esm/cjs':89 'etc':41 'express':13,107 'feathers.js':74 'featur':31 'field':32 'filter':43 'focus':78 'framework':3,108 'full':93 'generat':8 'grace':66 'health':64 'hook':55 'javascript':102 'json':40 'key':30 'lifecycl':54 'like':46 'loopback':76 'mainten':96 'middlewar':71 'minim':86 'model':24 'mysql':29 'negat':45 'offset':48 'orm':11,82 'pagin':51 'postgresql':27 'provid':16 'rang':44 'regular':100 'releas':101 'request':69 'rest':20,111 'rest-api':110 'scalar':61 'ship':88 'shutdown':67 'soft':52 'specif':79 'status':97 'string':38 'support':26,57 'timeout':70 'transact':56 'type':35,94 'typescript':2,84,105 'uuid':37 'valid':36 'version':14 'zero':18 'zero-configur':17","created_at":"2026-06-05T16:55:35.278482+00:00","updated_at":"2026-06-05T16:55:35.278482+00:00","problems":[{"fix":"Run 'npm install crudora drizzle-orm'","cause":"Package not installed or missing from node_modules.","error":"Error: Cannot find module 'crudora'"},{"fix":"Use import { Model } from 'crudora'","cause":"Import error: Model not imported correctly (default import instead of named).","error":"Class extends value undefined is not a constructor or null"},{"fix":"Ensure 'static schema' is declared on the model class.","cause":"Static property 'schema' defined incorrectly (non-static or missing).","error":"TypeError: Cannot read properties of undefined (reading 'schema')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/suryamsj/crudora#readme","github":"https://github.com/suryamsj/crudora","docs":null,"changelog":null,"pypi":null,"npm":"crudora","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}