Installation & Setup

Getting started with Stack in 5 minutes

Welcome to the JavaScript SDK setup guide. If you’re looking for guides for other frameworks, check out the React SDK Setup, or the Next.js SDK Setup.

Before getting started, make sure you have a JavaScript project set up (such as Node.js, Vite, or any other JavaScript framework).

We recommend using our setup wizard for a seamless installation experience. The wizard automatically detects your project structure and walks you through the setup process. If you encounter any issues with the wizard, you can follow our manual installation steps instead.

Example usage

1import { stackServerApp } from "@/stack/server";
2
3const user = await stackServerApp.getUser("user_id");
4
5await user.update({
6 displayName: "New Display Name",
7});
8
9const team = await stackServerApp.createTeam({
10 name: "New Team",
11});
12
13await team.addUser(user.id);

Next steps

Check out the Users to learn how to retrieve and update user information, or Example pages to see how to build your sign-in/up pages.