task-template-builder
Task Template Builder Pattern
This skill documents the architecture of the Task Template Builder in erify_studios.
Core Architecture
1. Schema Alignment (Single Source of Truth)
The Task Template Builder uses a Shared Zod Schema to ensure frontend and backend are always in sync.
- Source:
packages/api-types/src/task-management/template-definition.schema.ts - Frontend Usage:
import { FieldItemSchema } from '@eridu/api-types/task-management' - Backend Usage:
import { TemplateSchemaValidator } from '@eridu/api-types/task-management'
Crucial Rule: Never duplicate validation logic. If you need a new field or rule, update
api-typesfirst.
2. Draft Storage (IndexedDB)
Note: IndexedDB draft persistence is not yet implemented in the template builder. The builder currently holds state in React only (lost on unmount). This section documents the intended pattern for future implementation.
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.
6jsonb-analytics-snapshot
Defines the JSONB Analytics Snapshot Pattern. This skill should be used when implementing analytics, dashboards, or any feature requiring aggregation of historical/immutable data where high read performance is required.
6