Generate TypeScript types, services, Zod schemas, and Astro Actions from your Strapi schema.
npx strapi2front@latest init
npx strapi2front sync- Type Generation — TypeScript interfaces from your Strapi schema
- Service Generation — Typed CRUD functions for all content types
- Zod Schemas — Validation schemas for forms
- Astro Actions — Type-safe server actions
- File Upload — Upload helpers for Astro and browser
- JSDoc Support — JavaScript files with JSDoc annotations (no TypeScript required)
- Strapi v4 & v5 — Full support for both versions
- By-Feature Structure — Organize generated code by feature (screaming architecture)
src/strapi/
├── collections/
│ └── article/
│ ├── types.ts # TypeScript interfaces
│ ├── schemas.ts # Zod validation schemas
│ ├── service.ts # Data fetching functions
│ └── actions.ts # Astro Actions
├── singles/
│ └── homepage/
│ ├── types.ts
│ ├── schemas.ts
│ └── service.ts
├── components/
│ └── seo.ts
└── shared/
├── utils.ts # Utility types
├── client.ts # Strapi client
├── locales.ts # i18n support
└── upload-action.ts # File upload helpers
| Framework | Types | Services | Schemas | Actions |
|---|---|---|---|---|
| Astro 4+ | ✅ | ✅ | ✅ | ✅ |
| Next.js | ✅ | ✅ | ✅ | 🔜 |
| Nuxt | ✅ | ✅ | ✅ | 🔜 |
| SvelteKit | ✅ | ✅ | ✅ | 🔜 |
| TanStack Start | ✅ | ✅ | ✅ | 🔜 |
Types, Services, and Schemas work with any framework. Actions are framework-specific and more are coming soon.
- Node.js 18+
- Strapi v4 or v5
We welcome contributions! Please see our Contributing Guide for details.
MIT © Eleven Estudio
Made with ❤️ by Eleven Estudio