Receber por email
← Voltar para o catálogo

form-creator

Create forms, validation schemas, and CRUD API endpoints. Use when building new data entry features or managing existing forms.

367estrelas
Atualizado há 4 meses

Ver no GitHub ↗

Como adicionar

/plugin marketplace add aiskillstore/marketplace

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/form-creator/svg)](https://www.skillteca.com.br/skills/form-creator)

Skills relacionadas

Ver todas de Segurança →

Alerta por categoria

Receba novas skills de Segurança toda segunda

1 email curto, só com as skills novas de Segurança. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Form Creator

Instructions

1. Validation Schema

  • File: src/lib/validations/{feature}.schema.ts
  • Action: Define Zod schema and export inferred type.

``typescript export const featureSchema = z.object({ ... }); export type FeatureFormValues = z.infer<typeof featureSchema>; ``

2. Form Component

  • File: src/components/forms/{feature}-form.tsx
  • Directives: "use client"; required.
  • Setup: Use useForm with zodResolver.
  • Props: Accept initialData and onSubmit.
  • UI: Use Shadcn components (Form, FormField, Input).

3. API Routes

  • File: src/app/api/{feature}/route.ts
  • Security: Wrap with withAuthRequired or withSuperAdminAuthRequired.
  • Logic:
  • GET: Handle pagination/search.
  • POST: Validate body against schema -> Insert to DB.
  • PATCH: Validate partial body -> Update DB.

Reference

For code patterns, best practices, and examples, see [reference.md](reference.md).

Compartilhar X LinkedIn