Skip to content

Commit 6040f00

Browse files
committed
feat: Add basic @aetherspace-clerk-auth docs to Storybook
1 parent e1c13d7 commit 6040f00

File tree

6 files changed

+63
-2
lines changed

6 files changed

+63
-2
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<img src="/packages/@aetherspace/assets/AetherspaceLogo.svg" width="50" height="50" />
2+
3+
<p>
4+
<a href="https://clerk.com/" target="_blank">
5+
<img alt="Clerk Auth Logo" longdesc="Cross Platform Auth with Clerk" src="https://camo.githubusercontent.com/02b3799f98edbed5bafa868dbd884287f249d3153e53c34b3c05855adf2478a2/68747470733a2f2f696d672e736869656c64732e696f2f7374617469632f76313f7374796c653d666f722d7468652d6261646765266d6573736167653d436c65726b26636f6c6f723d364334374646266c6f676f3d436c65726b266c6f676f436f6c6f723d464646464646266c6162656c3d" />
6+
</a>
7+
</p>
8+
9+
# `@aetherspace/clerk-auth` - Aetherspace Plugin
10+
11+
Prerequisites:
12+
- [Sponsor Aetherspace on Github](https://github.com/Aetherspace/green-stack-starter-demo#readme) or get access to it some other way
13+
- Fork or generate a new repository from the official or free [aetherspace/green-stack-starter](https://github.com/Aetherspace/green-stack-starter#readme) github repo
14+
- Choose the "✅ Include all branches" option during the fork / generation process
15+
16+
```shell
17+
git merge with/clerk-auth
18+
```
19+
20+
After a yarn install, you'll be able to use `@aetherspace/clerk-auth` to import a bunch of handy clerk auth helpers:
21+
22+
```shell
23+
│── apps/
24+
│ └── nextjs/
25+
│ └── middleware.ts/ # ➡️ Clerk auth middleware already set up for you
26+
27+
│── packages/
28+
│ └── @aetherspace-clerk-auth/
29+
│ └── schemas/ # ➡️ Zod schemas for clerk datastructures to re-use for types, resolvers & docs
30+
│ └── context/ # ➡️ Universal context for clerk on web & native
31+
│ └── hooks/ # ➡️ Universal hooks for clerk on web & native
32+
│ └── middleware/ # ➡️ SWR middleware to ensure clerk auth headers are included on mobile
33+
│ └── utils/ # ➡️ Utils to create auth related request context in Next.js middleware
34+
│ └── components/ # ➡️ Handy universal components like a SignOutButton you can make your own
35+
```
36+
37+
We'll also set you up with a `features/user-managment` workspace for some example integration code:
38+
39+
```shell
40+
│── features/
41+
│ └── user-managment/ # ➡️ importable from 'user-management'
42+
│ └── schemas/ # ➡️ Zod schemas for state management & auth request context
43+
│ └── hooks/ # ➡️ Typed form states for the clerk based auth forms
44+
│ └── screens/ # ➡️ Example SignIn, SignUp, UserInfo screens
45+
│ └── routes/ # ➡️ Example routes for /sign-in, /sign-up, /me
46+
│ └── resolvers/ # ➡️ Retrieve user data from the request context
47+
``````
48+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Meta } from '@storybook/addon-docs'
2+
import StorybookLinkTransformer from '../@aetherspace/docs/helpers/StorybookLinkTransformer'
3+
import StorybookFontTransformer from '../@aetherspace/docs/helpers/StorybookFontTransformer'
4+
import ReadMeMD from './README.md'
5+
6+
<StorybookLinkTransformer />
7+
<StorybookFontTransformer />
8+
9+
<Meta title="packages / @aetherspace-clerk-auth / README.md" />
10+
11+
<ReadMeMD />

packages/@aetherspace-clerk-auth/routes/.gitkeep

Whitespace-only changes.

packages/@aetherspace-clerk-auth/screens/.gitkeep

Whitespace-only changes.

packages/@aetherspace-mongoose/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# `@aetherspace/mongoose` - Aetherspace Plugin
1010

1111
Prerequisites:
12-
- [Sponsor Aetherspace on Github]() or get access to it some other way
12+
- [Sponsor Aetherspace on Github](https://github.com/Aetherspace/green-stack-starter-demo#readme) or get access to it some other way
1313
- Fork or generate a new repository from the official or free [aetherspace/green-stack-starter](https://github.com/Aetherspace/green-stack-starter#readme) github repo
1414
- Choose the "✅ Include all branches" option during the fork / generation process
1515

packages/@aetherspace/schemas/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Schemas as Single Sources of Truth 📐
1+
<img src="/packages/@aetherspace/assets/AetherspaceLogo.svg" width="50" height="50" />
2+
3+
# Schemas as Single Sources of Truth in Aetherspace
24

35
```ts
46
import { z, aetherSchema, AetherProps } from 'aetherspace/schemas'

0 commit comments

Comments
 (0)