Skip to content

docs: generate a Mintlify SDK reference artifact from TypeDoc - #1210

Closed
gyaneshgouraw wants to merge 2 commits into
mainfrom
mintlify-poc
Closed

gyaneshgouraw wants to merge 2 commits into
mainfrom
mintlify-poc

Conversation

@gyaneshgouraw

@gyaneshgouraw gyaneshgouraw commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds groundwork for publishing the @auth0/auth0-react API reference to Mintlify/docs-v2. No library code changes.

  • Documents only public exports.
  • Groups API exports into useful categories.
  • Improves the TypeDoc sidebar/navigation.
  • Adds npm run docs:docsv2 to generate the Mintlify artifact and navigation.
  • Adds Mintlify-specific type links.

Important

Generated docs/ and mintlify/ outputs are not committed. Publishing to docs-v2 is still manual.

Diagram

%%{init: { 'theme': 'base', 'themeVariables': { 'primaryColor': '#eef6f7', 'primaryTextColor': '#2f3a3d', 'primaryBorderColor': '#b8d8dd', 'lineColor': '#7f9ea6', 'background': '#ffffff' } } }%%
flowchart LR
  subgraph Config["Config"]
    Base["typedoc.js"]
    V2["typedoc.docsv2.js"]
  end
  subgraph Transform["TypeDoc run"]
    Cat["scripts/typedoc-plugin.js<br/>categories + auth0 theme"]
    Mint["scripts/typedoc-plugin-mintlify.js<br/>markdown type links"]
    Nav["scripts/build-mintlify-nav.mjs"]
  end
  subgraph Out["Output"]
    Html[("docs/ HTML site")]
    Json[("mintlify/.../auth0-react.json")]
    NavJson[("mintlify/.../react-reference.en.json")]
  end
  Base --> Cat --> Html
  Base -. "spread, minus out/theme" .-> V2
  V2 --> Cat
  V2 --> Mint --> Json --> Nav --> NavJson
  style Config fill:#f3f3f3,stroke:#cfcfcf
  style Transform fill:#eff7ec,stroke:#b9d9ad
  style Out fill:#eef2fa,stroke:#b8c7e6
Loading

Testing

Run:

npm run docs
npm run docs:docsv2

Verify the HTML docs, generated Mintlify artifact, and navigation.

Checklist

  • Documentation updated
  • GitHub checks passing
  • Correct base branch

@coderabbitai

coderabbitai Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ffbd723c-88d7-45d6-9181-cb238575b71a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gyaneshgouraw

Copy link
Copy Markdown
Contributor Author

Closing this PR as newer PR is up adding this changes with enhancements - #1258

gyaneshgouraw added a commit that referenced this pull request Oct 5, 2026
## Summary

Updates TypeDoc so the generated API reference is grouped into readable
sections (Getting Started, Hooks & HOCs, Context, Errors, Reference)
instead of a flat alphabetical list.

Categories derive from `@category` tags on the public declarations, a
plugin controls category order and warns when an own-symbol is left
uncategorised, and the sidebar now surfaces `Auth0ContextInterface`
members grouped by category.

  No runtime changes, only documentation-related updates.

  ## Supersedes

  This PR supersedes and closes the earlier docs-reference work:

  - #1242 — feat(docs): add foundation for automating SDK reference docs
- #1210 — docs: generate a Mintlify SDK reference artifact from TypeDoc


  ## Changes

- **Entry point**: reference is generated from `src/index.tsx` (the
public contract) rather than expanding the whole `src/` tree, keeping
internal modules (reducer, auth state, utils)
  out.
- **Grouping by category**: `typedoc.js` groups the landing page and
sidebar by `@category`, wired to the plugin's `CATEGORY_ORDER` and
`DEFAULT_CATEGORY`.

- **Plugin** (`scripts/typedoc-plugin.js`): controls category order and
validates categories per reflection against level-scoped allowed-sets
(top-level vs interface-member).

- **Category tags**: `@category` tags added across the public surface
(hooks/HOCs, provider options, context interface + its members, errors,
and re-exported spa-js option/claim typesunder Reference).
`Auth0ContextInterface` members are tagged so they appear grouped in the
sidebar.


  ## Testing

- `npm run docs:docsv2` — generates the Mintlify JSON artefact (exit 0;
Reference holds 60
  symbols, 57 re-exported).
  - `npm test` — 100% coverage, all tests pass.
  - `npm run lint` — clean.



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

## Documentation

* Added a categorized SDK reference with clearer navigation for
authentication state, errors, hooks, and getting started.
* Made the Getting Started and Hooks & HOCs navigation groups expanded
by default when no saved preference is available.
* Clarified the `useAuth0` documentation, including the returned auth
state, methods, and available sub-clients.
* Added a JSON documentation output alongside the existing documentation
format.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Michael Perrotte <mike@mikecorp.ca>
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.

1 participant