From 2040717e435e58ea9d99906ec80a4caef4fe0680 Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Wed, 11 Dec 2024 18:29:38 +0800 Subject: [PATCH] blog: update stack-auth blog --- blog/stackauth-multitenancy/index.mdx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/blog/stackauth-multitenancy/index.mdx b/blog/stackauth-multitenancy/index.mdx index cc27952b..40261d7d 100644 --- a/blog/stackauth-multitenancy/index.mdx +++ b/blog/stackauth-multitenancy/index.mdx @@ -46,10 +46,12 @@ The target application we'll build is a Todo List. Its core functionalities are - Regular members have full access to the todo lists they own. - Regular members can view the other members' todo lists and manage their content, as long as the list is not private. -Besides Next.js and StackAuth, we'll build the app with two other essential pieces of weapon: +The essential weapons we'll use to build the app are: -- [Prisma](https://prisma.io): the ORM -- [ZenStack](https://zenstack.dev): the access control layer on top of Prisma +- [Next.js](https://nextjs.org/): the full-stack framework +- [StackAuth](https://stack-auth.com/): user authentication and team management +- [Prisma](https://prisma.io): the ORM that we use to talk to the database +- [ZenStack](https://zenstack.dev): the authorization layer above Prisma that handles data segregation and access control You can find the link of the completed project at the end of the post. @@ -89,6 +91,8 @@ With this one-liner, you'll have a set of fully working UI components for managi ![Team Management](./team-management.png) +Although StackAuth made it effortless to add "teams" feature into an app, it's up to you to determine how to use the user and team information to control data access. We'll see how to connect it with Prisma/ZenStack to achieve proper authorization. + ## Setting up the database Our user and team data are stored on StackAuth's side. We need to store the todo lists and items in our own database. In this section, we'll set up Prisma and ZenStack and create the database schema.