Type-Safe API
Auto-generate TypeScript types matching your Strapi content types, including relations, components, and media.
Esta página aún no está disponible en tu idioma.
Strapi2Front is a CLI tool that generates TypeScript types, API services, Zod schemas, and framework-specific code from your Strapi schema.
Type-Safe API
Auto-generate TypeScript types matching your Strapi content types, including relations, components, and media.
API Services
Generate ready-to-use service functions with full CRUD operations, filtering, pagination, and population.
Zod Schemas
Create validation schemas for forms with React Hook Form, TanStack Form, and more.
Framework Integrations
First-class support for Astro Actions, with Next.js and Nuxt support coming soon.
After running npx strapi2front sync, you get:
// Auto-generated typesinterface Article { id: number; documentId: string; title: string; content: string; author: Author; publishedAt: string | null;}
// Ready-to-use serviceimport { articleService } from '@/strapi/collections/article';
const articles = await articleService.find({ filters: { title: { $contains: 'TypeScript' } }, populate: ['author'],});
// Zod schema for formsimport { articleCreateSchema } from '@/strapi/collections/article/schemas';
const form = useForm({ resolver: zodResolver(articleCreateSchema),});Quick Start
Get up and running in under 5 minutes. Quick Start Guide
Installation
Detailed installation and setup instructions. Installation Guide