Skip to content

docs: fix documentation for auth - #557

Merged
tonychang04 merged 1 commit into
mainfrom
docs/newExamplesPage
Nov 6, 2025
Merged

tonychang04 merged 1 commit into
mainfrom
docs/newExamplesPage

Conversation

@tonychang04

@tonychang04 tonychang04 commented Nov 6, 2025 •

Copy link
Copy Markdown
Member

Summary

make documentation great again part 2

Fix outdated auth, set up examples page

How did you test this change?

mint dev

Summary by CodeRabbit

  • Documentation
    • Expanded OAuth provider support to include Microsoft, Discord, and additional providers beyond Google and GitHub.
    • Simplified OAuth API endpoint structure with generic provider-based routes.
    • Streamlined onboarding documentation with improved Quick Start flows for authentication setup.
    • Added new Integration Guides section and public Changelog to documentation.

@coderabbitai

coderabbitai Bot commented Nov 6, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Documentation refactored to reflect generic provider-based OAuth routing system replacing provider-specific endpoints, database schema table renamed (_oauth_connections → _account_providers), expanded OAuth provider support (Microsoft, Discord added), and UI component documentation streamlined with improved onboarding flow structure.

Changes

Cohort / File(s) Summary
OAuth & Authentication Documentation
docs/core-concepts/authentication/architecture.mdx, docs/core-concepts/authentication/sdk.mdx
Updated OAuth routing from provider-specific routes (GET /api/auth/oauth/google, /github) to generic provider-based route (GET /api/auth/oauth/:provider). Expanded provider catalog documentation to include Microsoft, Discord, and additional providers. Generalized provider parameter documentation from constrained union to broader string type.
Database Schema Documentation
docs/core-concepts/database/architecture.mdx
Updated system table reference from _oauth_connections to _account_providers.
UI Components Documentation
docs/core-concepts/authentication/ui-components/nextjs.mdx, docs/core-concepts/authentication/ui-components/react.mdx
Removed AI-agent navigation tips, "Why Built-in Auth?" and "Why @insforge/framework?" sections, and marketing-focused card groups. Consolidated onboarding flow under Quick Start sequence with revised step numbering and streamlined section structure.
Documentation Navigation & Examples
docs/docs.json
Removed customization page from UI Components group. Added new public Changelog section under Docs tab. Reorganized Examples tab: replaced Changelog group with new Integration Guides group containing coming-soon page.
New Integration Guides Page
docs/examples/integration-guides/coming-soon.mdx
Added new documentation page describing upcoming Integration Guides section with placeholder content, bullet list of tutorial topics, and community resource links.
Examples Overview Page
docs/examples/overview.mdx
Created new documentation page for InsForge cookbook with sections describing showcase content, integration guides, and contribution guidelines.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Straightforward documentation updates with no code logic changes or API modifications
  • Changes follow consistent patterns: content removal, structural reorganization, provider list expansion
  • Large file modifications are primarily deletions and reordering rather than complex edits
  • Schema rename is well-contained and clearly documented

Minor considerations:

  • Verify consistency of provider list across all updated documentation files
  • Confirm OAuth route pattern (:provider) is accurately reflected throughout architecture documentation
  • Check that UI component streamlining doesn't lose critical setup information

Possibly related PRs

Suggested reviewers

  • Fermionic-Lyu
  • Leo-rq-yu

Poem

🐰 A hop through docs, we reorganize the way,
From provider-routes to paths generic and gay!
Tables renamed, guides arriving soon,
The UI flows cleaner—a most timely tune! 📚✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and overly broad. While the PR does contain authentication documentation updates, it doesn't specify what was 'fixed' or the primary nature of the changes. Consider using a more descriptive title such as 'docs: update authentication docs with multiple OAuth providers' or 'docs: refactor auth docs and add examples page' to better convey the scope and nature of changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/newExamplesPage

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 and usage tips.

@tonychang04
tonychang04 marked this pull request as ready for review November 6, 2025 01:08

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/core-concepts/authentication/architecture.mdx (1)

12-44: Fix node ID duplication in mermaid diagram.

The diagram has a critical error: the node ID OAuth is used twice with conflicting labels—once for "OAuth Providers" (line 5) and once for "_account_providers" (line 17). This causes node collision in Mermaid, breaking the intended architecture representation.

Rename the second OAuth node to a distinct ID (e.g., AccountProviders or OAuthProviderTable), update corresponding connections (DB --> AccountProviders[_account_providers]), and update the style definition for the new ID. This ensures the OAuth provider system and the database table remain logically separate nodes in the diagram.

🧹 Nitpick comments (1)
docs/core-concepts/authentication/sdk.mdx (1)

120-120: Minor: Consider brand name consistency.

The static analysis tool flagged that "GitHub" should be capitalized. While the provider parameter itself uses lowercase 'github' (which is correct for the actual API), consider whether documentation consistency guidelines call for "GitHub" in descriptive text to match brand standards.

If brand consistency is a concern, you could update the parameter description to read: "OAuth provider name (e.g., 'google', 'github' (GitHub), 'microsoft' (Microsoft), 'discord' (Discord))" to align brand names with their proper capitalization in descriptive context.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d97156 and 724bf2c.

📒 Files selected for processing (8)
  • docs/core-concepts/authentication/architecture.mdx (4 hunks)
  • docs/core-concepts/authentication/sdk.mdx (1 hunks)
  • docs/core-concepts/authentication/ui-components/nextjs.mdx (3 hunks)
  • docs/core-concepts/authentication/ui-components/react.mdx (4 hunks)
  • docs/core-concepts/database/architecture.mdx (1 hunks)
  • docs/docs.json (2 hunks)
  • docs/examples/integration-guides/coming-soon.mdx (1 hunks)
  • docs/examples/overview.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.{ts,tsx} : Use React Hook Form for form handling with Zod validation

Applied to files:

  • docs/core-concepts/authentication/ui-components/react.mdx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/*.{tsx,ts} : Use functional React components with hooks exclusively

Applied to files:

  • docs/core-concepts/authentication/ui-components/react.mdx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to frontend/src/**/use[A-Z]*.ts : Hook files must be named usePascalCase.ts (e.g., useAuth.ts)

Applied to files:

  • docs/core-concepts/authentication/ui-components/react.mdx
📚 Learning: 2025-11-04T05:18:26.126Z
Learnt from: Fermionic-Lyu
Repo: InsForge/InsForge PR: 553
File: docs/changelog.mdx:6-35
Timestamp: 2025-11-04T05:18:26.126Z
Learning: The InsForge JavaScript SDK repository is named "insforge-sdk-js" and is located at https://github.com/insforge/insforge-sdk-js

Applied to files:

  • docs/core-concepts/authentication/ui-components/react.mdx
  • docs/core-concepts/authentication/ui-components/nextjs.mdx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to backend/src/api/**/*.ts : Implement authentication and error-handling middleware

Applied to files:

  • docs/core-concepts/authentication/ui-components/nextjs.mdx
📚 Learning: 2025-10-15T18:18:47.519Z
Learnt from: CR
Repo: InsForge/InsForge PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-15T18:18:47.519Z
Learning: Applies to backend/src/api/**/*.ts : Follow RESTful conventions for API endpoints

Applied to files:

  • docs/core-concepts/authentication/ui-components/nextjs.mdx
🪛 LanguageTool
docs/core-concepts/authentication/sdk.mdx

[uncategorized] ~120-~120: The official name of this software platform is spelled with a capital “H”.
Context: ...- OAuth provider name (e.g., 'google', 'github', 'microsoft', 'discord') - `redirectTo...

(GITHUB)

🔇 Additional comments (17)
docs/examples/integration-guides/coming-soon.mdx (2)

1-24: MDX structure and component usage look good.

The file is well-organized with appropriate frontmatter, descriptive content, and proper use of CardGroup/Card components. The placeholder content aligns with the PR's goal of setting up an Integration Guides section.


16-23: ---

Manually verify the Discord invite link is active and under project control.

The Discord invite URL (https://discord.com/invite/DvBtaEc9Jz) cannot be verified programmatically. Manually test the link to confirm it's active and resolves to the InsForge community. Additionally, consider using a "never expire" invite link for public documentation to reduce the risk of expired invites being repurposed.

docs/core-concepts/database/architecture.mdx (2)

126-142: System tables documentation well-maintained.

The System Tables section clearly lists all internal InsForge tables with their purposes. The rename to _account_providers fits the documented purpose and aligns with the provider-based OAuth architecture described in other documentation.


132-132: Schema rename verified as consistent across documentation.

The table reference rename from _oauth_connections to _account_providers is properly reflected in both docs/core-concepts/database/architecture.mdx (line 132) and docs/core-concepts/authentication/architecture.mdx (line 29 diagram). No stale references to the old table name exist in the documentation.

docs/core-concepts/authentication/sdk.mdx (1)

116-120: Expanded provider support documentation is clear.

The documentation correctly reflects the broader provider coverage and properly generalizes the provider parameter to a string type, allowing for flexibility as new providers are added. The examples effectively demonstrate common providers.

docs/docs.json (2)

50-56: UI Components structure streamlined appropriately.

The removal of the customization section and keeping only nextjs and react aligns with the documentation restructuring goal. The UI Components group now focuses on core framework integrations.


82-104: All referenced documentation files exist.

Verification confirms that all pages referenced in docs.json are present:

  • ✓ docs/changelog.mdx
  • ✓ docs/examples/overview.mdx
  • ✓ docs/examples/integration-guides/coming-soon.mdx

The navigation structure updates are properly backed by existing documentation files.

docs/examples/overview.mdx (2)

1-52: New overview page is well-structured and welcoming.

The InsForge Cookbook overview provides clear sections (Showcase, Integration Guides, Contributing) with appropriate call-to-action cards. The content effectively guides users and encourages community contribution. MDX component usage is correct.


14-16: Showcase page reference is correctly configured.

Verification confirms the /showcase link target exists:

  • ✓ docs/showcase.mdx file exists
  • ✓ docs/docs.json contains the showcase page in configuration with "group": "Showcase" and "pages": ["showcase"]

No issues found.

docs/core-concepts/authentication/ui-components/nextjs.mdx (2)

18-122: Quick Start structure is clean and action-oriented.

The reorganized Next.js setup flow is well-structured, combining installation and environment setup in Step 1, then proceeding through provider configuration, API routing, and middleware. The step-by-step approach with practical code examples makes the onboarding path clear.


29-29: Let me search more specifically for the @insforge/nextjs package:

Let me search more directly for the insforge package:

Unable to verify peer dependency requirements for @insforge/nextjs package.

After conducting multiple web searches, I could not locate an npm package named @insforge/nextjs in the public registry. The package does not appear to exist as a published, publicly-available library.

This means I cannot verify whether the documented dependency versions (react@^19.0.0, react-dom@^19.0.0, next@^15.0.0) actually match the package's peer dependency requirements. The package may be:

  • Internal/private to your organization
  • Published under a different name or scope
  • Not yet published to npm

Please verify the correct package name and check its actual peer dependencies before publishing this documentation. If you have access to the package, run npm info @insforge/nextjs peerDependencies or check its package.json to confirm the versions documented are accurate.

docs/core-concepts/authentication/ui-components/react.mdx (2)

18-150: React Quick Start is well-organized with clear alternatives.

The Quick Start flows logically from installation through provider setup, router configuration, and hook usage. The parallel structure with the Next.js documentation improves consistency. The preservation of the "Alternative: Custom UI Components" section provides flexibility for users needing custom authentication pages.


26-28: I need to clarify the SDK package name to complete the verification. The package @insforge/react doesn't appear to exist on npm.

To continue, I need one of the following:

  1. Correct package name: What is the actual npm package name for the SDK being documented? (e.g., @forge/react, @company/sdk, or another name?)
  2. Repository access: Alternatively, I can inspect the repository to find the correct package name in its dependencies or documentation.

Once I have the correct package name, I can verify:

  • Current stable versions for React 19 and react-router-dom 7.9.0
  • Peer dependency requirements for all three packages
  • Compatibility between these versions
docs/core-concepts/authentication/architecture.mdx (4)

29-29: Schema rename is consistently applied in architecture documentation.

The database schema reference in the mermaid diagram has been updated from _oauth_connections to _account_providers, aligning with the same change documented in docs/core-concepts/database/architecture.mdx. This consistency across documentation files is important.


54-54: Provider list expanded appropriately to reflect broader support.

The Core Components table now lists "Google, GitHub, Microsoft, Discord, and more" for OAuth providers, which aligns with the expansion shown in the sdk.mdx documentation and reflects the new generic provider routing pattern.


174-175: Generic provider routing pattern is scalable and maintainable.

The OAuth endpoints have been successfully generalized from provider-specific routes (e.g., /api/auth/oauth/google, /api/auth/oauth/github) to a unified pattern (/api/auth/oauth/:provider). This architecture is cleaner and easier to extend as new providers are added.


186-200: Provider configuration section improved with explicit examples.

The documentation now includes explicit examples for Google and GitHub OAuth configuration, following the broader provider support statement. This provides developers with clear reference material for setup.

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.

3 participants