开源的用户管理解决方案,自带前端组件和管理后台。
Go to file
Zai Shi 9e9907f2b3
New UI system (#5)
* added stack-ui package

* added ui elements

* fixed react package type bug, added deleted components back

* updated button and typography interface

* added element provider

* moved all elements to element context

* added ui-joy

* moved UIPage component and update Button component

* added StackUIProvider

* added UI framework switch

* changed theme to colormode

* changed StackUIProvider interface

* updated file names

* updated package config

* fixed types and dependencies

* fixed color theme

* added custom button

* converted signin page to stack-ui

* moved oauth button stack-ui

* fixed styling bugs

* changed color/variant interface for button and text

* moved credential sign up to stack-ui

* moved card header and divider to stack-ui

* moved card-frame to stack-ui, fixed bugs

* fixed bugs, added global bg color to dev app

* moved forgot password to stack-ui

* updated styling

* moved form warning text to stack-ui

* added redirect message card to stack-ui

* moved everything to stack-ui, removed daisy and tailwind

* added joy input

* simplified code

* fixed joy button

* restructured UI provider interface

* made joy color mode work

* fixed small ui bugs

* updated demo, changed constant structures in stack-ui

* added select ui to demo

* added joy ui text

* added mui divider

* Used dynamic elements to replace useElements hook

* changed full page behaviour (100vh => 100%)

* added auto detect parent to cardframe

* updated documentation

* updated customization overview

* updated custom color doc

* fixed system color mode bug

* fixed select visual on safari

* changed UI provider interface

* renamed files to lower case

* fixed import bug

* finished custom colors doc

* added docs for custom components

* removed wrong cased files

* updated custom pages docs

* updated custom component docs

* elements -> components

* fixed missing rename

* fixed broken links in docs

* removed tailwind css import in stack

* fixed typos and small problems

* cleaned up package.json files

* updated dependencies

* fixed stack-server bug (webpack xxx not a function and u type error)

* updated setup doc

* added changeset

* fixed the 'use client' bug in stack-ui

* merged stack-ui and stack-ui-joy into stack

* renamed StackUIProvider to StackTheme

* unified imports

* added hook details to custom color doc
2024-03-21 10:51:53 +01:00
.changeset New UI system (#5) 2024-03-21 10:51:53 +01:00
.vscode Move code (initial commit) 2024-02-28 14:35:30 +01:00
apps New UI system (#5) 2024-03-21 10:51:53 +01:00
assets added documentation link and logo to readme 2024-02-28 17:20:29 +01:00
docs New UI system (#5) 2024-03-21 10:51:53 +01:00
eslint-configs Move code (initial commit) 2024-02-28 14:35:30 +01:00
packages New UI system (#5) 2024-03-21 10:51:53 +01: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 New UI system (#5) 2024-03-21 10:51:53 +01:00
pnpm-lock.yaml New UI system (#5) 2024-03-21 10:51:53 +01: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 Discord link 2024-03-15 13:25:04 -07:00
turbo.json Source maps 2024-03-04 22:46:07 +01:00

Stack Logo

📘 Documentation | Demo | Stackframe | 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. 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

  • 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
  • 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

  • Organization, groups, and roles
  • More pre-built UI components (user profile display/edit, onboarding page)
  • Fraud/bot prevention
  • Feature-rich email/notification system
  • Cross-platform/UI library/language supports

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