← All projects

Developer tooling

RBAC Form Generator

TypeScript CLI that generates NestJS GraphQL + Mongoose form modules with RBAC decorator stubs from JSON schemas.

RBAC Form Generator

The challenge

Teams repeatedly hand-coded CRUD form backends with inconsistent RBAC wiring across NestJS modules. Without a coherent developer tooling foundation, RBAC Form Generator stakeholders faced fragmented tools, slow handoffs, and limited visibility—classic failure modes Tekvers designs against.

The solution

RBAC Form Generator: TypeScript CLI that generates NestJS GraphQL + Mongoose form modules with RBAC decorator stubs from JSON schemas. Faster NestJS form API scaffolding from JSON definitions. Tekvers delivered a maintainable developer tooling system for RBAC Form Generator using NestJS, TypeScript, GraphQL, Mongoose, with phased rollout, operator workflows, and documentation suited to long-term ownership.

Approach

Generation pipeline

`FormGenerator` orchestrates six file generators plus `ValidationMapper`; CLI flags for schema/output/swagger/validation/timestamps/soft-delete.

RBAC stubs by contract

`@UseGuards(JwtAuthGuard, RolesGuard)` + `@Roles(...)` per operation—host must supply auth module.

Disclose quirks

Portfolio and docs call out quoting/filename/soft-delete defaults so squads review generated TypeScript before shipping.

Deliverables

  • ▸npm bin `nestjs-form-generator` → `dist/cli.js`
  • ▸Programmatic `FormGenerator` API + multi-schema helper
  • ▸Field types: text, textarea, number, email, date/datetime, boolean, dropdown, file, phone, url, password
  • ▸Example schemas and `test-generator.ts` smoke script
  • ▸Optional Swagger/`@ApiProperty` emission when enabled
  • ▸Documented limitations vs README marketing polish

Outcomes

  • ▸Faster NestJS form API scaffolding from JSON definitions
  • ▸Consistent validation mapping across generated modules
  • ▸Clear integration expectation with existing auth

Impact

Backend squads prototype form APIs faster—while Tekvers frames the tool as a generator with known quirks, not production codegen you trust blindly.

Tech stack

NestJSTypeScriptGraphQLMongooseclass-validatorCLI

Want something similar?

I build production systems like RBAC Form Generator—from architecture through launch. Tell me what you need.

Contact me →