Skip to content

Commit 1fc8eed

Browse files
committed
First commit
1 parent 7770d43 commit 1fc8eed

141 files changed

Lines changed: 29945 additions & 5 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup pnpm
21+
uses: pnpm/action-setup@v2
22+
with:
23+
version: 8
24+
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: 'pnpm'
30+
31+
- name: Install dependencies
32+
run: pnpm install
33+
34+
- name: Run linter
35+
run: pnpm run lint
36+
37+
- name: Check types
38+
run: pnpm run check-types
39+
40+
- name: Run tests
41+
run: xvfb-run -a pnpm run test
42+
43+
- name: Build extension
44+
run: pnpm run package

.gitignore

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ src-tauri/target/
1616
src-tauri/WixTools/
1717
src-tauri/Cargo.lock
1818

19+
# Rust/Cargo
20+
target/
21+
Cargo.lock
22+
**/*.rs.bk
23+
*.pdb
24+
1925
# IDE
2026
.vscode/*
2127
!.vscode/extensions.json
@@ -27,12 +33,11 @@ src-tauri/Cargo.lock
2733
*.swo
2834
*~
2935
.fleet/
30-
CLAUDE.md
3136
# System
3237
.DS_Store
3338
Thumbs.db
3439
desktop.ini
35-
40+
CLAUDE.md
3641
# Environment
3742
.env
3843
.env.local
@@ -63,9 +68,14 @@ temp/
6368
*.pdb
6469
debug/
6570

66-
# Rust
67-
**/*.rs.bk
68-
*.pdb
71+
# Archive files
72+
*.tar.gz
73+
*.zip
74+
*.tar
75+
*.gz
76+
77+
# Debug files
78+
debug-*.rs
6979

7080
# Neo4j
7181
neo4j/data/

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
enable-pre-post-scripts = true

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
3+
}

.vscode/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"rust-analyzer.linkedProjects": [
3+
"./Cargo.toml"
4+
],
5+
"rust-analyzer.cargo.target": null,
6+
"rust-analyzer.check.command": "check",
7+
"rust-analyzer.diagnostics.enable": true,
8+
"rust-analyzer.inlayHints.enable": true,
9+
"rust-analyzer.procMacro.enable": true,
10+
"rust-analyzer.cargo.features": "all",
11+
"rust-analyzer.server.extraEnv": {
12+
"RUSTUP_TOOLCHAIN": "stable-x86_64-unknown-linux-gnu"
13+
},
14+
"rust-analyzer.checkOnSave": false
15+
}

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Change Log
2+
3+
All notable changes to the "omnigraph" extension will be documented in this file.
4+
5+
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
6+
7+
## [Unreleased]
8+
9+
- Initial release

Cargo.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[workspace]
2+
members = [
3+
"src-tauri",
4+
"crates/og-types",
5+
"crates/og-parser",
6+
"crates/og-graph",
7+
"crates/og-db",
8+
"crates/og-analytics",
9+
"crates/og-services",
10+
"crates/og-utils"
11+
]
12+
resolver = "2"
13+
14+
[workspace.dependencies]
15+
tokio = { version = "1", features = ["full"] }
16+
serde = { version = "1", features = ["derive"] }
17+
serde_json = "1"
18+
thiserror = "1"
19+
anyhow = "1"
20+
tracing = "0.1"
21+
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
22+
neo4rs = "0.7"
23+
rayon = "1.8"
24+
dashmap = "5"
25+
indexmap = "2"
26+
tree-sitter = "0.20"
27+
tree-sitter-javascript = "0.20"
28+
tree-sitter-typescript = "0.20"
29+
tree-sitter-python = "0.20"
30+
tree-sitter-c = "0.20"

README.md

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
# Omnigraph: 3D Codebase Visualization
2+
3+
A powerful desktop application for visualizing code dependencies and relationships as interactive 3D force-directed graphs. Built with Rust, Tauri, and Three.js to escape the limitations of VS Code's restrictive webview environment.
4+
5+
![Status](https://img.shields.io/badge/status-alpha-orange)
6+
![Platform](https://img.shields.io/badge/platform-linux%20%7C%20macos%20%7C%20windows-blue)
7+
![License](https://img.shields.io/badge/license-MIT-green)
8+
9+
## 🚀 Overview
10+
11+
Omnigraph transforms your codebase into an interactive 3D visualization, helping you understand complex dependencies, identify architectural patterns, and navigate large projects with ease. Originally conceived as a VS Code extension, it has evolved into a standalone desktop application powered by Rust and Tauri for maximum performance and freedom.
12+
13+
## ✨ Features
14+
15+
- **🎨 Interactive 3D Visualization**: Navigate your codebase in a beautiful force-directed 3D graph
16+
- **⚡ Rust-Powered Parsing**: Lightning-fast AST parsing with tree-sitter for JavaScript, TypeScript, and Python
17+
- **📊 Real-time Progress**: Visual feedback during parsing with percentage completion
18+
- **🔍 Smart Filtering**: Automatically handles unresolved imports and external dependencies
19+
- **📐 Responsive Canvas**: Automatic resizing and optimal rendering on any screen size
20+
- **🔄 Hot Reset**: Quick reset functionality for testing and debugging
21+
- **🎯 Node Details**: Click nodes to see file paths, metrics, and relationships
22+
23+
## 📦 Installation
24+
25+
### Prerequisites
26+
27+
- [Node.js](https://nodejs.org/) (v16 or higher)
28+
- [pnpm](https://pnpm.io/) (recommended) or npm
29+
- [Rust](https://rustup.rs/) (latest stable)
30+
- [Tauri Prerequisites](https://tauri.app/v1/guides/getting-started/prerequisites)
31+
32+
### Quick Start
33+
34+
```bash
35+
# Clone the repository
36+
git clone https://github.com/yourusername/omnigraph.git
37+
cd omnigraph
38+
39+
# Install dependencies
40+
pnpm install
41+
42+
# Run in development mode
43+
pnpm tauri:dev
44+
45+
# Build for production
46+
pnpm tauri:build
47+
```
48+
49+
### Linux/Wayland Users
50+
51+
If you're using Wayland (especially with Hyprland), the app includes compatibility flags in the `pnpm tauri:dev` command. These are automatically applied.
52+
53+
## 🎮 Usage
54+
55+
1. **Launch the Application**: Run `pnpm tauri:dev` or use the built executable
56+
2. **Parse a Codebase**: Click "📁 Parse Codebase" and select your project directory
57+
3. **Generate Graph**: Click "🎨 Generate Graph" to visualize the parsed data
58+
4. **Explore**:
59+
- Rotate: Left-click and drag
60+
- Zoom: Scroll wheel
61+
- Pan: Right-click and drag
62+
- Node Info: Click on any node to focus
63+
5. **Reset**: Click "🗑️ Reset App" to clear and start fresh
64+
65+
## 🏗️ Architecture
66+
67+
### Technology Stack
68+
69+
- **Backend**: Rust with Tauri framework
70+
- **Parser**: Tree-sitter for language-agnostic AST parsing
71+
- **Graph Engine**: Petgraph for graph algorithms
72+
- **Frontend**: TypeScript with Three.js
73+
- **3D Rendering**: 3d-force-graph for WebGL visualization
74+
- **Build System**: Vite for frontend, Cargo for Rust
75+
76+
### Supported Languages
77+
78+
- ✅ JavaScript (.js, .jsx)
79+
- ✅ TypeScript (.ts, .tsx)
80+
- ✅ Python (.py)
81+
- 🔜 Rust (.rs) - Coming soon
82+
- 🔜 Go (.go) - Planned
83+
- 🔜 Java (.java) - Planned
84+
85+
## 🛠️ Development
86+
87+
### Project Structure
88+
89+
```
90+
omnigraph/
91+
├── src-tauri/ # Rust backend
92+
│ ├── src/
93+
│ │ ├── engine/ # Core parsing and graph engine
94+
│ │ └── lib.rs # Tauri commands
95+
│ └── Cargo.toml
96+
├── src/ # Frontend
97+
│ ├── main.ts # Application entry
98+
│ └── visualization/ # 3D graph components
99+
├── package.json
100+
└── README.md
101+
```
102+
103+
### Key Commands
104+
105+
```bash
106+
# Development
107+
pnpm tauri:dev # Run with hot-reload
108+
pnpm test # Run tests
109+
pnpm lint # Lint code
110+
111+
# Building
112+
cargo tauri build # Production build
113+
cargo tauri build --debug # Debug build
114+
115+
# Platform-specific builds
116+
cargo tauri build --target x86_64-pc-windows-msvc # Windows
117+
cargo tauri build --target x86_64-apple-darwin # macOS Intel
118+
cargo tauri build --target aarch64-apple-darwin # macOS M1/M2
119+
cargo tauri build --target x86_64-unknown-linux-gnu # Linux
120+
```
121+
122+
### Adding Language Support
123+
124+
1. Add tree-sitter grammar to `Cargo.toml`
125+
2. Create parser module in `src-tauri/src/engine/parser/`
126+
3. Implement the `Parser` trait
127+
4. Register in `ParserManager`
128+
129+
See `CLAUDE.md` for detailed development guidelines.
130+
131+
## 🚧 Roadmap
132+
133+
### Current Status: Alpha
134+
135+
- [x] Core Rust parsing engine
136+
- [x] Tree-sitter integration
137+
- [x] 3D force-directed graph
138+
- [x] Progress indicators
139+
- [x] Reset functionality
140+
- [x] Responsive canvas
141+
142+
### Next Up
143+
144+
- [ ] Import path resolution
145+
- [ ] Neo4j integration for persistence
146+
- [ ] Graph state save/load
147+
- [ ] VS Code extension wrapper
148+
- [ ] More language parsers
149+
- [ ] Graph analytics (PageRank, centrality)
150+
- [ ] Export to various formats (JSON, GraphML)
151+
152+
### Future Vision
153+
154+
- [ ] AI-powered code insights
155+
- [ ] Team collaboration features
156+
- [ ] Git history visualization
157+
- [ ] Performance profiling overlay
158+
- [ ] Custom graph layouts
159+
- [ ] Plugin system
160+
161+
## 🐛 Known Issues
162+
163+
- Import statements to external packages create orphaned edges (filtered out)
164+
- Large codebases (>10,000 files) may take time to parse
165+
- Wayland requires X11 compatibility mode (handled automatically)
166+
167+
See `TODO.md` for complete issue tracking.
168+
169+
## 🤝 Contributing
170+
171+
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
172+
173+
1. Fork the repository
174+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
175+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
176+
4. Push to the branch (`git push origin feature/AmazingFeature`)
177+
5. Open a Pull Request
178+
179+
## 📄 License
180+
181+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
182+
183+
## 🙏 Acknowledgments
184+
185+
- [Tauri](https://tauri.app/) - For the amazing desktop framework
186+
- [Tree-sitter](https://tree-sitter.github.io/) - For robust language parsing
187+
- [Three.js](https://threejs.org/) - For 3D graphics
188+
- [3d-force-graph](https://github.com/vasturiano/3d-force-graph) - For the force-directed layout
189+
190+
## 📬 Contact
191+
192+
Project Link: [https://github.com/yourusername/omnigraph](https://github.com/yourusername/omnigraph)
193+
194+
---
195+
196+
**Built with ❤️ to escape the tyranny of VS Code's CSP restrictions**

0 commit comments

Comments
 (0)