Skip to content

Migrate OpenFGA docs and API reference to Mintlify - #1365

Merged
Siddhant-K-code merged 109 commits into
docs-nextfrom
poc/mintlify-native
Sep 28, 2026
Merged

Siddhant-K-code merged 109 commits into
docs-nextfrom
poc/mintlify-native

Conversation

@Siddhant-K-code

@Siddhant-K-code Siddhant-K-code commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Move 110 OpenFGA documentation pages and the read-only reference for 24 API operations to Mintlify, with one public mount at https://openfga.dev/docs, including /docs/api/service. Home, Project, Community, Blog, and website search remain on Docusaurus/GitHub Pages.

Use Mintlify's dashboard-provided Cloudflare Worker, not a repository-owned router. The earlier sibling /api/service deployment and custom-Worker design are superseded.

Target: docs-next; still draft. Merge and public activation remain owner-controlled. GitHub Pages must continue publishing generated output from gh-pages, not source files from docs-next. This PR has not changed DNS, Cloudflare, Mintlify, repository settings, or public traffic.

Implemented

  • Flatten docs-site/docs/ into docs-site/, including all 110 articles and 35 byte-identical assets. Update navigation, links, redirects, source mappings, generators, and ownership rules. Mintlify adds the /docs mount once.
  • Keep OpenAPI directory api/service; public operation URLs become /docs/api/service/.... Keep the upstream source unchanged: https://raw.githubusercontent.com/openfga/api/refs/heads/main/docs/openapiv3/apidocs.openapi.json.
  • Retain /api/service as a Docusaurus fragment-aware compatibility page. Generate redirects for /api, /api-reference, and all 24 old operation URLs under both legacy prefixes. Preserve query strings, Swagger bookmarks, and encoded operation names.
  • Remove deploy/, the custom Worker/router/tests/runbook, Wrangler configuration/dependency, and proxy-development/build commands. Retain read-only hosted acceptance and fingerprint/LFS checks through test:docs-deployment and verify:docs-deployment.
  • Preserve the frozen content fixtures; adapt only source-location/internal-link representation when reading them. Keep the incoming parent-child guide's legacy user-groups heading target alongside #step-3.
  • GHA scope: only the approved configuration updater UPDATE_FILE path correction and matching regression expectation. No branch filters, publisher logic, permissions, or API-updater fixes changed.
  • Preserve original upstream commits through merge 2279221674a7f4755293276ffaaf483aaabcf89a, including feat: added dynamic conditions announcement #1372, chore(deps): bump image-size from 2.0.2 to 2.0.4 #1373, chore(deps): bump http-proxy-middleware from 2.0.9 to 2.0.10 #1374, and ci: limit blog link checks to new posts #1370. No rebasing, amended commits, or force-push.

Documentation follow-up: a2f7a7bb8e53cf2e738acdba29b0a12907ae9d40 aligns all four README guides, adds exact Cloudflare dashboard settings, separates source paths from public URLs, and documents the publication hold before merging or changing the default branch. Only READMEs and the required native-source marker changed in this follow-up.

Header follow-up: 71154abce removes the visible GitHub stars “last known” text and unused two-line styling. Only the star icon/count remain visible; cache status and observation time remain in the tooltip and accessible label. Cache expiry, native recovery, and request behavior are unchanged.

OpenAPI follow-up: ff5056776 adopts the summary/description update in openfga/api#263. All 20 paths and 24 operation identities remain unchanged; 13 summary-derived URLs change. Explicit old-to-new redirects in docs-site/docs.json preserve existing links and bookmarks. The updater now requires those redirects instead of overwriting historical aliases. Docusaurus sources, Blog content, workflows, and the SDK sample overlay are unchanged by this follow-up.

Source and URL ownership

Source or legacy URL Public destination
docs-site/fga.mdx, navigation fga /docs/fga
docs-site/modeling/..., navigation modeling/... /docs/modeling/...
OpenAPI source directory api/service /docs/api/service/...
/api/service, without a recognized Swagger fragment /docs/api/service
/api/service#Relationship%20Queries/Check or #/Relationship%20Queries/Check Matching new API operation
/api, /api-reference, including trailing slashes Docusaurus compatibility entry, retaining query/fragment
/api/service/<group>/<operation> and /api-reference/<group>/<operation> Matching /docs/api/service/<group>/<operation>, retaining query/fragment
/, /project, /community, /blog/**, website search/assets Existing Docusaurus/GitHub Pages website
Root robots, sitemap, and LLM resources Website-owned

HTTP cannot inspect Swagger fragments. The compatibility page therefore remains HTML, not an edge redirect. Unknown/malformed fragments produce an explicit warning and use the new API entry without looping. The page is noindex and excluded from search, sitemaps, and LLM bundles; generated aliases are redirect-only pages with canonical destinations.

Native navigation and Markdown links use source-root paths, not an extra docs/ prefix. Raw JSX anchors in reusable snippets retain explicit public URLs. Generated API pages do not require checked-in MDX files.

Preserved migration contracts

Area Contract
Content Preserve original visible titles, wording, page boundaries, navigation hierarchy/order, worked examples, and meaningful heading links. No editorial rewrite. Retained technical exceptions remain scoped.
API and viewers Read-only API reference, 90 SDK samples across five languages, cURL for all 24 operations, and eight reusable native viewers. Six AuthZEN operations remain HTTP-only. Keep native tabs and the official OpenFGA DSL grammar.
Reader experience Preserve existing typography, native navigation/search, Git-based modification dates, edit-link treatment, API descriptions, and agreed assistant-entry visibility. Keep Copy page, ChatGPT, Claude, MCP, Cursor, and VS Code actions.
Search/discovery Separate website and Mintlify search; no unified search or dependency patch. Keep descriptions as metadata and the composite sitemap covering website pages, 110 docs, and 24 operations.
Assets Native media stays ordinary Git during docs-next; website/Blog media stays on LFS. Both staged and working-tree native pointers are rejected.
Generated updates Configuration updates touch only the generated region. API updates use reviewed inputs and draft-PR/issue handling, never regenerate independent fixtures or auto-merge.

Remaining owner settings

The deployment guide is the operational source of truth.

Surface Required setting/action
GitHub repository Coordinate docs-next as the temporary protected default/source branch; retarget contributor/updater PRs as appropriate.
GitHub Pages Keep Deploy from a branch -> gh-pages -> / (root), custom domain openfga.dev.
Website publishing and CI Separately approve docs-next coverage, publication hold, branch guards, and serialized publishing. Stop old main push/manual publishers from overwriting the new site. Scheduled workflows follow the default branch; an arbitrary variable is not an implemented hold.
Configuration/API updaters Review default-branch checkout/manual-ref handling. Fix the deferred API updater's invalid job-level ${{ runner.temp }} expressions before it can run. Observed failure.
Mintlify Existing OpenFGA project; repository openfga/openfga.dev; branch docs-next; directory /docs-site; custom domain openfga.dev; Host at /docs. Recheck edit links and deployment previews.
Cloudflare Dashboard-generated Mintlify Worker, with routes openfga.dev/docs/*, openfga.dev/mintlify-assets/*, and openfga.dev/_mintlify/*. Preserve the existing proxied website DNS origin; no openfga.dev/*, whole-domain Worker Custom Domain, or apex CNAME takeover.
Exact /docs entry Single Redirect matching host openfga.dev and exact path /docs, to https://openfga.dev/docs/, temporary 307, Preserve query string enabled. See the exact dashboard filter.

The root support routes remain necessary even with all content under /docs. Exact Worker patterns do not match query strings; /docs* also captures lookalike website paths. No repository-specific root /mcp, /api/request, branding-asset, or discovery rewrites remain. If provider-generated URLs escape the supported subpath/routes, resolve that with Mintlify before cutover rather than restoring a custom router.

Validation and hosted limits

Implementation validation covered the full npm run check:mintlify gate, TypeScript, scoped ESLint, production and /pr-preview/pr-1365/ website builds, and 1,125 cross-site/native links. Local Mintlify served all 24 API operations and representative articles/assets. Browser checks covered entry aliases, trailing slashes, valid/malformed Swagger fragments, queries, BatchCheck backticks, AuthZEN brackets, and leaving the website preview prefix. Redirect destinations were intercepted; these were not production acceptance requests.

All 35 relocated media files retain their original bytes and retained dependency versions/metadata are unchanged. git diff --histogram avoids misleading matching churn in the Wrangler lockfile removal. The documentation-only follow-up refreshed and checked the fingerprint and source inventory. The header follow-up passed all 71 navigation/header regressions, scoped ESLint, and fingerprint freshness; these follow-ups do not claim a new hosted or full-suite run.

The OpenAPI follow-up passed 65 targeted route/updater regressions, the full native gate, scoped ESLint, and production/preview builds with 1,125 cross-site links each. A second updater run was unchanged. This does not establish hosted acceptance of the new URLs or redirects.

Current native-source fingerprint:

ab655a379fdc6fe3d305e6cf78b73f4b1a4ef4356950def4d69a6f6cdf280aa6

The configured hosted deployment and public Worker have not been accepted for this fingerprint. Local previews use source-root routes and cannot establish hosted canonical, discovery, search, or MCP correctness. Previous two-prefix/proxy evidence is superseded.

Release gates and recovery

  • Obtain documentation/frontend/DX reviews. CODEOWNERS in the PR base controls automatic assignment until these ownership changes are merged.
  • Record disposition of existing dependency license-policy warnings.
  • Name cutover/rollback owners, save previous website/edge/provider settings, and hold push, scheduled, manual, already-running, and queued publishers before merging or switching the default branch.
  • Merge the reviewed state into docs-next, configure Mintlify's /docs mount, and accept the matching hosted fingerprint. Do not publish the docs-free Docusaurus build yet.
  • Activate the scoped provider Worker routes and exact-entry redirect, then publish the matching Docusaurus build in the agreed window.
  • Complete public acceptance of docs/API pages, old bookmarks, website routes, assets, canonical URLs, discovery, search, and MCP/editor actions.
# After Mintlify deploys the configured /docs mount from the selected checkout:
npm run verify:docs-origin

# After coordinated public activation and website publication:
npm run verify:docs-deployment -- --origin https://openfga.dev

Mintlify-only staging stops after native acceptance, without changing public routing or publishing the migrated website. See the ordered release sequence.

Rollback requires the complete previous website and its corresponding edge/provider configuration; removing docs routes alone leaves documentation unavailable. When Mintlify LFS support is verified end-to-end, apply the accepted migration onto a fresh branch from current main, convert native media to LFS before integration commits, and switch default/Mintlify/publisher/updater targets together. Do not import temporary inline-asset ancestry wholesale or assume skipping one conversion commit removes every ordinary-Git asset.

albertoperdomo and others added 30 commits July 17, 2026 15:18
120 pages ported from Docusaurus source MDX — full docs corpus including
modeling/, interacting/, best-practices/, use-cases/, industries/, adopters/,
and all getting-started/ subpages.

9 interactive viewer components (snippets/):
  CheckRequestViewer, BatchCheckRequestViewer, WriteRequestViewer,
  ListObjectsRequestViewer, ListUsersRequestViewer, AuthzModelSnippetViewer,
  OpenFGACodeBlock, CreateStoreViewer, HomePage

Architecture highlights:
  - Mintlify snippets cannot import npm packages; all codegen logic is inlined
    inside the exported function body (see README for details)
  - DSL syntax highlighting via openfga-dsl-highlight.js standalone tokenizer
    (ports the @openfga/frontend-utils Prism grammar, colors match openfga-dark)
  - @openfga/syntax-transformer@0.2.1 bundled as fga-codegen.js for
    AuthzModelSnippetViewer; rebuilable via scripts/build-fga-codegen.sh
  - Landing page ported with mode: "custom" (video, adopters carousel, features)
  - Native OpenAPI playground via api/openfga-openapi3.json (24 endpoints)
  - URL paths kept identical to Docusaurus slugs — no redirects needed

Mintlify monorepo deployment: enable "docs.json is in a subdirectory" in the
Mintlify dashboard and set path to /mintlify-native (no trailing slash).
See mintlify-native/README.md for full setup and architecture documentation.

Co-Authored-By: Claude <noreply@anthropic.com>
…sion

Mintlify's Imgix CDN applies auto=format to SVG assets which converts them
to WebP. The browser then receives non-SVG content but tries to parse it as
SVG, producing a broken image. Switching to PNG bypasses this.

Co-Authored-By: Claude <noreply@anthropic.com>
…cessing

Mintlify's Imgix CDN converts assets with auto=format, serving SVGs as
WebP and generating broken square thumbnails for PNGs from qlmanage.
External raw.githubusercontent.com URLs are served with correct Content-Type
and bypass Mintlify's CDN pipeline entirely.

Co-Authored-By: Claude <noreply@anthropic.com>
Mintlify's deployment reads files via the GitHub API which returns LFS
pointers instead of actual file content. This broke all images and videos
on the deployed site.

Add .gitattributes overrides so assets under mintlify-native/ are stored
as regular git objects. Re-commit images/img/ and video files as blobs.
Revert docs.json logo/favicon back to local /images/img/ paths.

Files are small (images ~0.5MB, videos ~3.1MB) so regular git storage
is appropriate. Impact is scoped to this branch only.

Co-Authored-By: Claude <noreply@anthropic.com>
Mintlify's deployed CDN does not serve raw CSS files from the content
directory as static assets. Replace the external /home.css <link> with
an inline <style> element injected via useEffect on mount.

Co-Authored-By: Claude <noreply@anthropic.com>
Two issues fixed:
1. .gitattributes override rules must appear AFTER global LFS rules —
   later patterns win in gitattributes, so overrides placed before the
   global *.webm/*.mp4/etc. rules were being overridden back to LFS.
2. git LFS hooks intercept `git add` even when filter is unset via
   .gitattributes — bypassed with filter.lfs.clean=cat to store actual
   file content as regular git blobs.

Videos (pattern.mp4/webm, terminal.mp4/webm) and images are now real
git objects that Mintlify can serve directly without LFS resolution.

Co-Authored-By: Claude <noreply@anthropic.com>
Mintlify serves static video files from subdirectories. Move mp4 files to
mintlify-native/videos/ and update <video> elements to use src attribute
directly (as recommended by Mintlify support) rather than <source> children.

Co-Authored-By: Claude <noreply@anthropic.com>
Mintlify auto-includes any .css file in the content directory on every
page — same mechanism as .js files. home.css is already in mintlify-native/
and is injected automatically. No manual loading or inline <style> needed.

Co-Authored-By: Claude <noreply@anthropic.com>
API playground description code blocks were rendering with a light
background (styling.codeblocks defaults to 'system', following OS
preference). Setting it to 'dark' ensures all code blocks use the dark
Shiki theme, consistent with appearance.strict: true.

Co-Authored-By: Claude <noreply@anthropic.com>
Shiki's dual-theme mode embeds both light and dark colors inline — the
light values are in the style attribute and the dark values as CSS custom
properties (--shiki-dark, --shiki-dark-bg). When Mintlify's root .dark
class is active, override the inline styles with !important to use the
dark variables. Fixes white code blocks in API playground descriptions.

Co-Authored-By: Claude <noreply@anthropic.com>
Each section had both a created landing page (docs/section.mdx) and the
authoritative ported overview (docs/section/overview.mdx) in the nav,
causing duplicate entries in the sidebar.

Removed 8 duplicate landing .mdx files and updated docs.json to use
the /overview page as the section entry:
  docs/modeling, docs/adopters, docs/best-practices, docs/industries,
  docs/interacting, docs/learn, docs/modeling/agents, docs/use-cases

The /overview.mdx files are the source-accurate versions ported from
the Docusaurus repo; the top-level .mdx files were redundant summaries.

Co-Authored-By: Claude <noreply@anthropic.com>
Pages with relative image references (./assets/*.svg) were 404ing because
the assets directories were never copied from the Docusaurus source.

Added 30 diagram files to:
  modeling/assets/          (getting-started diagrams, custom-roles diagrams)
  modeling/advanced/assets/ (gdrive, github, slack, entitlements, iot diagrams)
  modeling/building-blocks/assets/ (usersets check tree)

Files committed as regular git blobs (LFS bypassed) so Mintlify can serve
them directly.

Co-Authored-By: Claude <noreply@anthropic.com>
The ported file had bare {user}, {action}, {object types}, {conditions},
{first noun}, {second noun} in blockquote text. MDX parses {} as JSX
expressions; {object types} has a space making it invalid JavaScript,
causing an acorn parse error and a 404 on the deployed page.

In the Docusaurus source these were inside JSX prop strings (title="...")
where {} is plain text. The port moved them to bare prose, so they need
escaping with \{...\} to render as literal curly-brace placeholders.

All 112 MDX files now compile cleanly.

Co-Authored-By: Claude <noreply@anthropic.com>
Add static asset handling section covering:
- Git LFS not supported by Mintlify; .gitattributes overrides must appear
  AFTER global rules; filter.lfs.clean=cat bypass needed for git add
- Videos: videos/ subdirectory + src attribute on <video> (not <source>)
- CSS/JS: auto-included at deploy time, not URL-addressable
- styling.codeblocks: dark needed for consistent Shiki theming
- MDX JSX escaping: {multi word} causes acorn parse errors -> 404

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
# Conflicts:
#	package.json
Port current documentation and project updates, convert legacy links to native Mintlify routes, refresh generated browser assets, and keep validation aligned with the merged toolchain.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore the current homepage copy, resource affordances, responsive layout, and project footer in the Mintlify implementation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use the OpenFGA green accent for static feature icons instead of the cyan placeholder inherited from the initial PoC.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the marketing, project, community, and blog surfaces on Docusaurus while preparing docs and API reference routes for Mintlify behind an edge proxy.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the existing /docs/modeling/testing URL when serving documentation through Mintlify and update internal references accordingly.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Load the approved OpenAPI 3.0.3 document from its immutable openfga/api merge revision and validate remote specifications without retaining a converted copy.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mirror the established documentation hierarchy and ordering with rooted sections while keeping the native Mintlify search and API navigation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep copyable API requests and examples while disabling the interactive Try it request builder.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Siddhant-K-code

This comment was marked as resolved.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Siddhant-K-code

This comment was marked as resolved.

@Siddhant-K-code
Siddhant-K-code changed the base branch from main to docs-next September 23, 2026 16:21
Siddhant-K-code and others added 2 commits September 25, 2026 21:14
Preserve the original announcement, dependency, and blog link-check commits. Retain native external-link coverage alongside the new blog input selection.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep inline documentation media deployable and document a clean LFS-backed return to main. Reject native LFS pointers in both the Git index and working tree, including locally hydrated assets. Record branch and publication prerequisites without changing GitHub Actions workflows or external settings.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Flatten the native source tree, move the public API reference below /docs, and preserve legacy API URLs with Docusaurus redirects. Remove repository-owned Cloudflare and Wrangler infrastructure while retaining source, content, and hosted acceptance checks.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Siddhant-K-code and others added 2 commits September 28, 2026 11:01
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Align contributor and tooling guides with the flattened source tree, provider Worker dashboard settings, legacy API redirects, and coordinated docs-next release sequence.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Show only the fallback star icon and count while preserving cache details in the tooltip and accessible label. Remove unused status styling and cover mutation and navigation remounts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adopt openfga/api#263 and add 13 explicit Mintlify redirects. Preserve the Docusaurus alias map and require reviewed redirects before accepting future API URL changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Separate Mintlify and website quick starts, link detailed maintenance guidance, remove obsolete Docker instructions, and clarify source versus publishing branches.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Siddhant-K-code
Siddhant-K-code marked this pull request as ready for review September 28, 2026 07:51
@Siddhant-K-code
Siddhant-K-code requested a balanced review from Copilot September 28, 2026 07:51
@Siddhant-K-code Siddhant-K-code removed the on-hold Issue is on-hold label Sep 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The relocated Community page introduces unapproved editorial drift despite the migration’s explicit content-preservation contract.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)

Comment thread src/pages/community.mdx Outdated
Preserve the legacy wording, metadata, link labels, and complete meeting links. Cover the website-owned page with an independent original-source fixture so native inventory exclusions cannot hide editorial drift.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-28 08:15 UTC

@Siddhant-K-code
Siddhant-K-code merged commit 18c8ff9 into docs-next Sep 28, 2026
9 checks passed
@Siddhant-K-code
Siddhant-K-code deleted the poc/mintlify-native branch September 28, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants