Skip to content

Commit aed46ef

Browse files
committed
Updated readme
1 parent 828f2eb commit aed46ef

1 file changed

Lines changed: 73 additions & 29 deletions

File tree

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)

0 commit comments

Comments
 (0)