A web-based visual git diff tool for reviewing code changes between commits, branches, and tags
npm install @nerdo/code-reviewerA modern, web-based visual git diff tool for reviewing code changes between commits, branches, and tags.
- š Universal Search: Search commits by hash, message, author, or date
- š
Smart Date Filtering: Quick presets (Today, Last 7 days, etc.) or custom ranges
- š² Branch & Tag Support: Compare any combination of branches, tags, and commits
- š File Browser: Navigate through changed files with syntax highlighting
- šļø Multiple Views: Side-by-side, inline, or unchanged file views
- šÆ Intelligent Highlighting: Visual indicators for additions, deletions, and changes
- ā” Fast & Responsive: Built with React and optimized for performance
Run directly in any git repository:
``bash`
npx @nerdo/code-reviewer
`bash`
npm install -g @nerdo/code-reviewer
code-reviewer
`bash
npx @nerdo/code-reviewer [options]
Options:
-p, --port
-h, --help Show help message
--version Show version
Examples:
npx @nerdo/code-reviewer
npx @nerdo/code-reviewer --port 8080
`
1. Navigate to a git repository in your terminal
2. Run the command: npx @nerdo/code-reviewer
3. Your browser opens automatically to the code review interface
4. Select what to compare:
- Choose FROM: branch, tag, or commit
- Choose TO: branch, tag, or commit
- Apply date filters if needed
5. Review the changes:
- Browse files in the left sidebar
- View diffs in side-by-side or inline mode
- Use universal search to find specific commits
- Node.js: Version 16 or higher
- Git: Must be run from within a git repository
- Browser: Modern browser with JavaScript enabled
- npm run dev - Start both client and server in development modenpm run test
- - Run the test suitenpm run test:watch
- - Run tests in watch modenpm run lint
- - Run ESLintnpm run typecheck
- - Run TypeScript type checkingnpm run build
- - Build the production bundle
``
src/
āāā components/ # React components
ā āāā ui/ # shadcn/ui components
ā āāā FileBrowser.tsx # File tree navigation
ā āāā DiffViewer.tsx # Diff display component
āāā domain/ # Core business logic
ā āāā entities/ # Domain entities
ā āāā repositories/ # Repository interfaces
ā āāā services/ # Domain services
āāā infrastructure/ # External integrations
ā āāā git/ # Git repository implementations
āāā server/ # Express.js API
ā āāā routes/ # API endpoints
āāā services/ # Frontend API client
The project includes comprehensive tests for:
- Domain services (DiffService, FileTreeService)
- React components (FileBrowser, DiffViewer)
- Git repository implementations
- Core entities and business logic
Run tests with:
`bash``
npm test
- Frontend: React, TypeScript, Tailwind CSS, shadcn/ui
- Backend: Node.js, Express.js, TypeScript
- Git Integration: simple-git
- Testing: Jest, React Testing Library
- Build Tools: Vite, TypeScript compiler
- Linting: ESLint
MIT License