Skip to content

ZenStack sample project that uses Express.js for backend and Vite+React SPA for frontend

License

Notifications You must be signed in to change notification settings

zenstackhq/sample-express-react-spa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zenstack Sample With Decoupled Client and Server

Stack

  • Backend: Express.js + Prisma + ZenStack
  • Frontend (SPA): Vite + React + TanStack Query

The backend uses ZenStack to automatically serve access-controlled CRUD API. It also uses the @zenstackhq/tanstack-query plugin to generate hooks for the frontend to consume the API. Note that the plugin is set to generate in "portable" mode, so that the frontend project doesn't need to reference Prisma or ZenStack.

Running the project

Backend

  • cd server
  • npm i
  • npm run generate
  • npm run dev

Frontend

  • cd client
  • npm i
  • npm run dev

About

ZenStack sample project that uses Express.js for backend and Vite+React SPA for frontend

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published