Skip to content

Latest commit

 

History

History
49 lines (29 loc) · 1.24 KB

README.md

File metadata and controls

49 lines (29 loc) · 1.24 KB

This is a starter project for using ZenStack with Next.js and Iron Session.

It's extended from Prisma's Next.js Starter.

Getting Started

First create a project from this starter:

npx create-next-app --use-npm -e https://github.com/zenstackhq/nextjs-iron-session-starter [project-name]

cd [project-name]

Run ZenStack generator:

npm run generate

You'll also need to bootstrap your database and create the initial migration (a local sqlite db by default):

npm run db:migrate -- -n init

Finally it's time to run your app locally:

npm run dev

Code Structure

Data Model

The data model is located at /zenstack/schema.zmodel.

Iron-session Integration

You can find integration with iron-session at /pages/api/auth.

Mounted Data Services

The generated RESTful data access services are mounted at: /pages/api/zenstack/[...path].ts.

Learn More

To learn more about ZenStack, visit ZenStack Home.