* added organizations route * added orgganizations/[orgId] and orgganizations/[orgId]/users routes * added more routes * restructured dashboard pages, added organization page * fixed redirect bug * updated sidebar * added mock orgnizations * fixed breadcrumbs * added edit org modal * added memeber table * added permission table * Orgs & perms backend * Fix build errors * updated permission ui * org -> team for frontend * added enable team UI * Stack App for teams * formatted schema * renamed all orgs to teams * fixed docusaurus bug * disabled docusaurus build progress bar * added member profile and direct permission to profile * removed dead code, memberProfile -> member * removed teams attribute from the user object * added /teams endpoint * added create team endpoint * added add-user endpoint * moved add-user * added server side get teams * updated schema formatting * added team enabled endpoints * fixed type error * moved get current teams to current-user/teams * improved interface * added create team * hooked up team to frontend * added hooked up team name with team member page * added list team users * added useUsers to team object * fixed list team user bug * added team update * added list permissions and use permission on app * added create permission * list permission * added permission list * added inherited permission list * add edit permission model * restructured permission graph * updated style * added delete permission * fixed delete permission bug * added inheritence update * fixed await bug * fixed selection bug * added permission update * fixed update bug * fixed team update refresh * added remove user from team * restructured permission and permission definition * updated permission definition structure * updated list permissions and grant permissions * fixed list user permissions * added grant permission * fixed list permission * added direct option to list team use permission * fixed bugs * fixed bugs * added revoke permission * inherited from -> contains * added client list permission * restructured stack-app teams and permissions * fixed server teams and permissions * fixed bug * fixed bugs * added teams pages to demo * added styled component compiler * added list teams * added join and leave teams * fixed prisma onDelete * fixed type bugs * removed on permission change for now * added member * fixed user and server user * fixed imports * added create team * added more content to demo * fixed recursion bug * fixed recursion stack out of bound bug * removed teamsEnabled * added create team on sign-up options * added create team on signup * queriable -> queryable, fixed migration file * fixed migration file * fixed demo build error * fixed license accidental change * fixed tab styling * added required to create permission id * added more ui error hints * fixed seed wrong setting * default team name * improved permission list ui * improved demo display * Update README.md --------- Co-authored-by: Zai Shi <zaishi00@outlook.com>
3.5 KiB
📘 Documentation | Demo | Website | Discord
Stack is an open-source, self-hostable, and highly customizable authentication and user management system.
We provide frontend and backend libraries for Next.js, React, and JavaScript. You can set it up in one minute and scale with the project as it grows.
Here are some of the components you get out-of-the-box:
Here is the user/project management dashboard:
Features
- Composable React components & hooks
- OAuth (Google, Facebook, GitHub, etc.)
- Email and password authentication (with email verification and password reset)
- Easy to set up with proxied providers (no need to sign up and create OAuth endpoints yourself on all the providers)
- User management & analytics
- User-associated metadata with client-/server-specific permissions
- Out-of-the-box Dark/Light mode support
- suports switching out the underlying UI library, support MUI Joy out of the box
- 100% open-source!
Currently, only Next.js is supported, but we are working on adding other frameworks.
Vision
We all know how much overhead there is when starting a new project. Developers need to handle so many things that aren't even part of their core business, like user authentication, user profiles, payments, dashboards, hosting, and more. Our vision is to build a full-stack framework that handles all of this out-of-the-box with less than 10 minutes of setup, so developers can focus on what they really want to build. Authentication is the first step towards this vision.
Roadmap
- Feature-rich email/notification system
- React, React Native, and Vue.js support
- Python backend library
- SSO/SAML integration
Installation
To get started with Stack, you need to create a Next.js project using the App router. Then, you can install Stack by running the following command:
npm install @stackframe/stack
For setup, refer to our documentation.
Development
This is for you if you want to contribute to the Stack project.
Setup
Make sure you have pnpm installed alongside Node v20. Next, ensure you created .env.local files by copying .env in each sub-package in the packages folder and filling out the variables. You will need to start a Postgres database; you can do this with the following command:
docker run -it --rm -e POSTGRES_PASSWORD=password -p "5432:5432" postgres
Then:
pnpm install
# Run code generation (repeat this after eg. changing the Prisma schema)
pnpm run codegen
# After starting a Postgres database and filling the corresponding variables in .env.local, push the schema to the database:
# for production databases, use `deploy` instead. See: https://www.prisma.io/docs/orm/prisma-migrate/understanding-prisma-migrate/mental-model#prisma-migrate-in-a-staging-and-production-environment
pnpm run prisma:server migrate reset
# Start the dev server
pnpm run dev
You can also open Prisma Studio to see the database interface and edit data directly:
pnpm run prisma:server studio
Database migrations
If you make changes to the Prisma schema, you need to run the following command to create a migration:
pnpm run prisma:server migrate dev


