archetype-engine 2.1.0 → 2.2.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 +30 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,9 @@ Run `npx archetype generate` → get:
|
|
|
24
24
|
- ✅ **tRPC routers** (CRUD + pagination + filters)
|
|
25
25
|
- ✅ **Zod validation** (runtime safety)
|
|
26
26
|
- ✅ **React hooks** (useProduct, useCreateProduct, etc.)
|
|
27
|
+
- ✅ **Vitest tests** (comprehensive test suites)
|
|
28
|
+
- ✅ **OpenAPI docs** (Swagger UI + API docs)
|
|
29
|
+
- ✅ **Seed data** (realistic sample data)
|
|
27
30
|
|
|
28
31
|
---
|
|
29
32
|
|
|
@@ -88,14 +91,25 @@ generated/
|
|
|
88
91
|
│ │ # - update, updateMany
|
|
89
92
|
│ │ # - remove, removeMany
|
|
90
93
|
│ └── index.ts # Router aggregation
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
├── hooks/
|
|
95
|
+
│ └── useProduct.ts # React Query hooks:
|
|
96
|
+
│ # - useProducts(), useProduct(id)
|
|
97
|
+
│ # - useCreateProduct(), useUpdateProduct()
|
|
98
|
+
│ # - useRemoveProduct(), etc.
|
|
99
|
+
├── tests/ # 🆕 Auto-generated tests
|
|
100
|
+
│ ├── product.test.ts # - CRUD operation tests
|
|
101
|
+
│ └── setup.ts # - Validation & auth tests
|
|
102
|
+
├── docs/ # 🆕 Auto-generated API docs
|
|
103
|
+
│ ├── openapi.json # - OpenAPI 3.0 specification
|
|
104
|
+
│ ├── swagger.html # - Interactive Swagger UI
|
|
105
|
+
│ └── API.md # - Markdown documentation
|
|
106
|
+
└── seeds/ # 🆕 Auto-generated seed data
|
|
107
|
+
├── product.ts # - Realistic sample data
|
|
108
|
+
├── index.ts # - Dependency management
|
|
109
|
+
└── run.ts # - CLI seed script
|
|
96
110
|
```
|
|
97
111
|
|
|
98
|
-
**15 lines of entity code → 400+ lines of production-ready backend.**
|
|
112
|
+
**15 lines of entity code → 1,400+ lines of production-ready backend.**
|
|
99
113
|
|
|
100
114
|
### Live Example
|
|
101
115
|
|
|
@@ -148,6 +162,9 @@ No API boilerplate. No manual validation. No CRUD repetition. Just works.
|
|
|
148
162
|
- 📊 **Auto ERD** - Visual database diagrams with `npx archetype view`
|
|
149
163
|
- 🌍 **i18n Ready** - Multi-language support for generated code
|
|
150
164
|
- ⚡ **Fast** - Generate 1000+ lines of code in seconds
|
|
165
|
+
- 🧪 **Auto-Generated Tests** - Comprehensive Vitest test suites with validation, auth, and CRUD tests
|
|
166
|
+
- 📖 **Auto-Generated Docs** - OpenAPI 3.0 specs + interactive Swagger UI
|
|
167
|
+
- 🌱 **Auto-Generated Seeds** - Realistic sample data with smart field mapping
|
|
151
168
|
|
|
152
169
|
## Use Cases
|
|
153
170
|
|
|
@@ -206,10 +223,14 @@ Archetype generates the **missing backend layer**:
|
|
|
206
223
|
- [x] Batch operations (createMany, updateMany, removeMany)
|
|
207
224
|
- [x] Computed fields
|
|
208
225
|
- [x] Enum support
|
|
226
|
+
- [x] Test generator (Vitest)
|
|
227
|
+
- [x] API documentation generator (OpenAPI + Swagger)
|
|
228
|
+
- [x] Seed data generator
|
|
229
|
+
- [ ] E2E test generator (Playwright) (Q1 2026)
|
|
230
|
+
- [ ] Admin UI generator (Q1 2026)
|
|
209
231
|
- [ ] Multi-tenancy utilities (Q1 2026)
|
|
210
|
-
- [ ] RBAC/permissions framework (
|
|
211
|
-
- [ ]
|
|
212
|
-
- [ ] Admin UI generator (Q2 2026)
|
|
232
|
+
- [ ] RBAC/permissions framework (Q2 2026)
|
|
233
|
+
- [ ] GraphQL template (Q2 2026)
|
|
213
234
|
|
|
214
235
|
---
|
|
215
236
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "archetype-engine",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Type-safe backend generator for Next.js. Define entities once, get Drizzle schemas, tRPC APIs, Zod validation, and React hooks instantly.",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|