Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ ZenStack is heavily inspired and built above [Prisma](https://www.prisma.io) ORM

[A step by step guide for getting started](docs/get-started/next-js.md)

[A complete sample with a collaborative todo app](https://github.com/zenstackhq/zenstack/tree/main/samples/todo)

## How does it work?

ZenStack has four essential responsibilities:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zenstack-monorepo",
"version": "0.3.0",
"version": "0.3.2",
"description": "",
"scripts": {
"build": "pnpm -r build",
Expand Down
2 changes: 1 addition & 1 deletion packages/internal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zenstackhq/internal",
"version": "0.3.0",
"version": "0.3.2",
"displayName": "ZenStack Internal Library",
"description": "ZenStack internal runtime library. This package is for supporting runtime functionality of ZenStack and not supposed to be used directly.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zenstackhq/runtime",
"displayName": "ZenStack Runtime Library",
"version": "0.3.0",
"version": "0.3.2",
"description": "This package contains runtime library for consuming client and server side code generated by ZenStack.",
"repository": {
"type": "git",
Expand Down
5 changes: 3 additions & 2 deletions packages/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "zenstack",
"publisher": "zenstack",
"displayName": "ZenStack Language Tools",
"description": "ZenStack is a toolkit that simplifies full-stack development",
"version": "0.3.0",
"description": "A toolkit for modeling data and access policies in full-stack development with Next.js and Typescript",
"version": "0.3.2",
"author": {
"name": "ZenStack Team"
},
"license": "MIT",
"keywords": [
"fullstack",
"react",
Expand Down
30 changes: 29 additions & 1 deletion samples/todo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,38 @@

This project is a collaborative todo app built with [Next.js](https://nextjs.org), [Next-Auth](nextauth.org), and [ZenStack](https://github.com/zenstackhq/zenstack).

In this fictitious app, users can be invited to workspaces where they can collaborate on todos. Public todo lists are visible to all members in the workspace.

See a live deployment at: https://zenstack-todo.vercel.app/.

Features:
## Features:

- User signup/signin
- Creating workspaces and inviting members
- Data isolation and permission control

## Running the sample:

1. Install dependencies

```bash
npm install
```

2. Generate server and client-side code from model

```bash
npm run generate
```

3. Synchronize database schma

```bash
npm run db:push
```

4. Start dev server

```bash
npm run dev
```
58 changes: 29 additions & 29 deletions samples/todo/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions samples/todo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "todo",
"version": "0.3.0",
"version": "0.3.2",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -20,8 +20,8 @@
"dependencies": {
"@heroicons/react": "^2.0.12",
"@prisma/client": "^4.4.0",
"@zenstackhq/internal": "~0.3.0",
"@zenstackhq/runtime": "~0.3.0",
"@zenstackhq/internal": "^0.3.1",
"@zenstackhq/runtime": "^0.3.1",
"bcryptjs": "^2.4.3",
"daisyui": "^2.31.0",
"moment": "^2.29.4",
Expand All @@ -45,6 +45,6 @@
"postcss": "^8.4.16",
"tailwindcss": "^3.1.8",
"typescript": "^4.6.2",
"zenstack": "~0.3.0"
"zenstack": "^0.3.1"
}
}