shared-api-types
Shared API Types & Schemas
This skill outlines the standards for using the @eridu/api-types package. This package is the Single Source of Truth for API contracts between Backend, Frontend, and external services.
When to Use
| Use Case | Location | Reason |
|---|---|---|
| API Responses | packages/api-types |
Ensures FE and BE agree on response shape |
| API Requests | packages/api-types |
Ensures inputs are validated consistently |
| Shared Enums | packages/api-types |
Consistency (e.g., ShowStatus, UserRole) |
| Internal Service Logic | apps/erify_api/... |
Keep implementation details private |
| DB Models | prisma/schema.prisma |
DB layer should be separate from API layer |
Directory Structure
Organize by Domain Resource:
More from allenlin90/eridu-services
service-pattern-nestjs
Comprehensive NestJS service implementation patterns. This skill should be used when implementing Model Services, Orchestration Services, or business logic with NestJS decorators.
8erify-authorization
Patterns for implementing authorization in erify_api with current StudioMembership + AdminGuard behavior, plus planned RBAC references
6data-validation
Provides comprehensive guidance for input validation, data serialization, and ID management in backend APIs. This skill should be used when designing validation schemas, transforming request/response data, mapping database IDs to external identifiers, and ensuring type safety across API boundaries.
6code-quality
Provides general code quality and best practices guidance applicable across languages and frameworks. Focuses on linting, testing, and type safety.
6repository-pattern-nestjs
Comprehensive Prisma repository implementation patterns for NestJS. This skill should be used when implementing repositories that extend BaseRepository or use Prisma delegates.
6task-template-builder
Provides guidelines for the Task Template Builder architecture, including Schema alignment, Draft storage, Drag-and-Drop, and Validation logic.
6