开源的用户管理解决方案,自带前端组件和管理后台。
Go to file
2024-03-07 16:32:57 +08:00
.changeset published npm pacakges 2024-03-04 21:20:59 +08:00
.vscode Move code (initial commit) 2024-02-28 14:35:30 +01:00
apps versuib bump 2024-03-06 23:46:39 +08:00
assets added documentation link and logo to readme 2024-02-28 17:20:29 +01:00
docs Update Stack registration link in setup.md 2024-03-07 16:32:57 +08:00
eslint-configs Move code (initial commit) 2024-02-28 14:35:30 +01:00
packages fixed url on redirect message card 2024-03-07 16:25:04 +08:00
.gitignore Move code (initial commit) 2024-02-28 14:35:30 +01:00
LICENSE Licenses 2024-02-28 15:27:00 +01:00
package.json psql npm command 2024-03-06 16:13:09 +01:00
pnpm-lock.yaml fixed bugs, provider frontend works now 2024-03-06 09:37:19 +08:00
pnpm-workspace.yaml added demo app, renamed nextjs folder to dev, added docusaurus to turbo 2024-02-28 18:08:23 +01:00
README.md Update README 2024-03-06 16:17:45 +01:00
turbo.json Source maps 2024-03-04 22:46:07 +01:00

Stack Logo

Documentation

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. Think of it as Supabase Auth or next-auth, but better.

Here is an example of the sign-up page you get out of the box:

Stack Sign Up Page

Features

  • OAuth (Google, Facebook, GitHub, etc.)
  • Email and password authentication (with email verification and password reset)
  • Easy to set up with proxied providers
  • User management & analytics
  • Pre-built React components & hooks
  • Support for static sites & single-page apps
  • User-associated metadata with client-/server-specific permissions
  • 100% open-source!

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 of the subpackages 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