Skip to content

Commit 3cd4d3f

Browse files
committed
Update docs
1 parent f4a8f36 commit 3cd4d3f

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

docs/fern/docs/pages/getting-started/overview.mdx

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ subtitle: Welcome to Stack!
77
<Card
88
title="Setup Guide"
99
icon="fa-regular fa-play"
10-
href="./setup.mdx"
10+
href="../getting-started/setup.mdx"
1111
>
1212
Setup Stack in your project
1313
</Card>
@@ -16,14 +16,14 @@ subtitle: Welcome to Stack!
1616
icon="fa-regular fa-file-lines"
1717
href="../sdk/user.mdx"
1818
>
19-
Learn how to use Stack SDKs
19+
Learn how to use Stack's SDKs for Next.js
2020
</Card>
2121
<Card
22-
title="API Reference"
22+
title="REST API Reference"
2323
icon="fa-solid fa-code"
2424
href="/rest-api"
2525
>
26-
Explore Stack REST API
26+
Explore Stack's REST API for frameworks that aren't natively supported yet
2727
</Card>
2828
<Card
2929
title="Discord"
@@ -36,38 +36,42 @@ subtitle: Welcome to Stack!
3636

3737
## Why Stack?
3838

39-
You might wonder: "With so many authentication libraries available, why create Stack?"
39+
Authentication is inherently difficult. There are only few things more sensitive than user data, and only few things more difficult than cryptography. It's not surprising that a majority of online businesses struggle to get it right.
4040

41-
The answer is straightforward: **They all suck at developer experience**.
41+
The optimal authentication solution is secure, yet approachable. If a developer has to worry about JWTs, OAuth flows, or password hashing, then we have failed. If an authentication solution uses closed-source, unauditable code for the most critical parts of your application, then we have failed.
4242

43-
As developers, we don't want to be bothered by decisions about using JWT or session tokens, handling token refreshes, or managing user data synchronization with frontend states. **Auth should be a 5 minutes job**, not 5 days. Our focus should be on building the core product.
43+
The truth is; as the authentication services industry, we have collectively failed. It is dominated by proprietary giants with predatory "bait-and-switch" pricing who provide no transparency into their codebase, and a terrible developer experience because they have determined that enterprises are willing to pay more if setting up auth systems is painful.
4444

45-
Stack abstract all these complexities away by deeply integrate into the frontend and backend framework. It offers a simple and intuitive interface, while remains highly flexible, customizable, and powerful.
45+
That's why we built Stack. Integrating secure authentication into your app should be a matter of **5 minutes**, rather than 5 days.
4646

47-
Here is an example. To use the current user, simply call:
47+
At the core of this are deep integrations into frontend and backend frameworks. We give the best developer experience to anyone using our supported tech stacks; at the moment, this is Next.js with Postgres and TypeScript or Python backends. Instead of giving mediocre support for a lot of frameworks, we chose to make a few integrations as excellent as possible before adding new ones (though we do offer a cross-compatible REST API as a fallback).
48+
49+
Here is an example. To retrieve the current user, simply call:
4850

4951
```tsx
5052
export function MyComponent() {
51-
const user = useUser();
53+
const user = useUser({ or: "redirect" });
5254
return <div>{user ? `Hi, ${user.displayName}` : 'You are not logged in'}</div>;
5355
}
5456
```
5557

56-
That's it! You don't need to worry about fetching the user, storing the user data, handling loading states, or refreshing user data. Stack manages all of that for you.
58+
That's it! Stack will either return a User object or redirect the user to the login page.
5759

5860
You can also add a button to change the user's name:
5961

6062
```tsx
61-
<button onClick={async () => await app.update({ displayName: "New Name" })}>
63+
<button onClick={async () => await user.update({ displayName: "New Name" })}>
6264
Change Name
6365
</button>
6466
```
65-
The user data will be updated in both the frontend and backend automatically. The updated user data will also reflect in `MyComponent` as well.
67+
The user data will update in both the frontend and backend automatically. The updated user data will be reflected in all other components on your page as well.
6668

67-
You also get pages and components for authentication flow out-of-the-box. This for example the sign-in page is what you get without writing a single line of code:
69+
You also get pages and components for authentication flow out-of-the-box. This is the sign-in page that you get without writing a single line of code:
6870

6971
![Stack sign up page](../imgs/signup-page.png)
7072

73+
Notably, there's no branding on any of our components. We believe that we should grow by building the best product, not by forcing our brand on your users — but this means that we **rely on you to spread the word about Stack**. If you like what you're reading, we'd love if you could take a second to tell one or two of your friends about us.
74+
7175
If you prefer a fully customized UI, you can use our low-level functions like `signInWithOAuth` or `signInWithCredential` to build your own sign-in page:
7276

7377
```tsx
@@ -85,8 +89,10 @@ To manage everything efficiently, there is a powerful admin dashboard:
8589

8690
![Stack dashboard](../imgs/dashboard.png)
8791

88-
Best of all, Stack is **100% open-source**.
92+
Best of all, Stack is **100% open-source**. That means client, server, dashboard, and even this very documentation you're reading right now. Feel free to check out our [GitHub](https://github.com/stack-auth/stack) and open an issue or pull request.
8993

9094
This is just a glimpse of what Stack can do. Stack also handles many other tasks like backend integration, data storage, emails, teams, permissions, and more, which you will learn later in the documentation.
9195

92-
If this sounds interesting, let's get started with setting up Stack in your project!
96+
If this sounds interesting, [get started](../getting-started/setup.mdx) with our interactive setup wizard, or join [our Discord community](https://discord.stack-auth.com) to ask questions and get help from our team.
97+
98+
We're excited to have you on board! 🚀

0 commit comments

Comments
 (0)