stack/docs
Madison 3538638406
[Docs][Site] + [Dashboard][UI] - Adds docs to Stack Companion (#869)
<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Adds a unified documentation widget to the dashboard, enabling in-app
viewing and switching of documentation types with platform-specific
adaptations.
> 
>   - **Behavior**:
> - Adds `UnifiedDocsWidget` to `stack-companion.tsx` for viewing docs
within the dashboard.
> - Supports platform switching, back navigation, sidebar toggle,
loading/error states, and external opening.
> - Adapts content based on current page across dashboard, docs, and
API.
>   - **Documentation**:
> - Adds embedded routes/layouts in `docs/src/app` for `api-embed`,
`dashboard-embed`, and `docs-embed`.
> - Implements `EmbeddedLinkInterceptor` and `PlatformChangeNotifier`
for link handling and platform change notifications.
>     - Updates `generate-docs.js` to include dashboard docs generation.
>   - **Configuration**:
> - Adds `NEXT_PUBLIC_STACK_DOCS_BASE_URL` to `.env.development` and
`env.tsx`.
> - Configures CORS headers in `next.config.mjs` for dashboard
embedding.
>   - **Misc**:
>     - Updates styling in `global.css` to support embedded content.
> - Adds `EmbeddedLink` component for MDX link handling in
`mdx-components.tsx`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for 5760b90ea6. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

----


<!-- ELLIPSIS_HIDDEN -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Unified embedded docs viewer added to the dashboard with multi-type
support, navigation controls, back navigation, and external-open
behavior
* In-iframe link interception and MDX embedded-link support for seamless
embedded navigation

* **Style**
* Improved CSS for embedded content: scrollbar hiding, overflow
handling, responsive media and code blocks

* **Chores**
* Added dashboard docs collection, embed routes/layouts, CORS headers,
and env config for docs embedding

* **UX**
* Consolidated account UI in mobile header; improved auth panel
open/close animations
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
2025-10-30 20:01:30 -05:00
..
code-examples [Docs][Util][Content] - refactor docs to single source (#919) 2025-10-20 12:42:46 -05:00
content [Docs][Util][Content] - refactor docs to single source (#919) 2025-10-20 12:42:46 -05:00
lib [Docs][Site] + [Dashboard][UI] - Adds docs to Stack Companion (#869) 2025-10-30 20:01:30 -05:00
public [Docs][Content] - MCP installation instructions (#915) 2025-10-10 13:31:48 -05:00
scripts [Docs][Util][Content] - refactor docs to single source (#919) 2025-10-20 12:42:46 -05:00
src [Docs][Site] + [Dashboard][UI] - Adds docs to Stack Companion (#869) 2025-10-30 20:01:30 -05:00
templates Customizable ports (#962) 2025-10-20 15:24:47 -07:00
templates-api Rename offer to product, offer group to product catalog (#914) 2025-10-04 02:28:28 -07:00
templates-python [Docs][Content][UI] - JWT docs and JWT component (#905) 2025-09-29 13:05:33 -05:00
.env.development Customizable ports (#962) 2025-10-20 15:24:47 -07:00
.eslintrc.json New docs (#698) 2025-06-20 13:30:01 -07:00
.gitignore [Docs][Site] + [Dashboard][UI] - Adds docs to Stack Companion (#869) 2025-10-30 20:01:30 -05:00
CHANGELOG.md chore: update package versions 2025-10-29 18:13:53 -07:00
cli.json New docs (#698) 2025-06-20 13:30:01 -07:00
next.config.mjs [Docs][Site] + [Dashboard][UI] - Adds docs to Stack Companion (#869) 2025-10-30 20:01:30 -05:00
package.json chore: update package versions 2025-10-29 18:13:53 -07:00
postcss.config.mjs New docs (#698) 2025-06-20 13:30:01 -07:00
README.md New docs (#698) 2025-06-20 13:30:01 -07:00
source.config.ts [Docs][Site] + [Dashboard][UI] - Adds docs to Stack Companion (#869) 2025-10-30 20:01:30 -05:00
tsconfig.json New docs (#698) 2025-06-20 13:30:01 -07:00

stack-docs

This is a Next.js application generated with Create Fumadocs.

Run development server:

npm run dev
# or
pnpm dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

Explore

In the project, you can see:

  • lib/source.ts: Code for content source adapter, loader() provides the interface to access your content.
  • app/layout.config.tsx: Shared options for layouts, optional but preferred to keep.
Route Description
app/(home) The route group for your landing page and other pages.
app/docs The documentation layout and pages.
app/api The documentation for API pages.
app/api/search/route.ts The Route Handler for search.

Fumadocs MDX

A source.config.ts config file has been included, you can customise different options like frontmatter schema.

Read the Introduction for further details.

Learn More

To learn more about Next.js and Fumadocs, take a look at the following resources: