strapi2front 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,44 +1,33 @@
1
- <div align="center">
2
- <a href="https://strapi2front.dev">
3
- <picture>
4
- <source media="(prefers-color-scheme: dark)" srcset="https://strapi2front.dev/logo-dark.svg">
5
- <img alt="strapi2front logo" src="https://strapi2front.dev/logo-light.svg" height="128">
6
- </picture>
7
- </a>
8
- <h1>strapi2front</h1>
1
+ # strapi2front
9
2
 
10
3
  <a href="https://elevenestudio.com"><img alt="Made by Eleven Estudio" src="https://img.shields.io/badge/MADE%20BY%20Eleven%20Estudio-000000.svg?style=for-the-badge&labelColor=000"></a>
11
4
  <a href="https://www.npmjs.com/package/strapi2front"><img alt="NPM version" src="https://img.shields.io/npm/v/strapi2front.svg?style=for-the-badge&labelColor=000000"></a>
12
5
  <a href="https://github.com/Eleven-Estudio/strapi2front/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/npm/l/strapi2front.svg?style=for-the-badge&labelColor=000000"></a>
13
6
 
14
- </div>
15
7
 
16
- ## The Strapi TypeScript Generator
8
+ Generate TypeScript types, services, Zod schemas, and Astro Actions from your Strapi schema.
17
9
 
18
- `strapi2front` is a CLI tool that generates TypeScript types, services, and Astro Actions from your Strapi CMS schema. One command syncs everything, keeping your frontend perfectly typed.
10
+ **[View Documentation →](https://strapi2front.dev/docs)**
19
11
 
20
- ## Getting Started
12
+ ---
21
13
 
22
- Initialize strapi2front in your project:
14
+ ## Quick Start
23
15
 
24
16
  ```bash
25
17
  npx strapi2front@latest init
26
- ```
27
-
28
- Then sync your types whenever your Strapi schema changes:
29
-
30
- ```bash
31
18
  npx strapi2front sync
32
19
  ```
33
20
 
34
21
  ## Features
35
22
 
36
- **Type Generation** - Auto-generate TypeScript interfaces from your Strapi schema\
37
- **Service Generation** - Create typed service functions for all content types\
38
- **Astro Actions** - Generate type-safe Astro Actions for client/server data fetching\
39
- **Smart Detection** - Automatically detects framework, TypeScript, and package manager\
40
- **Strapi v4 & v5** - Full support for both Strapi versions\
41
- **By-Feature Structure** - Organize generated code by feature (screaming architecture)
23
+ - **Type Generation** TypeScript interfaces from your Strapi schema
24
+ - **Service Generation** Typed CRUD functions for all content types
25
+ - **Zod Schemas** Validation schemas for forms
26
+ - **Astro Actions** — Type-safe server actions
27
+ - **File Upload** Upload helpers for Astro and browser
28
+ - **JSDoc Support** JavaScript files with JSDoc annotations (no TypeScript required)
29
+ - **Strapi v4 & v5** — Full support for both versions
30
+ - **By-Feature Structure** — Organize generated code by feature (screaming architecture)
42
31
 
43
32
  ## Generated Output
44
33
 
@@ -47,51 +36,50 @@ src/strapi/
47
36
  ├── collections/
48
37
  │ └── article/
49
38
  │ ├── types.ts # TypeScript interfaces
39
+ │ ├── schemas.ts # Zod validation schemas
50
40
  │ ├── service.ts # Data fetching functions
51
41
  │ └── actions.ts # Astro Actions
52
42
  ├── singles/
53
43
  │ └── homepage/
54
44
  │ ├── types.ts
45
+ │ ├── schemas.ts
55
46
  │ └── service.ts
56
47
  ├── components/
57
48
  │ └── seo.ts
58
49
  └── shared/
59
50
  ├── utils.ts # Utility types
60
51
  ├── client.ts # Strapi client
61
- └── locales.ts # i18n support
52
+ ├── locales.ts # i18n support
53
+ └── upload-action.ts # File upload helpers
62
54
  ```
63
55
 
64
- ## Requirements
56
+ ## Framework Support
65
57
 
66
- - Node.js 18+
67
- - Strapi v4 or v5
68
- - Astro 4+ (more frameworks coming soon)
69
58
 
70
- ## Learn more
59
+ | Framework | Types | Services | Schemas | Actions |
60
+ | -------------- | ----- | -------- | ------- | ------- |
61
+ | Astro 4+ | ✅ | ✅ | ✅ | ✅ |
62
+ | Next.js | ✅ | ✅ | ✅ | 🔜 |
63
+ | Nuxt | ✅ | ✅ | ✅ | 🔜 |
64
+ | SvelteKit | ✅ | ✅ | ✅ | 🔜 |
65
+ | TanStack Start | ✅ | ✅ | ✅ | 🔜 |
71
66
 
72
- ⊹ Visit [strapi2front.dev](https://strapi2front.dev) to learn more about the project.\
73
- ⊹ Visit [strapi2front.dev/docs](https://strapi2front.dev/docs) to view the full documentation.
74
67
 
75
- ## Contributing
68
+ > Types, Services, and Schemas work with any framework. Actions are framework-specific and more are coming soon.
76
69
 
77
- We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
70
+ ## Requirements
78
71
 
79
- ## Security
72
+ - Node.js 18+
73
+ - Strapi v4 or v5
80
74
 
81
- If you believe you have found a security vulnerability, we encourage you to let us know right away.
75
+ ## Contributing
82
76
 
83
- Please report any issues to [hello@elevenestudio.com](mailto:hello@elevenestudio.com).
77
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
84
78
 
85
79
  ## License
86
80
 
87
- MIT - see [LICENSE](LICENSE) for details.
88
-
89
- ## Disclaimer
90
-
91
- This is a community project and is not affiliated with, endorsed by, or officially connected to [Strapi](https://strapi.io). The name "Strapi" is used solely to indicate compatibility with the Strapi CMS.
81
+ MIT © [Eleven Estudio](https://elevenestudio.com)
92
82
 
93
83
  ---
94
84
 
95
- <div align="center">
96
- Made with ❤️ by <a href="https://elevenestudio.com">Eleven Estudio</a>
97
- </div>
85
+ Made with ❤️ by [Eleven Estudio](https://elevenestudio.com)