SuperAPI AI Directory

backend-backend-expert

Coding & development

View repository

Updated 10-15 17:31

About this skill

Backend Backend Expert Skill (Backend Backend Expert Skill)

Capabilities (Capabilities)

  • EventHandler: Write standardized defineEventHandler。
  • Drizzle ORM: Handle database entity definitions, relational queries, and migrations.
  • Better-Auth: Integrate authentication middleware and permission checks.
  • Parameter Validation: Write robust Zod Schemas for request body and query parameter validation.

Instructions (Instructions)

  1. Standardized Responses: Must follow ApiResponse format, lists must use pagination.
  2. Error Handling: Use createError to throw HTTP exceptions with semantic meaning.
  3. Permission Control: Must call at the top of the Handler requireAuth or requireRole。
  4. Safe Injection: String concatenation of SQL is strictly prohibited.

Usage Example (Usage Example)

Input: "Implement the API for publishing articles." Action: In server/api/posts.post.ts write the logic, including Zod validation, permission checks, and database writes.