Migrate OpenFGA docs and API reference to Mintlify - #1365
Merged
Merged
Conversation
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>
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
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>
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>
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>
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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/servicedeployment 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 fromgh-pages, not source files fromdocs-next. This PR has not changed DNS, Cloudflare, Mintlify, repository settings, or public traffic.Implemented
docs-site/docs/intodocs-site/, including all 110 articles and 35 byte-identical assets. Update navigation, links, redirects, source mappings, generators, and ownership rules. Mintlify adds the/docsmount once.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./api/serviceas 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.deploy/, the custom Worker/router/tests/runbook, Wrangler configuration/dependency, and proxy-development/build commands. Retain read-only hosted acceptance and fingerprint/LFS checks throughtest:docs-deploymentandverify:docs-deployment.#step-3.UPDATE_FILEpath correction and matching regression expectation. No branch filters, publisher logic, permissions, or API-updater fixes changed.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:
a2f7a7bb8e53cf2e738acdba29b0a12907ae9d40aligns 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:
71154abceremoves 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:
ff5056776adopts 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 indocs-site/docs.jsonpreserve 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
docs-site/fga.mdx, navigationfga/docs/fgadocs-site/modeling/..., navigationmodeling/.../docs/modeling/...api/service/docs/api/service/.../api/service, without a recognized Swagger fragment/docs/api/service/api/service#Relationship%20Queries/Checkor#/Relationship%20Queries/Check/api,/api-reference, including trailing slashes/api/service/<group>/<operation>and/api-reference/<group>/<operation>/docs/api/service/<group>/<operation>, retaining query/fragment/,/project,/community,/blog/**, website search/assetsHTTP 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
docs-next; website/Blog media stays on LFS. Both staged and working-tree native pointers are rejected.Remaining owner settings
The deployment guide is the operational source of truth.
docs-nextas the temporary protected default/source branch; retarget contributor/updater PRs as appropriate.gh-pages->/ (root), custom domainopenfga.dev.docs-nextcoverage, publication hold, branch guards, and serialized publishing. Stop oldmainpush/manual publishers from overwriting the new site. Scheduled workflows follow the default branch; an arbitrary variable is not an implemented hold.${{ runner.temp }}expressions before it can run. Observed failure.openfga/openfga.dev; branchdocs-next; directory/docs-site; custom domainopenfga.dev; Host at/docs. Recheck edit links and deployment previews.openfga.dev/docs/*,openfga.dev/mintlify-assets/*, andopenfga.dev/_mintlify/*. Preserve the existing proxied website DNS origin; noopenfga.dev/*, whole-domain Worker Custom Domain, or apex CNAME takeover./docsentryopenfga.devand exact path/docs, tohttps://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:mintlifygate, 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 --histogramavoids 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:
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
docs-next, configure Mintlify's/docsmount, and accept the matching hosted fingerprint. Do not publish the docs-free Docusaurus build yet.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.