What problem does it solve?
This Skill ensures consistent and maintainable database interactions within a NestJS application by enforcing specific patterns for TypeORM configuration, entity design, and observability.
Core Features & Use Cases
- Standardized Configuration: Enforces
TypeOrmModule.forRootAsync with dataSourceFactory, SnakeNamingStrategy, and disables synchronize.
- Patterned Entities: Mandates extending
TimestampedEntity, using UUIDs, requiring column comments, and indexing foreign keys.
- Observability: Integrates a custom
TypeOrmXRayLogger for tracing database operations.
- Use Case: When creating new database entities or modifying existing ones, this Skill guides developers to adhere to best practices, preventing common pitfalls and ensuring a robust data layer.
Quick Start
Use the typeorm-patterns skill to create a new TypeORM entity that extends TimestampedEntity and includes required column comments and foreign key indexing.