Skip to content

Commit e12fc5a

Browse files
authored
feat: express.js adapter (#271)
1 parent b7548d1 commit e12fc5a

File tree

25 files changed

+629
-76
lines changed

25 files changed

+629
-76
lines changed

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,37 @@ The following diagram gives a high-level overview of how it works.
104104
## Features
105105

106106
- Access control and data validation rules right inside your Prisma schema
107-
- Auto-generated RESTful API and client library
107+
- Auto-generated OpenAPI (RESTful) specifications, services, and client libraries
108108
- End-to-end type safety
109109
- Extensible: custom attributes, functions, and a plugin system
110-
- Framework agnostic
110+
- A framework-agnostic core with framework-specific adapters
111111
- Uncompromised performance
112112

113+
### Plugins
114+
115+
- Prisma schema generator
116+
- Zod schema generator
117+
- React hooks generator
118+
- OpenAPI specification generator
119+
- [tRPC](https://trpc.io) router generator
120+
- 🙋🏻 [Request for a plugin](https://go.zenstack.dev/chat)
121+
122+
### Framework adapters
123+
124+
- [Next.js](https://zenstack.dev/docs/reference/server-adapters/next)
125+
- [Fastify](https://zenstack.dev/docs/reference/server-adapters/fastify)
126+
- [ExpressJS](https://zenstack.dev/docs/reference/server-adapters/express)
127+
- Nuxt.js (Future)
128+
- SvelteKit (Future)
129+
- 🙋🏻 [Request for an adapter](https://go.zenstack.dev/chat)
130+
131+
### Prisma schema extensions
132+
133+
- [Custom attributes and functions](https://zenstack.dev/docs/reference/zmodel-language#custom-attributes-and-functions)
134+
- Multi-file schema (coming soon)
135+
- String-typed JSON field (coming soon)
136+
- 🙋🏻 [Request for an extension](https://go.zenstack.dev/chat)
137+
113138
## Examples
114139

115140
Check out the [Collaborative Todo App](https://zenstack-todo.vercel.app/) for a running example. You can find the source code below:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zenstack-monorepo",
3-
"version": "1.0.0-alpha.73",
3+
"version": "1.0.0-alpha.74",
44
"description": "",
55
"scripts": {
66
"build": "pnpm -r build",

packages/language/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenstackhq/language",
3-
"version": "1.0.0-alpha.73",
3+
"version": "1.0.0-alpha.74",
44
"displayName": "ZenStack modeling language compiler",
55
"description": "ZenStack modeling language compiler",
66
"homepage": "https://zenstack.dev",

packages/next/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenstackhq/next",
3-
"version": "1.0.0-alpha.73",
3+
"version": "1.0.0-alpha.74",
44
"displayName": "ZenStack Next.js integration",
55
"description": "ZenStack Next.js integration",
66
"homepage": "https://zenstack.dev",

packages/plugins/openapi/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@zenstackhq/openapi",
33
"displayName": "ZenStack Plugin and Runtime for OpenAPI",
4-
"version": "1.0.0-alpha.73",
4+
"version": "1.0.0-alpha.74",
55
"description": "ZenStack plugin and runtime supporting OpenAPI",
66
"main": "index.js",
77
"repository": {

packages/plugins/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@zenstackhq/react",
33
"displayName": "ZenStack plugin and runtime for ReactJS",
4-
"version": "1.0.0-alpha.73",
4+
"version": "1.0.0-alpha.74",
55
"description": "ZenStack plugin and runtime for ReactJS",
66
"main": "index.js",
77
"repository": {

packages/plugins/trpc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@zenstackhq/trpc",
33
"displayName": "ZenStack plugin for tRPC",
4-
"version": "1.0.0-alpha.73",
4+
"version": "1.0.0-alpha.74",
55
"description": "ZenStack plugin for tRPC",
66
"main": "index.js",
77
"repository": {

packages/runtime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@zenstackhq/runtime",
33
"displayName": "ZenStack Runtime Library",
4-
"version": "1.0.0-alpha.73",
4+
"version": "1.0.0-alpha.74",
55
"description": "Runtime of ZenStack for both client-side and server-side environments.",
66
"repository": {
77
"type": "git",

packages/runtime/src/zod.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export function getModelZodSchemas(): ModelZodSchema {
1414
// eslint-disable-next-line @typescript-eslint/no-var-requires
1515
return require('.zenstack/zod').default;
1616
} catch {
17-
throw new Error('Model meta cannot be loaded');
17+
throw new Error(
18+
'Zod schemas cannot be loaded. Please make sure "@core/zod" plugin is enabled in schema.zmodel.'
19+
);
1820
}
1921
}

packages/schema/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publisher": "zenstack",
44
"displayName": "ZenStack Language Tools",
55
"description": "A toolkit for building secure CRUD apps with Next.js + Typescript",
6-
"version": "1.0.0-alpha.73",
6+
"version": "1.0.0-alpha.74",
77
"author": {
88
"name": "ZenStack Team"
99
},

0 commit comments

Comments
 (0)