返回 Skill 列表
extension
分类: 开发与工程无需 API Key

project-feature

为项目实体添加新的字段或特性。在扩展项目模式、添加新属性、更新表单或修改项目显示时使用。包括类型更新、API变更和验证。

person作者: jakexiaohubgithub

Add Project Feature Skill

Instructions

When adding a new field to Project:

  1. Update Types

    • src/lib/types.ts - Frontend interface
    • src/lib/db-types.ts - Firestore doc & API response
  2. Add Validation (if needed)

    • src/lib/security-utils.ts - CONTENT_LIMITS & validators
  3. Update API Routes

    • POST /api/projects - Create
    • GET /api/projects/[id] - Read
    • PATCH /api/projects/[id] - Update
  4. Update Form Components

    • src/app/menu/register/page.tsx
    • src/app/menu/edit/[id]/page.tsx
  5. Update Display Components

    • src/components/ProjectCard.tsx
    • src/app/menu/[id]/page.tsx

For complete checklist with code examples, see reference.md.