Skip to content

Conversation

@koistya
Copy link
Member

@koistya koistya commented Aug 17, 2025

Summary

This PR introduces a complete documentation site for the oauth-callback library using VitePress. The documentation provides comprehensive guides, API references, and examples to help developers integrate OAuth authentication into their CLI tools, desktop applications, and MCP clients.

What's Included

Documentation Structure

  • Introduction Section
    • What is OAuth Callback - Overview and use cases
    • Getting Started - Quick start guide with installation and basic usage
    • Core Concepts - Architecture, OAuth flow patterns, and design decisions

API Reference

  • Core Functions

    • getAuthCode - Complete reference for OAuth authorization code capture
    • browserAuth - MCP SDK-compatible OAuth provider documentation
  • Storage Providers

    • inMemoryStore - Ephemeral token storage
    • fileStore - Persistent file-based storage
    • Storage interfaces and custom implementation guide
  • Error Handling

    • OAuthError class documentation
    • Common error codes and handling patterns
  • TypeScript Types

    • Complete type definitions reference
    • Interface documentation

Examples

  • Notion MCP Integration - Comprehensive example showing Dynamic Client Registration (DCR) with the Notion Model Context Protocol server

Features

  • 🎨 Clean, modern documentation design with VitePress default theme
  • 📊 Mermaid diagram support for visualizing OAuth flows
  • 🔍 Local search functionality
  • 📱 Responsive design for mobile and desktop
  • 🔗 GitHub edit links for community contributions
  • 📦 Automated deployment to GitHub Pages

Changes Made

  1. Added VitePress framework with configuration for GitHub Pages deployment
  2. Created comprehensive documentation covering all library features
  3. Fixed documentation issues:
    • Updated expired Discord invite link
    • Removed reference to non-existent Linear example
    • Removed undocumented TimeoutError reference
  4. Added development documentation - docs:dev script reference in README
  5. Configured build process for documentation site

Testing

To test the documentation locally:

# Install dependencies
bun install

# Run documentation dev server
bun run docs:dev

# Build documentation
bun run docs:build

# Preview production build
bun run docs:preview

The documentation is available at http://localhost:5173 when running the dev server.

Deployment

The documentation is configured for GitHub Pages deployment at /oauth-callback/ base path. After merging, run:

bun run docs:publish

Screenshots

The documentation includes:

  • Clean landing page with feature highlights
  • Organized sidebar navigation
  • API reference with code examples
  • Interactive Mermaid diagrams for OAuth flows
  • Responsive design for all screen sizes

@koistya koistya merged commit fbff7e0 into main Aug 17, 2025
6 checks passed
@koistya koistya deleted the dev branch August 17, 2025 18:37
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.

2 participants