Architecture
Overview
┌─────────────────────────────────────────────────────┐
│ CLI (@flpstudio/lgtm) │
│ │
│ git diff → AI grouping (GPT) → deep analysis │
│ ↓ ↓ ↓ │
│ raw diff review groups bug flags + notes │
│ ↓ │
│ Express server (:3456) │
│ ↓ │
│ React review UI (Vite) │
│ ↓ │
│ Chat (Claude) + code edits │
└─────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────┐
│ Workspace (Tauri desktop app) │
│ │
│ Rust backend: repo management, process spawning │
│ React frontend: repo list, branch selection, UI │
│ Spawns CLI review servers per-repo │
└─────────────────────────────────────────────────────┘ Project structure
/ Root package (@flpstudio/lgtm)
├── src/ CLI source (TypeScript)
│ ├── server/ Express review server
│ └── ... Diff, grouping, analysis logic
├── workspace/ Tauri desktop app
│ ├── src/ React frontend
│ │ ├── App.tsx Main app shell
│ │ ├── features/ Feature-specific components
│ │ └── components/ Shared UI components
│ └── src-tauri/ Rust backend
├── docs/ This documentation site
└── scripts/ Build and release scripts AI pipeline
- Diff extraction —
git diff base...HEADproduces the raw diff - Grouping — GPT organizes files into logical review groups based on semantic relationships
- Deep analysis — parallel agents (quality, architecture, custom) analyze each group
- Serving — results are served via a local Express server with a React frontend
- Chat — Claude handles interactive Q&A with full diff context
Technologies
| Component | Technology |
|---|---|
| CLI | TypeScript, Express, Vite |
| AI (grouping/analysis) | OpenAI GPT |
| AI (chat) | Anthropic Claude |
| Desktop app | Tauri v2 (Rust + React) |
| Diff rendering | Custom diff viewer with syntax highlighting |
| Persistence | localStorage (chat), filesystem (reviews) |
Release process
Releases are managed by release-please:
- Use Conventional Commits for all commit messages
- On push to
main, release-please opens/updates a release PR - Merging the release PR creates a git tag
- The tag triggers the build + publish workflow
Version is tracked in package.json (source of truth) and synced to workspace/package.json and workspace/src-tauri/tauri.conf.json.