Skip to content

Commit 189b4d5

Browse files
authored
Merge pull request #588 from unoplat/docs-revamp
feat: add dark mode, search and make docs efficient
2 parents b089f30 + 1a48579 commit 189b4d5

File tree

20 files changed

+14804
-11273
lines changed

20 files changed

+14804
-11273
lines changed

.github/workflows/docs_deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
restore-keys: |
5252
${{ runner.os }}-website-
5353
54-
- run: yarn install --frozen-lockfile
54+
- run: yarn install --refresh-lockfile
5555
- run: yarn build
5656

5757
- name: Deploy

.github/workflows/docusaurus_build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
- name: Install dependencies
3232
working-directory: code-confluence
33-
run: yarn install --frozen-lockfile
33+
run: yarn install --refresh-lockfile
3434

3535
- name: Run tests
3636
working-directory: code-confluence

code-confluence/CLAUDE.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is the documentation website for Unoplat Code Confluence, built with Docusaurus 3.8.1. Code Confluence is a universal code context engine that extracts, understands, and provides precise code context across repositories using Tree-sitter and LLM pipelines. The site is configured in docs-only mode, meaning visitors land directly on the documentation rather than a separate homepage.
8+
9+
## Development Commands
10+
11+
```bash
12+
# Install dependencies
13+
yarn install
14+
15+
# Start development server (http://localhost:3000)
16+
yarn start
17+
18+
# Build for production
19+
yarn build
20+
21+
# Serve production build locally
22+
yarn serve
23+
24+
# Clear Docusaurus cache
25+
yarn clear
26+
```
27+
28+
## Architecture Overview
29+
30+
### Technology Stack
31+
- **Docusaurus 3.8.1** - Static site generator optimized for documentation
32+
- **React 18** - Component framework
33+
- **SWC Compiler** - Rust-based compiler for 20x faster builds (replaces Babel)
34+
- **MDX** - Markdown with JSX for rich content
35+
- **EmailJS** - Contact form integration
36+
- **@visx** - Data visualization components for technical diagrams
37+
38+
### Project Structure
39+
```
40+
docs/ # Documentation content (MDX files)
41+
├── quickstart/ # Getting started guides
42+
├── deep-dive/ # Technical architecture and vision
43+
├── contribution/ # Contributor guidelines
44+
└── unoplat-oss-atlas/ # OSS Atlas documentation
45+
46+
src/
47+
├── components/ # Custom React components
48+
├── css/ # Custom styling and themes
49+
└── pages/ # Custom pages (contact-us.js, index.js)
50+
51+
static/ # Static assets (images, icons, SVGs)
52+
```
53+
54+
### Key Features
55+
- **Docs-Only Mode** - Site serves documentation directly at root URL
56+
- **Dark Mode Support** - Toggle between light and dark themes with system preference detection
57+
- **Auto-generated Navigation** - File-system based sidebar generation
58+
- **Interactive SVG Diagrams** - Custom modal functionality for architecture diagrams
59+
- **Image Zoom Plugin** - Hover-to-zoom functionality for screenshots
60+
- **External Contact Link** - Contact Us navbar item links to main Unoplat site
61+
- **Mobile Responsive** - Fully responsive design
62+
- **SEO Optimized** - Proper meta tags and semantic HTML
63+
64+
## Content Management
65+
66+
### Adding Documentation
67+
- Create `.md` or `.mdx` files in appropriate `docs/` subdirectories
68+
- Use `_category_.json` files to configure sidebar sections
69+
- Follow existing naming conventions for consistency
70+
- Images should be placed in `static/` directory
71+
72+
### Custom Components
73+
- React components in `src/components/` can be used in MDX files
74+
- Follow existing patterns for styling with CSS modules
75+
- Use `@visx` components for data visualizations and technical diagrams
76+
77+
### Configuration Files
78+
- **`docusaurus.config.js`** - Main site configuration, theming, plugins, navbar/footer
79+
- **`sidebars.js`** - Navigation structure (currently using auto-generated mode)
80+
- **`package.json`** - Dependencies, scripts, and Node.js version requirements
81+
82+
## Relationship to Code Confluence Ecosystem
83+
84+
This documentation site is part of the larger Unoplat Code Confluence monorepo:
85+
86+
- **Backend Services** (`unoplat-code-confluence-ingestion`) - Python-based code parsing and ingestion
87+
- **Frontend Application** (`unoplat-code-confluence-frontend`) - React-based web interface
88+
- **Infrastructure** - Neo4j graph database, PostgreSQL, Temporal workflows
89+
- **This Documentation Site** - User guides, technical docs, and developer resources
90+
91+
The documentation covers the entire platform architecture, from quick 5-minute Docker setup to deep technical architecture explanations.
92+
93+
## Development Notes
94+
95+
### Performance Optimizations
96+
- Uses SWC compiler instead of Babel for significantly faster builds
97+
- Image optimization with WebP support
98+
- Automatic code splitting via Docusaurus
99+
100+
### Content Guidelines
101+
- Keep documentation focused on practical implementation
102+
- Use interactive diagrams for complex architecture explanations
103+
- Maintain consistent tone between technical depth and accessibility
104+
- Update `CHANGELOG.md` for significant documentation changes
105+
106+
### Environment Requirements
107+
- Node.js 18+ (specified in package.json engines)
108+
- Yarn package manager preferred over npm

code-confluence/docs/deep-dive/roadmap.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ description: "🗺️ Current roadmap and development status of Code Confluence"
77

88
import RoadmapSvg from '@site/static/img/roadmap.svg';
99

10-
<div style={{ marginBottom: "2rem" }}>
10+
<div style={{
11+
marginBottom: "2rem",
12+
backgroundColor: "var(--ifm-card-background-color)",
13+
padding: "1rem",
14+
borderRadius: "8px",
15+
boxShadow: "var(--ifm-global-shadow-lw)"
16+
}}>
1117
<RoadmapSvg
1218
title="Code Confluence Roadmap"
1319
style={{

code-confluence/docs/deep-dive/vision.mdx

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import VisionSvg from '@site/static/img/vision.svg';
99

1010
<div style={{
1111
marginBottom: "2rem",
12-
backgroundColor: "#ffffff",
12+
backgroundColor: "var(--ifm-card-background-color)",
1313
padding: "1rem",
1414
borderRadius: "8px",
15-
boxShadow: "0 2px 4px rgba(0,0,0,0.1)"
15+
boxShadow: "var(--ifm-global-shadow-lw)"
1616
}}>
1717
<VisionSvg
1818
title="Code Confluence Vision"
@@ -54,17 +54,7 @@ Unoplat Code Confluence aims to be the definitive solution for extracting, under
5454
- Scalable and reliable processing
5555
- Production-ready architecture
5656

57-
## 🔍 The OSS Atlas Initiative
58-
59-
Our OSS Atlas project is designed to dramatically accelerate contributor onboarding and productivity in open-source projects. We aim to:
60-
61-
### For Contributors
62-
- **Accelerate Onboarding**: Understand complex codebases in minutes instead of months
63-
- **Boost Contribution Velocity**: Make meaningful contributions faster with deep contextual insights
64-
- **Navigate Complex Systems**: Easily understand dependencies, patterns, and architectural decisions
65-
- **Learn Best Practices**: Study and adopt patterns from well-established open-source projects
66-
67-
### For Integration Partners
57+
## 🤝 For Integration Partners
6858

6959
Unoplat Code Confluence provides:
7060
- High-precision code context API powered by graph-based retrieval
@@ -78,9 +68,8 @@ We are committed to:
7868
1. Expanding language support beyond Python
7969
2. Enhancing our LLM pipelines for even better code understanding
8070
3. Building more integration points with popular development tools
81-
4. Growing our OSS Atlas initiative to support more open-source projects
82-
5. Developing advanced visualization and analysis capabilities
71+
4. Developing advanced visualization and analysis capabilities
8372

8473
Our vision is to make codebases more accessible, understandable, and maintainable for developers worldwide, whether they're working on small projects or enterprise-scale systems.
8574

86-
> Ready to get started? Check out our [Quick Start Guide](../quickstart/how-to-run) to begin your journey with Unoplat Code Confluence.
75+
> Ready to get started? Check out our [Quick Start Guide](/) to begin your journey with Unoplat Code Confluence.

code-confluence/docs/oss-atlas/_category_.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

code-confluence/docs/quickstart/how-to-run.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
sidebar_position: 2
3+
slug: /
34
---
45

56
# Quick Start Guide
@@ -14,7 +15,7 @@ While in alpha stage, it's best suited for developers and tech enthusiasts who e
1415
## Introduction
1516

1617
The current version supports parsing codebases and exporting a JSON representation of code graph. For more details, check out:
17-
- 📘 [**Vision »**](/docs/deep-dive/vision)
18+
- 📘 [**Vision »**](/deep-dive/vision)
1819

1920
## Prerequisites
2021

code-confluence/docs/unoplat-oss-atlas/_category_.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

code-confluence/docs/unoplat-oss-atlas/import-codebase.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

code-confluence/docusaurus.config.js

Lines changed: 74 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// See: https://docusaurus.io/docs/api/docusaurus-config
66

77
import {themes as prismThemes} from 'prism-react-renderer';
8-
import React from 'react';
98

109
/** @type {import('@docusaurus/types').Config} */
1110
const config = {
@@ -45,19 +44,82 @@ const config = {
4544
({
4645
docs: {
4746
sidebarPath: './sidebars.js',
48-
routeBasePath: 'docs',
47+
routeBasePath: '/', // Serve the docs at the site's root
4948
// Please change this to your repo.
5049
// Remove this to remove the "edit this page" links.
5150
editUrl:
5251
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
5352
},
53+
blog: false, // Disable the blog plugin
54+
pages: false, // Disable pages plugin to avoid conflicts
5455
theme: {
5556
customCss: './src/css/custom.css',
5657
},
5758
}),
5859
],
5960
],
6061

62+
themes: [
63+
[
64+
require.resolve("@easyops-cn/docusaurus-search-local"),
65+
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
66+
({
67+
// Index docs only (since we disabled blog and pages)
68+
indexDocs: true,
69+
indexBlog: false,
70+
indexPages: false,
71+
72+
// For docs-only mode, use "/" as route base path
73+
docsRouteBasePath: "/",
74+
75+
// Language support
76+
language: ["en"],
77+
78+
// Position search in middle of navbar
79+
searchBarPosition: "right",
80+
81+
// Enable keyboard shortcuts
82+
searchBarShortcut: true,
83+
searchBarShortcutHint: true,
84+
85+
// Highlight search terms on target page
86+
highlightSearchTermsOnTargetPage: true,
87+
88+
// Search result limits and context
89+
searchResultLimits: 8,
90+
searchResultContextMaxLength: 100,
91+
92+
// Performance optimizations
93+
hashed: true,
94+
95+
// Remove default stop words for programming docs
96+
removeDefaultStopWordFilter: ["en"],
97+
98+
// Exclude files from indexing to avoid errors
99+
ignoreFiles: [
100+
// Image files
101+
/.*\.(png|jpg|jpeg|gif|svg|ico|webp|bmp|tiff?)$/i,
102+
// Document files
103+
/.*\.(pdf|docx?|xlsx?|pptx?|odt|ods|odp)$/i,
104+
// Archive files
105+
/.*\.(zip|tar|gz|bz2|7z|rar)$/i,
106+
// Media files
107+
/.*\.(mp3|mp4|avi|mov|wmv|flv|mkv|webm|ogg|wav)$/i,
108+
// Font files
109+
/.*\.(woff2?|ttf|otf|eot)$/i,
110+
// Exclude entire static directory
111+
"static/**/*",
112+
// Exclude build artifacts
113+
"build/**/*",
114+
".docusaurus/**/*",
115+
// Exclude yarn files
116+
".yarn/**/*",
117+
".pnp.*",
118+
],
119+
}),
120+
],
121+
],
122+
61123
themeConfig:
62124
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
63125
({
@@ -68,6 +130,7 @@ const config = {
68130
logo: {
69131
alt: 'Code Confluence',
70132
src: 'img/Unoplat_Logo.svg',
133+
srcDark: 'img/Unoplat_Logo.svg', // Using same logo for dark mode
71134
},
72135
items: [
73136
{
@@ -76,15 +139,15 @@ const config = {
76139
position: 'left',
77140
label: 'Documentation',
78141
},
79-
80142
{
81-
type: 'docSidebar',
82-
sidebarId: 'tutorialSidebar',
83-
position: 'left',
143+
type: 'search',
144+
position: 'right',
145+
},
146+
{
84147
label: 'Contact Us',
85-
href: '/contact-us',
148+
href: 'https://www.unoplat.io/contact/',
149+
position: 'left',
86150
},
87-
88151
],
89152
},
90153
// algolia: {
@@ -147,7 +210,8 @@ const config = {
147210
},
148211
colorMode: {
149212
defaultMode: 'light',
150-
disableSwitch: true,
213+
disableSwitch: false,
214+
respectPrefersColorScheme: true,
151215
},
152216
zoom: {
153217
selector: '.zoomable',
@@ -163,11 +227,8 @@ const config = {
163227
stylesheets: [
164228
'/src/css/custom.css',
165229
],
166-
plugins: [
167-
'docusaurus-plugin-image-zoom'
168-
],
169230
webpack: {
170-
jsLoader: (isServer) => ({
231+
jsLoader: () => ({
171232
loader: require.resolve('swc-loader'),
172233
options: {
173234
jsc: {

0 commit comments

Comments
 (0)