diff --git a/.github/workflows/claude-auto-review.yml b/.github/workflows/claude-auto-review.yml
index 729a9c8..25909fe 100644
--- a/.github/workflows/claude-auto-review.yml
+++ b/.github/workflows/claude-auto-review.yml
@@ -4,12 +4,13 @@ on:
pull_request:
types: [opened, synchronize]
paths:
- - 'guides/**/*.mdx'
- - 'openapi-v*.json'
+ - 'content/docs/**/*.mdx'
+ - 'openapi*.json'
- '.github/workflows/claude-auto-review.yml'
jobs:
auto-review:
+ if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
permissions:
contents: read
@@ -29,7 +30,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
- node-version: '20'
+ node-version-file: .nvmrc
- name: Install Python dependencies
run: |
@@ -49,7 +50,7 @@ jobs:
Assessment: DO_NOT_SHIP, FURTHER_REVIEW_REQUESTED, PROBABLY_FINE, DEFINITELY_FINE
## Your Tasks
- 1. **Identify changed guide files** (guides/*.mdx) in this PR
+ 1. **Identify changed guide files** (content/docs/guides/*.mdx) in this PR
2. **Extract code examples** from changed files (bash/curl, Python, JavaScript blocks)
3. **Test API examples** by executing them:
- Use Bash tool for curl examples
@@ -65,7 +66,7 @@ jobs:
- **API Correctness**: Are endpoint URLs and request formats correct?
- **Placeholder Consistency**: Check {YOUR_API_KEY}, {org_slug} format
- **Response Examples**: Do response examples match current API format?
- - **OpenAPI Changes**: If openapi-v*.json changed, verify breaking changes
+ - **OpenAPI Changes**: If openapi*.json changed, verify breaking changes
- **Documentation Quality (NO AI SLOP)**:
* Flag verbose/repetitive content
* Flag obvious explanations (e.g., "this endpoint returns data about places")
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 0000000..0a9eabb
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,35 @@
+name: Docs validation
+
+on:
+ pull_request:
+ push:
+ branches: [main]
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version-file: .nvmrc
+ cache: npm
+ - run: npm ci
+ - run: npm run generate
+ - run: npm run check
+ - run: npm test
+ - run: npx tsc --noEmit
+ - run: npm run build
+ - name: Verify production routes
+ run: |
+ npm start > /tmp/docs-server.log 2>&1 &
+ server_pid=$!
+ trap 'kill "$server_pid"' EXIT
+ for attempt in {1..30}; do
+ if curl --fail --silent http://localhost:3000/guides/quickstart > /dev/null; then break; fi
+ sleep 1
+ done
+ npm run test:smoke
diff --git a/.gitignore b/.gitignore
index ae0c9e0..5310874 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,4 +7,17 @@ __pycache__
*/orgs.json
env/
.DS_Store
-node_modules/
\ No newline at end of file
+node_modules/
+.next/
+.source/
+.vercel/
+*.tsbuildinfo
+next-env.d.ts
+content/docs/api-reference/
+public/openapi*.json
+public/llms.txt
+public/docs-manifest.json
+test-results/
+
+public/**/*.md
+public/llms-full.txt
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 0000000..2bd5a0a
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+22
diff --git a/.vercelignore b/.vercelignore
new file mode 100644
index 0000000..9d019b6
--- /dev/null
+++ b/.vercelignore
@@ -0,0 +1,14 @@
+.playwright-mcp/
+.github/
+/guides/
+/changelog.mdx
+test_*.py
+*.csv
+progress.md
+README.md
+node_modules/
+.next/
+.source/
+tests/
+test-results/
+.env*
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 0000000..af3b7c8
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,9 @@
+
+
+## This is NOT the Next.js you know
+
+This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
+
+This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
+
+
diff --git a/CLAUDE.md b/CLAUDE.md
index a37dac5..ad8c889 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -1,88 +1,19 @@
-# CLAUDE.md
+# Reprompt documentation
-This is the **Reprompt API documentation site**, built with [Mintlify](https://mintlify.com). It documents a geospatial API platform providing place enrichment and batch processing capabilities.
+This is a Next.js App Router site using Fumadocs and MDX. Read `DEVELOPMENT.md` for setup, content editing, validation, and Vercel deployment.
-**Live site:** https://docs.repromptai.com
-**Auto-deploys** on push to `main`.
+- Use Node 22 and `npm ci`.
+- `npm run dev` generates API pages and starts the local site.
+- `npm run build` generates and builds from committed OpenAPI snapshots. No API credentials or remote schema fetches are needed.
+- Authored pages live in `content/docs`; navigation lives in each folder's `meta.json`.
+- `content/docs/api-reference`, `.source`, and `public/openapi*.json` are generated; do not edit them.
+- `lib/api-routes.ts` defines stable API URLs. Every new operation needs an explicit mapping.
+- `npm run sync:openapi` explicitly refreshes V2. Review its diff before committing.
+- Public assets live in `public`; reusable MDX lives in `snippets`.
+- Validate with `npm run check`, `npm test`, `npm run typecheck`, and `npm run build`.
+- Run `npm run test:smoke` against a running production server.
+- Browser-test desktop/mobile, search, code tabs, schemas, and the playground. Mock API responses for tests; do not run billable API requests as a build check.
-## Quick Reference
+The source contains unpublished legacy files outside `content/docs`. Do not publish `guides/tripadvisor-category.mdx` without implementing authorization. `guides/entrances.mdx` and `changelog.mdx` are also excluded.
-```bash
-npm install # Install deps for React components
-mintlify dev # Start local dev server at http://localhost:3000
-```
-
-## Repository Layout
-
-```
-docs.json # Mintlify config: navigation, theme, API playground settings
-openapi-v1.json # V1 OpenAPI spec (stable) — committed, auto-rendered by Mintlify
-openapi-v2.json # V2 OpenAPI spec (experimental) — fetched live from production
-guides/*.mdx # Documentation pages (quickstart, batch, CSV upload, etc.)
-schemas/ # Shared schema documentation
-snippets/ # React components and reusable MDX snippets
-images/ # Screenshots and static assets
-logo/ # Brand logos (light/dark)
-changelog.mdx # API changelog
-```
-
-## Common Tasks
-
-### Adding a new documentation page
-1. Create `guides/my-page.mdx` with required frontmatter:
- ```mdx
- ---
- title: "Page Title"
- description: "Page description"
- ---
- ```
-2. Add the page path to `docs.json` under the appropriate version/group in `navigation.versions`.
-3. Push to `main` — Mintlify auto-deploys.
-
-### Adding a React component
-- Place `.jsx` files in `/snippets`.
-- Import in MDX: `import { MyComponent } from "/snippets/MyComponent.jsx"`
-- Use `` in the page body.
-
-### Updating OpenAPI specs
-
-**V1** (requires API key):
-```bash
-curl "https://api.repromptai.com/v1/reprompt/openapi.json" \
- -H "Authorization: Bearer $REPROMPT_API_KEY" > openapi-v1.json
-```
-
-**V2** (no auth):
-```bash
-curl "https://api.repromptai.com/v2/openapi.json" > openapi-v2.json
-```
-
-After updating any spec: commit, push to `main`, and it auto-deploys.
-
-Note: The V2 spec in `docs.json` is configured to fetch live from `https://api.reprompt.io/v2/openapi.json`, so the committed `openapi-v2.json` is a local reference copy. V1 uses the committed file directly.
-
-## Navigation Structure (`docs.json`)
-
-The site uses versioned navigation with three sections:
-- **v1** — Stable API: quickstart, enrichment API reference (from `openapi-v1.json`), guides
-- **v2 experimental** — Experimental API: V2 API reference (fetched live), guides
-
-Pages are referenced by path without extension (e.g., `"guides/quickstart"`).
-
-## Key Patterns
-
-- All `.mdx` files require `title` and `description` frontmatter
-- OpenAPI specs are auto-rendered by Mintlify — just reference them in `docs.json`
-- API playground is set to `"interactive"` mode
-- Theme: "aspen", primary color: `#5046e5`
-- Mapbox token is embedded in playground components — do not share publicly without replacing
-
-## Removed from docs
-
-The following have been disabled in the backend and removed from documentation:
-- `/v2/find-places` — Search/discover places
-- `/v2/placematch` — Match places across data sources
-- `/v2/validate` — Validate place data
-- KYB API — Know Your Business verification (entire version section removed)
-
-Do not re-add documentation for these.
+Do not restore the retired KYB API or V2 `/find-places`, `/placematch`, or `/validate` operations. The V1 refresh-batches operation is withheld because its committed specification references missing schemas. Preserve its redirect to the monthly-refresh guide until the API contract is verified.
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
new file mode 100644
index 0000000..e5ed5dd
--- /dev/null
+++ b/DEVELOPMENT.md
@@ -0,0 +1,87 @@
+# Reprompt docs
+
+The replacement for Mintlify uses Next.js, Fumadocs, MDX, and Fumadocs OpenAPI. It builds from this repository and runs on Vercel. It needs no CMS, search service, database, API key, or Mintlify account.
+
+## Local development
+
+```sh
+nvm use
+npm ci
+npm run dev
+```
+
+Open http://localhost:3000. The homepage redirects to `/guides/quickstart`.
+
+For a production check:
+
+```sh
+npm run build
+npm start
+# In another terminal:
+npm run test:smoke
+```
+
+## Editing
+
+- Edit guides in `content/docs/guides` and schema documentation in `content/docs/schemas`.
+- Add new pages to the neighboring `meta.json` navigation list.
+- Keep images in `public/images`; reference them with `/images/...`.
+- Reusable MDX imports use `@/snippets/...`.
+- `components/mdx.tsx` supports existing callouts, steps, badges, accordions, frames, and examples. Code groups require explicit `titles={["cURL", "Python", "JavaScript"]}`.
+- Layout and brand settings live in `lib/layout.tsx` and `app/global.css`.
+- Redirects live in `lib/redirects.mjs`.
+
+`npm run generate` rebuilds API MDX, downloadable specifications, `llms.txt`, and the route inventory. Generated files are ignored by Git. Both `dev` and `build` run generation automatically. Restart the dev server after changing OpenAPI snapshots.
+
+## API reference
+
+All three specifications are committed snapshots. Normal builds never fetch from production. Refresh V2 explicitly with `npm run sync:openapi`, review the diff, and commit it. Update the V1 and Search/Ask snapshots from an authoritative source when their contracts change. Add stable URL mappings in `lib/api-routes.ts` for new operations; generation fails on unknown operations or unresolved schema references.
+
+The browser playground sends requests directly to the API. Users supply their own key and, for V1, their organization slug. The API must allow CORS from the docs origin. There is no unrestricted proxy and no server-side API credential. Playground settings (including entered authorization values) use the upstream Fumadocs browser storage behavior; avoid shared-browser credentials. Test submissions with intercepted responses, not production jobs.
+
+The V1 snapshot references missing `BulkRefreshBatchRequest` and `BulkRefreshBatchResponse` schemas. Only that refresh operation is omitted from the published copy; the original snapshot is preserved. Its previous URL redirects to `/guides/monthly-refresh`. Restore it only after obtaining a complete contract.
+
+## Publication scope
+
+33 pages: 10 guides, one schema guide, an API index, and 21 generated API operation pages. Existing guide URLs and API operation slugs remain stable, including the Search & Answers ampersand URLs. Search is a statically built local index. The sitemap, robots file, OpenAPI downloads, and `llms.txt` contain public content only.
+
+Intentionally omitted: Mintlify AI chat, hosted editor, organization authentication, and exact theme parity. The Tripadvisor guide stays outside `content/docs` until authorization exists. Previously unlisted entrances/changelog pages remain unpublished. Retired KYB and V2 find-places/placematch/validate APIs stay excluded.
+
+The migration preserves existing API examples. Some legacy guide response shapes differ from the committed V1 schema; resolving API contract discrepancies is a separate content review.
+
+## Validation
+
+```sh
+npm run generate
+npm run check
+npm test
+npm run typecheck
+npm run build
+```
+
+`check` validates internal links/assets, route coverage, exclusions, and schema references. Unit tests cover encoded legacy routes and schema/URL contracts. `test:smoke` checks all public pages, redirects, forbidden routes, search, and discovery endpoints against a running server. Override its target with `DOCS_TEST_URL`. The Docs validation GitHub Action runs without production API credentials. The separate existing Claude Auto Review workflow runs examples with its configured secrets on non-draft PRs; it skips drafts.
+
+For a protected preview in the linked Vercel project, run `DOCS_TEST_URL=https://your-preview.vercel.app vercel env run -- npm run test:smoke`. This uses a short-lived OIDC token without saving it and never forwards that token through redirects.
+
+Before releasing, compare the Mintlify and replacement pages in a browser: quickstart, a screenshot-heavy guide, a V1 reference page, Search/Ask, and V2. Check mobile navigation, both themes, language tabs and copy, search results, nested schemas, and mocked playground success/error responses.
+
+## Vercel and cutover
+
+The Vercel project `reprompt-ai/reprompt-docs` is connected to `reprompt/docs`, with `main` as its production branch. Its defaults are Next.js, Node 22, `npm ci`, and `npm run build`; no environment variables are required. PR branches get preview deployments. `.vercelignore` excludes local datasets, experimental scripts, unpublished guides, and environment files from CLI uploads.
+
+The migration is deployed publicly at https://reprompt-docs.vercel.app. The production deployment built from commit `780ab2b` is https://reprompt-docs-17n5qmuwt-reprompt-ai.vercel.app. Clean-checkout and GitHub CI builds passed, as did the public production smoke suite without any authentication bypass.
+
+The custom-domain handoff is still pending. `docs.repromptai.com` already has the CNAME `cname.vercel-dns.com`; Vercel reports the DNS configuration is valid. Adding it to the new project fails with `alias_conflict` because another project outside the Reprompt team still holds it. The existing Mintlify site remains live. A Mintlify login is needed to inspect and release that assignment.
+
+To finish the handoff:
+
+1. Open the [Mintlify custom-domain settings](https://app.mintlify.com/settings/project/custom-domain), confirm the Reprompt project and its fallback Mintlify URL, and release only `docs.repromptai.com`. Keep the Mintlify project available for rollback.
+2. Immediately run `vercel domains add docs.repromptai.com --scope reprompt-ai --non-interactive` from this linked project. Confirm verification with `vercel domains inspect docs.repromptai.com --scope reprompt-ai`. If it still reports an ownership conflict, resolve it through Mintlify/Vercel rather than changing unrelated DNS records.
+3. Run `DOCS_TEST_URL=https://docs.repromptai.com npm run test:smoke`, then verify the custom domain in a browser, including assets, search, API reference, and canonical URLs. The existing CNAME already matches Vercel's recommendation; change DNS only if Vercel explicitly requires a different record.
+4. Merge the migration PR after the domain is serving the replacement. Verify the automatic production deployment from `main`. Do not cancel Mintlify until production passes verification.
+
+If the handoff fails, remove the hostname from the replacement project if it was attached, re-add it to the original Mintlify project, and verify the old site. Its CNAME can remain `cname.vercel-dns.com` unless Mintlify requests a new target. If only a later replacement release fails, use Vercel rollback to return to the known-good deployment.
+
+Do not push this migration directly to the Mintlify-connected main branch before coordinating cutover: the content and assets have moved. The previous Mintlify configuration remains in `docs.json` for migration comparison only; the Next.js build does not read it.
+
+Local production, the remote preview, and the public production deployment passed all 33 page checks, seven redirects, exclusions, and discovery endpoints; browser checks covered responsive layouts, search, code tabs/copy, nested schemas, organization variables, and mocked playground success/error responses.
diff --git a/PUBLIC-LINK-AUDIT.md b/PUBLIC-LINK-AUDIT.md
new file mode 100644
index 0000000..bb1b418
--- /dev/null
+++ b/PUBLIC-LINK-AUDIT.md
@@ -0,0 +1,47 @@
+# Public docs migration audit — 2026-10-20
+
+An anonymous HTTP crawl started at https://docs.repromptai.com/, its sitemap,
+robots.txt, llms.txt and llms-full.txt. No cookies or account credentials were used.
+The crawl recursively followed same-origin HTML links, image sources and Markdown
+links. Mintlify/Next.js implementation assets (`/_next/`, `/_mintlify/`, `/cdn-cgi/`)
+and third-party hosts were excluded; the replacement supplies its own runtime.
+
+## Results
+
+- 1,149 internal link references followed (including repeated navigation links).
+- 75 distinct URLs discovered: 72 returned HTTP 200, three returned 404.
+- Every one of the 72 working source URLs resolves successfully on the new site.
+- `lib/public-crawl-contract.json` records all 72 URLs and linked legacy fragments.
+ CI verifies them against a running production build.
+- The earlier inventory additionally covers public unlisted pages and 36 original
+ image/logo URLs that are not all discoverable from the home page.
+
+## Mapping differences
+
+| Old URL or fragment | Replacement behavior |
+| --- | --- |
+| `/api-reference/batches/mark-batches-for-refresh` | Redirect to `/guides/monthly-refresh`; incomplete operation is not regenerated |
+| `/guides/tripadvisor-category` | Redirect to `/schemas/schemas`; organization-restricted source content remains excluded |
+| `/guides/entrances`, `/changelog` | Available at the same URL, outside primary navigation |
+| `*.md`, `/llms-full.txt` | Generated at build time |
+| Authored heading fragments | Original IDs retained, including punctuation and duplicate heading numbering |
+| API parameter fragments | Exact field where available, otherwise the corresponding API section |
+| API body/response fragments | Corresponding request/response section, rather than the old expandable field |
+| API fragments on retired-page redirects | Replacement guide title |
+
+The following links were already broken on the source site. The replacement
+handles all three, including their Markdown variants:
+
+- `/api-reference/attributes/get-enrichment-attributes` → `/api-reference/attributes/get-all-available-attributes`
+- `/guides/place-enrichment` → `/guides/quickstart`
+- `/guides/geofencing` → `/guides/batch-processing` (related guide fallback, not a dedicated geofencing guide)
+
+## Validation
+
+`npm run check` verifies the legacy inventory locally. `npm run test:smoke` checks
+URLs, redirect destinations, Markdown endpoints, legacy heading IDs, assets, and
+the public crawl contract over HTTP. The default target is localhost:3000; set
+`DOCS_TEST_URL` to check a deployment.
+
+The custom domain remains on Mintlify until the migration/domain handoff. This
+report concerns compatibility of the replacement, not a completed domain cutover.
diff --git a/app/(docs)/[[...slug]]/page.tsx b/app/(docs)/[[...slug]]/page.tsx
new file mode 100644
index 0000000..53d0aee
--- /dev/null
+++ b/app/(docs)/[[...slug]]/page.tsx
@@ -0,0 +1,41 @@
+import type { Metadata } from 'next';
+import { notFound } from 'next/navigation';
+import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/layouts/docs/page';
+import { source } from '@/lib/source';
+import { openapi } from '@/lib/openapi';
+import { OpenAPIPage } from '@/components/api-page';
+import { getMDXComponents } from '@/components/mdx';
+import { LegacyAnchors } from '@/components/legacy-anchors';
+import { normalizeSlugs } from '@/lib/routes';
+
+type Props = { params: Promise<{ slug?: string[] }> };
+export const dynamicParams = false;
+
+export default async function Page({ params }: Props) {
+ const { slug } = await params;
+ const page = source.getPage(normalizeSlugs(slug));
+ if (!page) notFound();
+ const Content = page.data.body;
+
+ return (
+
+
+ {page.data.title}
+ {!('_openapi' in page.data) && {page.data.description}}
+
+ ,
+ })} />
+
+
+ );
+}
+
+export function generateStaticParams() { return source.generateParams(); }
+
+export async function generateMetadata({ params }: Props): Promise {
+ const { slug } = await params;
+ const page = source.getPage(normalizeSlugs(slug));
+ if (!page) notFound();
+ return { title: page.data.title, description: page.data.description, alternates: { canonical: page.url } };
+}
diff --git a/app/(docs)/layout.tsx b/app/(docs)/layout.tsx
new file mode 100644
index 0000000..da623bb
--- /dev/null
+++ b/app/(docs)/layout.tsx
@@ -0,0 +1,9 @@
+import type { ReactNode } from 'react';
+import { VersionedDocsLayout } from '@/components/docs-layout';
+import { source } from '@/lib/source';
+import { layoutOptions } from '@/lib/layout';
+import { createVersionNavigation } from '@/lib/navigation';
+
+export default function Layout({ children }: { children: ReactNode }) {
+ return {children};
+}
diff --git a/app/api/search/route.ts b/app/api/search/route.ts
new file mode 100644
index 0000000..0d428fe
--- /dev/null
+++ b/app/api/search/route.ts
@@ -0,0 +1,5 @@
+import { source } from '@/lib/source';
+import { createFromSource } from 'fumadocs-core/search/server';
+
+export const { staticGET: GET } = createFromSource(source);
+export const dynamic = 'force-static';
diff --git a/app/global.css b/app/global.css
new file mode 100644
index 0000000..a5e41dd
--- /dev/null
+++ b/app/global.css
@@ -0,0 +1,42 @@
+@import 'tailwindcss';
+@import 'fumadocs-ui/css/neutral.css';
+@import 'fumadocs-ui/css/preset.css';
+@import 'fumadocs-openapi/css/preset.css';
+
+@theme {
+ --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
+ --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
+}
+
+:root {
+ --color-fd-primary: #5046e5;
+ --color-fd-primary-foreground: #fff;
+ --color-fd-ring: #5046e5;
+}
+
+.dark {
+ --color-fd-background: #111827;
+ --color-fd-card: #151d2d;
+ --color-fd-popover: #151d2d;
+ --color-fd-secondary: #1c2638;
+ --color-fd-muted: #1c2638;
+ --color-fd-accent: #202c43;
+ --color-fd-border: #293347;
+ --color-fd-primary: #a5a2ff;
+ --color-fd-primary-foreground: #151329;
+}
+
+.docs-frame { overflow: hidden; margin-block: 1.5rem; border: 1px solid var(--color-fd-border); border-radius: .75rem; padding: .75rem; background: var(--color-fd-muted); }
+.docs-frame img { margin: 0; width: 100%; height: auto; border-radius: .35rem; }
+.docs-badge { display: inline-flex; align-items: center; border-radius: .35rem; padding: .1rem .45rem; font-size: .8rem; font-weight: 600; background: var(--color-fd-secondary); color: var(--color-fd-secondary-foreground); }
+.docs-badge[data-color="blue"] { color: #2563eb; background: #2563eb15; }
+.docs-badge[data-color="green"] { color: #16a34a; background: #16a34a15; }
+.docs-badge[data-color="red"] { color: #dc2626; background: #dc262615; }
+.dark .docs-badge[data-color="blue"] { color: #93c5fd; }
+.dark .docs-badge[data-color="green"] { color: #86efac; }
+.dark .docs-badge[data-color="red"] { color: #fca5a5; }
+.docs-example { margin-block: 1.75rem; }
+.docs-example-label { margin-bottom: .5rem; color: var(--color-fd-muted-foreground); font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
+.docs-disclosure { margin-block: 1rem; border: 1px solid var(--color-fd-border); border-radius: .65rem; padding: .9rem 1.1rem; }
+.docs-disclosure summary { cursor: pointer; font-weight: 500; }
+.docs-disclosure[open] > summary { margin-bottom: 1rem; }
diff --git a/app/layout.tsx b/app/layout.tsx
new file mode 100644
index 0000000..9145ee5
--- /dev/null
+++ b/app/layout.tsx
@@ -0,0 +1,21 @@
+import type { Metadata } from 'next';
+import type { ReactNode } from 'react';
+import { RootProvider } from 'fumadocs-ui/provider/next';
+import './global.css';
+
+export const metadata: Metadata = {
+ metadataBase: new URL('https://docs.repromptai.com'),
+ title: { default: 'Reprompt Docs', template: '%s | Reprompt' },
+ description: 'Enrich place data, search the web, and build with the Reprompt API.',
+ icons: { icon: '/favicon.svg' },
+};
+
+export default function RootLayout({ children }: { children: ReactNode }) {
+ return (
+
+
+ {children}
+
+
+ );
+}
diff --git a/app/not-found.tsx b/app/not-found.tsx
new file mode 100644
index 0000000..90f6463
--- /dev/null
+++ b/app/not-found.tsx
@@ -0,0 +1,12 @@
+import Link from 'next/link';
+
+export default function NotFound() {
+ return (
+
+
404
+
Page not found
+
This page may have moved or is no longer available.
+ Go to the quickstart →
+
+ );
+}
diff --git a/app/robots.ts b/app/robots.ts
new file mode 100644
index 0000000..3352ccf
--- /dev/null
+++ b/app/robots.ts
@@ -0,0 +1,5 @@
+import type { MetadataRoute } from 'next';
+
+export default function robots(): MetadataRoute.Robots {
+ return { rules: { userAgent: '*', allow: '/' }, sitemap: 'https://docs.repromptai.com/sitemap.xml' };
+}
diff --git a/app/sitemap.ts b/app/sitemap.ts
new file mode 100644
index 0000000..3d10635
--- /dev/null
+++ b/app/sitemap.ts
@@ -0,0 +1,8 @@
+import type { MetadataRoute } from 'next';
+import { source } from '@/lib/source';
+
+export default function sitemap(): MetadataRoute.Sitemap {
+ // Next's sitemap serializer writes URLs directly into XML. Percent-encode
+ // ampersands in legacy paths so they remain valid URLs and valid XML text.
+ return source.getPages().map((page) => ({ url: `https://docs.repromptai.com${page.url.replaceAll('&', '%26')}` }));
+}
diff --git a/components/api-page.tsx b/components/api-page.tsx
new file mode 100644
index 0000000..af76c42
--- /dev/null
+++ b/components/api-page.tsx
@@ -0,0 +1,5 @@
+'use client';
+
+import { createOpenAPIPage } from 'fumadocs-openapi/ui';
+
+export const OpenAPIPage = createOpenAPIPage();
diff --git a/components/docs-layout.tsx b/components/docs-layout.tsx
new file mode 100644
index 0000000..41d13c2
--- /dev/null
+++ b/components/docs-layout.tsx
@@ -0,0 +1,27 @@
+'use client';
+
+import { useState, type ReactNode } from 'react';
+import { usePathname } from 'next/navigation';
+import { DocsLayout, type DocsLayoutProps } from 'fumadocs-ui/layouts/docs';
+import { getLayoutTabs } from 'fumadocs-ui/layouts/shared';
+import type { Folder } from 'fumadocs-core/page-tree';
+import { navigationVersion } from '@/lib/navigation';
+
+export function VersionedDocsLayout({ versions, children, ...props }: Omit & { versions: [Folder, Folder]; children: ReactNode }) {
+ const pathname = usePathname();
+ const [selection, setSelection] = useState(() => ({ pathname, version: navigationVersion(pathname) }));
+ const version = navigationVersion(pathname, selection.version);
+ if (selection.pathname !== pathname) setSelection({ pathname, version });
+
+ // The shared troubleshooting URL stays in the version the reader came from.
+ // Keep the switcher order fixed, while resolving the shared page in that root.
+ const roots = versions.map((root, index) => ({
+ ...root,
+ children: root.children.filter((item) =>
+ item.type !== 'page' || item.url !== '/guides/troubleshooting-40x' || index === (version === 'v1' ? 0 : 1),
+ ),
+ }));
+ const tree = { $id: `navigation-${version}`, name: 'Documentation', children: roots };
+ const tabs = getLayoutTabs(tree);
+ return {children};
+}
diff --git a/components/legacy-anchors.tsx b/components/legacy-anchors.tsx
new file mode 100644
index 0000000..656a90d
--- /dev/null
+++ b/components/legacy-anchors.tsx
@@ -0,0 +1,24 @@
+'use client';
+
+import { useEffect } from 'react';
+import { usePathname } from 'next/navigation';
+import { legacyAnchorTarget } from '@/lib/legacy-anchors';
+
+// Mintlify schema-field links fall back to their corresponding API section.
+// Authored guide headings retain their exact IDs in the MDX source.
+export function LegacyAnchors() {
+ const pathname = usePathname();
+ useEffect(() => {
+ function followLegacyAnchor() {
+ let hash: string;
+ try { hash = decodeURIComponent(location.hash.slice(1)); } catch { return; }
+ if (!hash || document.getElementById(hash)) return;
+ const target = legacyAnchorTarget(hash, (id) => !!document.getElementById(id));
+ if (target) document.getElementById(target)?.scrollIntoView();
+ }
+ followLegacyAnchor();
+ window.addEventListener('hashchange', followLegacyAnchor);
+ return () => window.removeEventListener('hashchange', followLegacyAnchor);
+ }, [pathname]);
+ return null;
+}
diff --git a/components/mdx.tsx b/components/mdx.tsx
new file mode 100644
index 0000000..2265411
--- /dev/null
+++ b/components/mdx.tsx
@@ -0,0 +1,59 @@
+import { Children, isValidElement, type ReactNode } from 'react';
+import type { MDXComponents } from 'mdx/types';
+import defaultComponents from 'fumadocs-ui/mdx';
+import { Callout } from 'fumadocs-ui/components/callout';
+import { Steps, Step as FumaStep } from 'fumadocs-ui/components/steps';
+import { Tabs, Tab } from 'fumadocs-ui/components/tabs';
+
+type ContentProps = { children?: ReactNode };
+
+function Note({ children }: ContentProps) { return {children}; }
+function Tip({ children }: ContentProps) { return {children}; }
+function Warning({ children }: ContentProps) { return {children}; }
+function Step({ title, children }: ContentProps & { title?: string }) {
+ return {title &&
{title}
}{children};
+}
+function Frame({ children }: ContentProps) { return