Skip to content

Commit 9e2cd4d

Browse files
authored
[Docs] - Full cleanup (#1105)
<!-- Make sure you've read the CONTRIBUTING.md guidelines: https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Removed Features** * Dashboard embed functionality has been removed from the platform. * Python template documentation and guides have been removed. * **Documentation** * Documentation structure has been significantly reorganized and simplified. * Extensive template content and component guides have been removed. * Apple OAuth integration guide updated with streamlined secret generation flow. * **Refactor** * Button component styling and variant system updated. * Routing configuration updated with simplified path handling. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 815b857 commit 9e2cd4d

126 files changed

Lines changed: 125 additions & 14782 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/README.md

Lines changed: 73 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,90 @@
1-
# stack-docs
1+
# Stack Auth Documentation
22

3-
This is a Next.js application generated with
4-
[Create Fumadocs](https://github.com/fuma-nama/fumadocs).
3+
This is the documentation site for Stack Auth, built with [Next.js](https://nextjs.org) and [Fumadocs](https://fumadocs.dev).
54

6-
Run development server:
5+
## Development
76

87
```bash
9-
npm run dev
10-
# or
118
pnpm dev
12-
# or
13-
yarn dev
149
```
1510

16-
Open http://localhost:3000 with your browser to see the result.
11+
The docs server runs on port `8104` by default (or `${NEXT_PUBLIC_STACK_PORT_PREFIX}04`).
1712

18-
## Explore
13+
## Project Structure
1914

20-
In the project, you can see:
15+
### Content (`/content`)
2116

22-
- `lib/source.ts`: Code for content source adapter, [`loader()`](https://fumadocs.dev/docs/headless/source-api) provides the interface to access your content.
23-
- `app/layout.config.tsx`: Shared options for layouts, optional but preferred to keep.
17+
| Directory | Description |
18+
|-----------|-------------|
19+
| `content/docs/` | Main documentation (guides, SDK reference, components) |
20+
| `content/api/` | REST API reference documentation |
2421

25-
| Route | Description |
26-
| ------------------------- | ------------------------------------------------------ |
27-
| `app/(home)` | The route group for your landing page and other pages. |
28-
| `app/docs` | The documentation layout and pages. |
29-
| `app/api` | The documentation for API pages. |
30-
| `app/api/search/route.ts` | The Route Handler for search. |
22+
### App Routes (`/src/app`)
3123

32-
### Fumadocs MDX
24+
| Route | Description |
25+
|-------|-------------|
26+
| `/docs` | Main documentation pages |
27+
| `/api` | API reference pages (rendered from OpenAPI specs) |
28+
| `/docs-embed` | Embedded docs for dashboard companion widget |
29+
| `/api-embed` | Embedded API docs for dashboard companion widget |
30+
| `/mcp-browser` | MCP documentation browser |
31+
| `/handler/[...stack]` | Stack Auth handler route |
32+
| `/api/search` | Search API endpoint |
33+
| `/api/chat` | AI documentation chat endpoint |
34+
| `/llms.txt` | LLM-friendly documentation (plain text) |
35+
| `/llms.mdx` | LLM-friendly documentation (MDX format) |
3336

34-
A `source.config.ts` config file has been included, you can customise different options like frontmatter schema.
37+
### SDK Route Handlers
3538

36-
Read the [Introduction](https://fumadocs.dev/docs/mdx) for further details.
39+
These routes serve SDK-specific documentation:
3740

38-
## Learn More
41+
- `/js/[...path]` - JavaScript SDK
42+
- `/next/[...path]` - Next.js SDK
43+
- `/react/[...path]` - React SDK
44+
- `/python/[...path]` - Python SDK
45+
- `/rest-api/[...path]` - REST API
46+
47+
### Key Files
48+
49+
| File | Description |
50+
|------|-------------|
51+
| `lib/source.ts` | Content source adapter using Fumadocs `loader()` |
52+
| `source.config.ts` | Fumadocs MDX configuration (frontmatter schema, etc.) |
53+
| `app/layout.config.tsx` | Shared layout options |
54+
| `lib/platform-config.ts` | Platform/framework configuration for code examples |
55+
56+
### Components (`/src/components`)
57+
58+
| Directory | Description |
59+
|-----------|-------------|
60+
| `api/` | API playground components |
61+
| `chat/` | AI chat interface |
62+
| `layout/` | Layout UI components (search, navigation) |
63+
| `layouts/` | Page layouts (docs, API) |
64+
| `mdx/` | Custom MDX components |
65+
| `stack-auth/` | Stack Auth demo components |
66+
| `ui/` | Base UI components (button, etc.) |
67+
68+
### OpenAPI Specs (`/openapi`)
69+
70+
Contains OpenAPI JSON specifications organized by access level:
71+
- `client-*.json` - Client-side API endpoints
72+
- `server-*.json` - Server-side API endpoints
73+
- `admin-*.json` - Admin API endpoints
74+
- `webhooks-*.json` - Webhook event schemas
3975

40-
To learn more about Next.js and Fumadocs, take a look at the following
41-
resources:
76+
## Scripts
77+
78+
```bash
79+
# Generate API docs from OpenAPI specs
80+
pnpm generate-openapi-docs
81+
82+
# Clear generated docs
83+
pnpm clear-docs
84+
```
85+
86+
## Learn More
4287

43-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
44-
features and API.
45-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
46-
- [Fumadocs](https://fumadocs.dev) - learn about Fumadocs
88+
- [Fumadocs Documentation](https://fumadocs.dev)
89+
- [Next.js Documentation](https://nextjs.org/docs)
90+
- [Stack Auth Documentation](https://docs.stack-auth.com)

docs/content/docs/(guides)/concepts/auth-providers/apple.mdx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,15 @@ You will need to create an Apple Developer account, and generate an Apple Servic
4848
<Step>
4949
### Generate Your Client Secret
5050

51-
1. Navigate to the [Supabase Apple Secret Generator](https://supabase.com/docs/guides/auth/social-login/auth-apple#generating-a-client_secret) page.
52-
2. Fill in the required fields:
53-
- **Account ID**: Your Apple Developer account ID found at the top-right of the portal
54-
- **Service ID**: The identifier of your Service ID (found in Identifiers > Service IDs)
55-
- **Key ID**: The ID of the private key you just created
56-
- **Choose File**: Upload the .p8 private key file you downloaded
57-
3. Click **Generate Secret Key**.
58-
4. Copy the generated secret immediately - you'll need it for the next step.
51+
Use the tool below to generate your Apple Client Secret. You'll need:
52+
- **Team ID**: Your Apple Developer account ID found at the top-right of the portal
53+
- **Service ID**: The identifier of your Service ID (found in Identifiers > Service IDs)
54+
- **Key ID**: The ID of the private key you just created
55+
- **Private Key File**: Upload the .p8 private key file you downloaded
56+
57+
<AppleSecretGenerator />
58+
59+
Copy the generated secret immediately - you'll need it for the next step.
5960
</Step>
6061
<Step>
6162
### Enable Apple OAuth in Stack Auth

docs/lib/source.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { api, dashboard, docs } from '@/.source';
1+
import { api, docs } from '@/.source';
22
import { loader } from 'fumadocs-core/source';
33
import { attachFile } from 'fumadocs-openapi/server';
44
import { icons } from 'lucide-react';
@@ -38,13 +38,3 @@ export const apiSource = loader({
3838
},
3939
icon: createIconResolver(),
4040
});
41-
42-
// Dashboard source for /dashboard routes
43-
export const dashboardSource = loader({
44-
baseUrl: '/dashboard',
45-
source: dashboard.toFumadocsSource(),
46-
pageTree: {
47-
attachFile,
48-
},
49-
icon: createIconResolver(),
50-
});

docs/next.config.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const config = {
1313
async headers() {
1414
return [
1515
{
16-
// Allow CORS for dashboard routes to be accessed by the dashboard app
17-
source: '/dashboard/:path*',
16+
// Allow CORS for docs-embed routes to be accessed by the dashboard app
17+
source: '/docs-embed/:path*',
1818
headers: [
1919
{
2020
key: 'Access-Control-Allow-Origin',
@@ -31,8 +31,8 @@ const config = {
3131
],
3232
},
3333
{
34-
// Allow CORS for embedded dashboard routes to be accessed by the dashboard app
35-
source: '/dashboard-embed/:path*',
34+
// Allow CORS for api-embed routes to be accessed by the dashboard app
35+
source: '/api-embed/:path*',
3636
headers: [
3737
{
3838
key: 'Access-Control-Allow-Origin',

docs/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"lint:fix": "next lint --fix",
1616
"postinstall": "fumadocs-mdx",
1717
"generate-openapi-docs": "node scripts/generate-functional-api-docs.mjs",
18-
"setup-openapi": "node scripts/setup-openapi.mjs",
1918
"clear-docs": "node scripts/clear-docs.js"
2019
},
2120
"dependencies": {
@@ -33,7 +32,6 @@
3332
"@stackframe/stack": "workspace:^",
3433
"@stackframe/stack-shared": "workspace:^",
3534
"@vercel/mcp-adapter": "^1.0.0",
36-
"@xyflow/react": "^12.6.4",
3735
"ai": "^4.3.17",
3836
"class-variance-authority": "^0.7.1",
3937
"fumadocs-core": "15.3.3",

docs/source.config.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,6 @@ export const api = defineDocs({
3333
},
3434
});
3535

36-
// Separate collection for Dashboard content
37-
export const dashboard = defineDocs({
38-
dir: './content/dashboard',
39-
docs: {
40-
schema: extendedFrontmatterSchema,
41-
},
42-
meta: {
43-
schema: metaSchema,
44-
},
45-
});
46-
4736
export default defineConfig({
4837
mdxOptions: {
4938
// MDX options

docs/src/app/(home)/layout.tsx

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/src/app/(home)/page.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/src/app/dashboard-embed/[[...slug]]/page.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/src/app/dashboard-embed/layout.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)