Skip to content

feat(docs): Complete documentation overhaul with accurate architecture#240

Merged
DevanshuNEU merged 33 commits into
OpenCodeIntel:mainfrom
DevanshuNEU:feature/docs-overhaul
Feb 15, 2026
Merged

feat(docs): Complete documentation overhaul with accurate architecture#240
DevanshuNEU merged 33 commits into
OpenCodeIntel:mainfrom
DevanshuNEU:feature/docs-overhaul

Conversation

@DevanshuNEU

@DevanshuNEU DevanshuNEU commented Feb 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Complete documentation system overhaul with accurate technical information, proper navigation, and contributor-friendly guides.

Changes

New Pages Created

  • Quick Start - 5-minute setup guide
  • MCP Tools Reference - All 7 MCP tools documented
  • MCP Examples - Real-world prompt examples by use case
  • Feature Pages - Semantic Search, Dependencies, Impact, Style Analysis
  • Deployment - Docker Setup, Self-Hosting (Railway, Fly.io, VPS)
  • API Reference - Overview, Repositories, Search, Analysis endpoints
  • Architecture - Complete tech stack, data flow, services breakdown
  • Contributing - Local setup, tests, code style, PR process

Fixes

  • All API endpoints now correctly show /api/v1/ prefix
  • Fixed Impact Analysis endpoint: POST with JSON body (not GET with query params)
  • Fixed Style Analysis endpoint: /style-analysis (not /style)
  • Removed broken sidebar links
  • Fixed pagination flow through all doc sections
  • Added scroll-to-top on page navigation

Code Quality

  • Updated CONTRIBUTING.md to require Bun (not npm)
  • Removed emojis from Makefile
  • Added CLAUDE.md with project conventions
  • All TypeScript compiles without errors

Commits

  • feat(docs): Phase 2 - Add QuickStart and Features pages
  • feat(docs): Phase 2 continued - MCP and Deployment pages
  • feat(docs): Phase 3 - Complete API Reference pages
  • fix: scroll to top on page navigation
  • fix: remove broken sidebar links
  • fix(docs): correct API endpoint URLs to /api/v1 prefix
  • feat(docs): add accurate Architecture and Contributing pages
  • fix: update CONTRIBUTING.md to use Bun instead of npm
  • fix(docs): correct pagination flow
  • fix: remove emojis from Makefile

Summary by CodeRabbit

  • New Features

    • Expanded docs UI: table-of-contents, breadcrumbs, callouts, badges, cards, code blocks/tabs, steppers, pagination, sidebar, command/search palette (Ctrl/Cmd+K), and many reusable docs components.
  • Documentation

    • Numerous new docs pages and guides (Quick Start, MCP Setup, MCP Tools, MCP Examples, Contributing, Architecture, API reference, feature and deployment guides).
  • Chores

    • Frontend now requires Bun for setup/build; README/CONTRIBUTING updated and new frontend dependencies added.
  • Style

    • Simplified Makefile status messages by removing emoji prefixes.

- Added Cmd+K search with cmdk
- Added Table of Contents with scroll spy
- Added breadcrumb navigation
- Added syntax highlighted code blocks with copy button and language tabs
- Added callout components (info, warning, tip, danger, success)
- Added step-by-step tutorial components
- Added prerequisites with collapsible
- Added time estimate and difficulty badges
- Added pagination (prev/next)
- Upgraded DocsSidebar with icons and search
- Upgraded DocsLayout with mobile support and TOC
- Redesigned DocsHomePage with professional look
- Rewrote MCPSetupPage using new components

New shadcn components:
- scroll-area
- collapsible
- command (cmdk)

Added dependencies:
- cmdk
- @radix-ui/react-scroll-area
- @radix-ui/react-collapsible
New pages:
- QuickStartPage: Hosted, Docker, and Manual setup options
- SemanticSearchPage: How semantic search works, usage, examples
- DependencyAnalysisPage: Graph visualization, reading the graph
- ImpactPredictionPage: Blast radius, risk levels, API response
- CodeStyleAnalysisPage: Naming conventions, patterns, use cases

Updated routing in App.tsx for all new pages
Removed AI-looking badges from page headers
New pages:
- MCPToolsPage: Complete reference for all 7 MCP tools with parameters
- MCPExamplesPage: Real-world prompt examples organized by use case
- DockerSetupPage: Docker Compose setup with env vars and commands
- SelfHostingPage: Railway, Fly.io, and VPS deployment guides

Updated routing in App.tsx for all new pages
New pages:
- APIOverviewPage: Base URL, authentication, error handling, rate limits
- APIRepositoriesPage: List, get, create, delete, reindex endpoints
- APISearchPage: Semantic search with parameters and examples
- APIAnalysisPage: Dependencies, impact, style, insights endpoints

All major documentation sections now complete:
- Getting Started (intro, quickstart)
- MCP Integration (setup, tools, examples)
- Features (search, dependencies, impact, style)
- Deployment (docker, self-hosting)
- API Reference (overview, repos, search, analysis)

Only placeholders remaining: Architecture, Contributing
- All API endpoints now correctly show /api/v1 prefix
- Fixed impact endpoint: POST not GET, takes JSON body not query params
- Fixed style endpoint: /style-analysis not /style
- Updated all curl examples with correct URLs
Architecture page includes:
- Complete tech stack breakdown (backend + frontend)
- Data flow diagrams for indexing and search pipelines
- Backend services documentation
- Frontend structure overview
- MCP server explanation
- Database schema overview
- Emphasis on Bun requirement for frontend

Contributing page includes:
- Prerequisites with accurate versions
- Local setup instructions (using Bun, not npm)
- Test commands
- Code style guidelines
- PR process
- Project structure reference
- Changed npm install to bun install
- Changed npm run build to bun run build
- Added explicit warning about using Bun exclusively
Navigation now flows correctly through all sections:
Getting Started → MCP → Features → Deployment → API Reference → Contributing
@vercel

vercel Bot commented Feb 15, 2026

Copy link
Copy Markdown

@DevanshuNEU is attempting to deploy a commit to the Dev's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Feb 15, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@DevanshuNEU has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 12 minutes and 57 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

Adds a comprehensive docs system and many docs-focused UI components to the frontend, expands routing for documentation pages, enforces Bun for frontend package management in docs and scripts, and introduces Radix/CmdK wrapper UI primitives plus related dependencies.

Changes

Cohort / File(s) Summary
Tooling & Docs
CONTRIBUTING.md, README.md, Makefile
Switches frontend install/build/dev commands from npmbun, adds explicit Bun install guidance/notes, and removes emoji status markers in Makefile messages.
Frontend deps
frontend/package.json
Adds @radix-ui/react-collapsible, @radix-ui/react-scroll-area, and cmdk to frontend dependencies.
App routing & navigation
frontend/src/App.tsx, frontend/src/components/ScrollToTop.tsx
Expands routing to many new docs pages and integrates ScrollToTop to reset scroll on navigation.
Docs layout & sidebar
frontend/src/components/docs/DocsLayout.tsx, frontend/src/components/docs/DocsSidebar.tsx, frontend/src/components/docs/DocsBreadcrumb.tsx, frontend/src/components/docs/DocsTableOfContents.tsx, frontend/src/components/docs/index.ts
Introduces responsive two-column docs layout, persistent sidebar with search/navigation, breadcrumb, TOC hook/component, and re-exports in the docs index.
Docs UI components
frontend/src/components/docs/* (e.g., DocsBadges.tsx, DocsCallout.tsx, DocsCards.tsx, DocsCodeBlock.tsx, DocsPageHeader.tsx, DocsPrerequisites.tsx, DocsRelated.tsx, DocsSearch.tsx, DocsSidebar.tsx, DocsStepList.tsx, DocsSteps.tsx)
Adds numerous reusable docs UI components: badges, difficulty/time badges, callouts, cards, code blocks/tabs with copy, prerequisites, learning objectives, related/pagination, stepper/horizontal steps, breadcrumb, TOC, and a keyboard-accessible command/search palette.
UI primitive wrappers
frontend/src/components/ui/* (collapsible.tsx, command.tsx, scroll-area.tsx)
Adds Radix/CmdK wrapper components and a command-palette API (CommandDialog, CommandInput, CommandList, etc.), Collapsible aliases, and ScrollArea/ScrollBar components.
Documentation pages
frontend/src/pages/... (e.g., ArchitecturePage.tsx, ContributingPage.tsx, QuickStartPage.tsx, MCP*, features/*, api/*, deployment/*, DocsHomePage.tsx)
Adds ~15+ new documentation pages composed from the new docs components (architecture, contributing, quickstart, MCP guides, features, API reference, deployment guides, etc.).
Barrels / re-exports
frontend/src/pages/api/index.ts, frontend/src/pages/deployment/index.ts, frontend/src/pages/features/index.ts
Adds barrel re-exports for newly added pages in api, deployment, and features folders.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant BrowserRouter
  participant DocsSearch
  participant DocsLayout
  participant DocsTableOfContents
  participant ScrollToTop

  User->>BrowserRouter: navigate or press Cmd/Ctrl+K
  BrowserRouter->>DocsSearch: open CommandDialog (search)
  DocsSearch->>BrowserRouter: navigate to selected doc href
  BrowserRouter->>DocsLayout: render selected docs page
  DocsLayout->>DocsTableOfContents: compute TOC via useTableOfContents
  BrowserRouter->>ScrollToTop: trigger scroll reset on route change
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 I hopped through routes and left a trail,
Docs and widgets sprouted without fail,
Bun in my paws, I stitched each page bright,
Command, sidebar, TOC — all set to invite,
Hop on — new docs await the light!

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.76% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly summarizes the primary change: a complete documentation system overhaul with improved architecture information and navigation.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

coderabbitai[bot]

This comment was marked as outdated.

Keep single source of truth in DocsRelated.tsx
…ayout

- Move useLocation and cn imports to top of file
- Add API Reference section to mobile navigation
- Add Contributing section (Architecture, Development Setup)
Use canonical TimeEstimate and DifficultyBadge from DocsBadges.
DocsPrerequisites already exists in DocsPrerequisites.tsx.
Add API Reference (Overview, Repositories, Search, Analysis) and
Contributing (Architecture, Development Setup) to search results
Prevents parent routes from highlighting on child pages
repo_id is taken from the URL path, not the body
Moved explanation to paragraph below for valid copy-paste JSON

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@CLAUDE.md`:
- Around line 36-40: The fenced code block containing the directory list (lines
starting with "backend/", "frontend/", "mcp-server/") is missing a language
identifier; update the opening fence (the triple backticks) to include a
language specifier such as plaintext (e.g., change ``` to ```plaintext) so the
block is lint-compliant and renders with proper highlighting.
- Around line 7-9: Update CLAUDE.md to remove or relax the overly restrictive
rules on lines 7-9: either delete the "Files must stay under 200 lines" rule or
change it to guidance (e.g., prefer smaller modules but allow exceptions) and
allow JSDoc blocks (or limit to public APIs), and add an enforcement policy for
exceptions; reference the large legitimate files (backend/routes/playground.py,
backend/services/dna_extractor.py,
frontend/src/components/DependencyGraph/index.tsx) and the JSDoc users
(frontend/src/services/playground-api.ts, frontend/src/config/api.ts,
frontend/src/hooks/useViewTransition.ts) so reviewers know these are approved
exceptions and update the doc text to state the new rule, the exception process,
and where JSDoc is allowed.
🧹 Nitpick comments (6)
frontend/src/components/docs/DocsPageHeader.tsx (1)

30-34: Falsy check on a numeric prop can hide the badge row when timeEstimate is 0.

Using timeEstimate || difficulty and timeEstimate && <…> means a value of 0 is treated as "not provided." While 0 minutes is unlikely in practice, using explicit != null checks is more defensive for numeric optional props.

Suggested diff
-      {(timeEstimate || difficulty) && (
+      {(timeEstimate != null || difficulty) && (
         <div className="flex items-center gap-3">
-          {timeEstimate && <TimeEstimate minutes={timeEstimate} />}
+          {timeEstimate != null && <TimeEstimate minutes={timeEstimate} />}
           {difficulty && <DifficultyBadge level={difficulty} />}
         </div>
       )}
frontend/src/components/docs/DocsSearch.tsx (1)

186-193: groupedPages recomputed on every render.

docsPages is a module-level constant, so the grouping result never changes. Consider memoizing or hoisting it to module scope alongside docsPages.

♻️ Suggested change
+// Group pages by category (static, computed once)
+const groupedPages = docsPages.reduce((acc, page) => {
+  if (!acc[page.category]) {
+    acc[page.category] = []
+  }
+  acc[page.category].push(page)
+  return acc
+}, {} as Record<string, DocPage[]>)
+
 export function DocsSearch() {
   const [open, setOpen] = useState(false)
   const navigate = useNavigate()
   ...
-  // Group pages by category
-  const groupedPages = docsPages.reduce((acc, page) => {
-    if (!acc[page.category]) {
-      acc[page.category] = []
-    }
-    acc[page.category].push(page)
-    return acc
-  }, {} as Record<string, DocPage[]>)
frontend/src/pages/api/APIRepositoriesPage.tsx (1)

171-224: Consider extracting EndpointHeader and ParamTable as shared docs components.

These helpers are defined locally here, but APIAnalysisPage.tsx (Lines 32–37, 82–87, 139–144, 178–183) duplicates the same endpoint badge markup inline. Extracting them into @/components/docs would eliminate duplication across all four API doc pages.

frontend/src/pages/api/APIAnalysisPage.tsx (2)

32-37: Endpoint badge markup is duplicated inline across all four sections.

APIRepositoriesPage.tsx already defines an EndpointHeader component for this exact pattern. These four inline instances should reuse it (or a shared version of it) to stay DRY.

Also applies to: 82-87, 139-144, 178-183


75-76: Gitleaks flags YOUR_API_KEY as a potential secret — false positive, but consider angle-bracket placeholders.

The static analysis tool flags the Authorization: Bearer YOUR_API_KEY strings. These are clearly documentation placeholders, not real secrets. Using <YOUR_API_KEY> (with angle brackets) is a common convention that makes the placeholder nature even more explicit and may suppress the Gitleaks warning.

Also applies to: 129-133, 219-220

frontend/src/components/docs/DocsSidebar.tsx (1)

30-78: Navigation data is defined in three separate places.

The same page list is maintained in:

  • DocsSidebar.tsx (navigation, Lines 30–78)
  • DocsSearch.tsx (docsPages, Lines 32–163)
  • DocsLayout.tsx (mobileNavigation, Lines 108–156)

Adding or renaming a page requires updating all three. Consider extracting a single docsNavigation data source (without icons/descriptions) and deriving each variant from it.

Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
- Changed 200-line limit from hard rule to guidance
- Added JSDoc policy section with approved files
- Added large file exceptions with specific approved files
- Added plaintext language to code fence
- Removed overly restrictive 'no JSDoc' rule
Falsy check would hide badge row when timeEstimate is 0
docsPages is constant, no need to recompute grouping on every render
…nings

Changed YOUR_API_KEY to <YOUR_API_KEY> across all API docs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@frontend/src/pages/api/APIAnalysisPage.tsx`:
- Around line 136-173: The Code Style section (the "Code Style" h2 and its
DocsCodeBlock) is missing a curl example like the other sections; add a curl
example block that shows a GET request to /api/v1/repos/{repo_id}/style-analysis
and a minimal curl command users can copy (e.g., curl -X GET
"https://…/api/v1/repos/{repo_id}/style-analysis" -H "Authorization: Bearer
<token>") placed immediately after the existing DocsCodeBlock for the Code Style
response so it matches the pattern used by Dependency Graph, Impact Analysis,
and Repository Insights.
🧹 Nitpick comments (3)
frontend/src/components/docs/DocsSearch.tsx (1)

203-205: Keyboard shortcut hint only shows ⌘K (Mac) — consider platform detection.

The listener correctly handles both metaKey (Mac) and ctrlKey (Windows/Linux), but the <kbd> element always renders the Mac symbol . Windows/Linux users won't recognise this as their shortcut.

Suggested platform-aware hint
+const isMac = typeof navigator !== 'undefined' && /Mac|iPod|iPhone|iPad/.test(navigator.platform)
+
 export function DocsSearch() {
   ...
         <kbd className="hidden sm:inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] font-medium text-gray-500 bg-white/5 border border-white/10 rounded">
-          <span className="text-xs">⌘</span>K
+          <span className="text-xs">{isMac ? '⌘' : 'Ctrl+'}</span>K
         </kbd>
frontend/src/pages/api/APIRepositoriesPage.tsx (1)

171-187: Consider extracting EndpointHeader for reuse across API doc pages.

APIAnalysisPage.tsx duplicates the endpoint-header markup inline (colored method badge + path in a bordered container) instead of reusing this component. Extracting EndpointHeader (and ParamTable) into a shared module (e.g., @/components/docs) would eliminate the duplication and keep styling consistent if it changes later.

frontend/src/pages/api/APIAnalysisPage.tsx (1)

32-37: Inline endpoint-header markup duplicates the EndpointHeader component from APIRepositoriesPage.

All four sections hand-roll the same colored-badge + path layout that APIRepositoriesPage already encapsulates in a reusable EndpointHeader component. This was noted in the other file as well — extracting it to a shared location would remove ~40 lines of duplication here.

Also applies to: 82-87, 139-144, 178-183

Comment thread frontend/src/pages/api/APIAnalysisPage.tsx
@vercel

vercel Bot commented Feb 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
opencodeintel Ignored Ignored Preview Feb 15, 2026 4:50pm

@DevanshuNEU

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Feb 15, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@DevanshuNEU

Copy link
Copy Markdown
Collaborator Author

@coderabbitai resolve

@coderabbitai

coderabbitai Bot commented Feb 15, 2026

Copy link
Copy Markdown
✅ Actions performed

Comments resolved. Auto-approval is disabled; enable reviews.request_changes_workflow to approve automatically.

@DevanshuNEU DevanshuNEU merged commit baa3703 into OpenCodeIntel:main Feb 15, 2026
7 checks passed
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