Add Mintlify docs to pnpm run dev

This commit is contained in:
Konstantin Wohlwend 2026-04-06 13:47:53 -07:00
parent 37a69b0f0a
commit b7f5687d88
9 changed files with 4463 additions and 55 deletions

View File

@ -1,5 +1,5 @@
NEXT_PUBLIC_STACK_API_URL=http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}02
NEXT_PUBLIC_STACK_DOCS_BASE_URL=http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}04
NEXT_PUBLIC_STACK_DOCS_BASE_URL=http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}26
NEXT_PUBLIC_STACK_HOSTED_HANDLER_DOMAIN_SUFFIX=.localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}09
NEXT_PUBLIC_STACK_IS_LOCAL_EMULATOR=false

View File

@ -174,7 +174,7 @@
},
{
name: "Docs",
portSuffix: "04",
portSuffix: "26",
description: [
"Src: ./docs",
"Prod: https://docs.stack-auth.com",
@ -182,6 +182,15 @@
img: "https://www.svgrepo.com/show/448400/docs.svg",
importance: 2,
},
{
name: "Mintlify docs",
portSuffix: "04",
description: [
"Src: ./docs-mintlify",
],
img: "https://www.svgrepo.com/show/448400/docs.svg",
importance: 2,
},
{
name: "Hosted Components",
portSuffix: "09",

View File

@ -161,3 +161,6 @@ A: Use `signed_up_at` (OIDC-style naming) in access tokens and encode it as Unix
Q: Where should new globally searchable Cmd+K destinations be added in the dashboard?
A: Add project-level shortcuts to `PROJECT_SHORTCUTS` in `apps/dashboard/src/components/cmdk-commands.tsx` (optionally gated with `requiredApps`), and for app subpages rely on the flattened `appFrontend.navigationItems` command generation in the same file so pages are directly searchable without nested preview navigation.
Q: Which port suffixes are assigned to the two local docs sites?
A: `docs` (old docs app) uses suffix `26`, and `docs-mintlify` uses suffix `04`. Keep these in sync across `docs/package.json`, `docs-mintlify/package.json`, `apps/dev-launchpad/public/index.html`, and `apps/dashboard/.env.development` (`NEXT_PUBLIC_STACK_DOCS_BASE_URL` points to old docs on `26`).

59
docs-mintlify/README.md Normal file
View File

@ -0,0 +1,59 @@
# docs-mintlify
How to run the Mintlify docs preview locally from this repository.
## Prerequisites
- Node.js `>=20.17.0`
- `pnpm`
- Repository dependencies installed (`pnpm install` from repo root)
## Run locally
From the repository root:
```bash
pnpm -C docs-mintlify run dev
```
This starts Mintlify in `docs-mintlify` on `http://localhost:${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}04` (for example, `http://localhost:8104` with the default prefix).
From inside `docs-mintlify`, you can also run:
```bash
pnpm dev
```
Useful variants:
```bash
# Override the default port
pnpm -C docs-mintlify run dev -- --port 3333
# Skip OpenAPI processing for faster iteration
pnpm -C docs-mintlify run dev -- --disable-openapi
```
## Search + assistant in local preview
If you want local search and the Mintlify assistant:
```bash
pnpm -C docs-mintlify run login
pnpm -C docs-mintlify run status
```
Then re-run `pnpm -C docs-mintlify run dev`.
## Package scripts
From repo root:
```bash
pnpm -C docs-mintlify run lint
pnpm -C docs-mintlify run typecheck
pnpm -C docs-mintlify run build
pnpm -C docs-mintlify run clean
```
`lint` runs both `mint validate` and `mint broken-links`.

View File

@ -0,0 +1,18 @@
{
"name": "@stackframe/docs-mintlify",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "mint build",
"dev": "mint dev --port ${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}04 --no-open",
"typecheck": "mint validate",
"lint": "mint validate && mint broken-links",
"clean": "node -e \"require('node:fs').rmSync('.mintlify', { recursive: true, force: true })\"",
"login": "mint login",
"status": "mint status"
},
"devDependencies": {
"mint": "^4.2.487"
},
"packageManager": "pnpm@10.23.0"
}

View File

@ -8,8 +8,8 @@
"type": "module",
"scripts": {
"build": "next build",
"dev": "next dev --port ${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}04",
"start": "next start --port ${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}04",
"dev": "next dev --port ${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}26",
"start": "next start --port ${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}26",
"typecheck": "tsc --noEmit",
"lint": "next lint",
"lint:fix": "next lint --fix",

View File

@ -51,7 +51,7 @@
"db:migrate": "pnpm pre && pnpm run --filter=@stackframe/backend db:migrate",
"fern": "pnpm pre && pnpm run --filter=@stackframe/docs fern",
"dev:full": "pnpm pre && concurrently -k \"pnpm run generate-sdks:watch\" \"turbo run dev --concurrency 99999\"",
"dev": "pnpm pre && concurrently -k \"pnpm run generate-sdks:watch\" \"pnpm run generate-openapi-docs:watch\" \"turbo run dev --concurrency 99999 --filter=./apps/* --filter=@stackframe/stack-docs --filter=./packages/* --filter=./examples/demo \"",
"dev": "pnpm pre && concurrently -k \"pnpm run generate-sdks:watch\" \"pnpm run generate-openapi-docs:watch\" \"turbo run dev --concurrency 99999 --filter=./apps/* --filter=@stackframe/docs-mintlify --filter=./packages/* --filter=./examples/demo \"",
"dev:tui": "pnpm pre && (trap 'kill 0' EXIT; pnpm run generate-sdks:watch & pnpm run generate-openapi-docs:watch & turbo run dev --ui tui --concurrency 99999 --filter=./apps/* --filter=@stackframe/stack-docs --filter=./packages/* --filter=./examples/demo)",
"dev:inspect": "pnpm pre && STACK_BACKEND_DEV_EXTRA_ARGS=\"--inspect\" pnpm run dev",
"dev:profile": "pnpm pre && STACK_BACKEND_DEV_EXTRA_ARGS=\"--experimental-cpu-prof\" pnpm run dev",

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@ packages:
- apps/*
- examples/*
- docs
- docs-mintlify
- sdks/*
- sdks/implementations/*