Loading...
Loading...
Found 5 Skills
[Pragmatic DDD Architecture] Guide for creating DDD Repositories (Interfaces and Infrastructure). Use when creating repository contracts or implementing them using Drizzle ORM, Zod, and Postgres. Enforces completely typed transactions with Drizzle Transaction types (no 'unknown'), Result returns for Railway-oriented programming via neverthrow, and mapping pg node errors to domain errors. Fits our docker-compose / drizzle-kit standard testing workflow.
[Pragmatic DDD Architecture] Guide for creating tests. Use when creating unit tests, integration tests, or understanding test conventions. Covers our tightly coupled stack: Vitest (unit, integration, ui projects), file naming, transactional database integration tests (txTest) with testcontainers/node-postgres/drizzle, mock patterns (createMock*RepoWithAssertions), and neverthrow Result assertions.
[Pragmatic DDD Architecture] Guide for creating DDD Value Objects (VOs). Use when defining a new Value Object in a domain layer. Covers immutability patterns, private constructors, random/from builders, Railway-oriented error handling via neverthrow Result, TypeScript branded error types, and co-locating errors within the VO file.
[Pragmatic DDD Architecture] Guide for creating Next.js Server Actions exactly tied to zod, neverthrow, and the domain architecture. Use when creating or editing any file in presentation/actions/. Covers "use server" placement, unknown parameters validated with `zod`, discriminated union response types, auth-first pattern, Value Object validation with TypeScript narrowing, use-case error mapping via `assertNever`, serviceContainer invocation, and revalidation strategy.
[Pragmatic DDD Architecture] Guide for creating strictly typed Domain validation and infrastructure errors. Use when handling or creating new errors to ensure they conform to the Railway-oriented programming model (neverthrow Result), TypeScript error branding, and constructor parameter constraints. Covers co-location rules vs. shared domain error usage.