Skip to content

Repository files navigation

Comparitor

Comparitor is a retro-styled code diff and analysis workspace. Paste two versions of code side-by-side, get instant visual diffs, automatic bug detection, and an AI-grade code review — all in the browser.

🔗 Live demo:shianmike.github.io/comparitor


Features

  • Side-by-side diff viewer — Monaco Editor panels with line-level diff highlighting and inline change tooltips
  • Character-level diffing — powered by the diff library for granular added/removed/modified callouts
  • Static code analysis — detects undefined variables, mismatched brackets, unused symbols, missing returns, and risky patterns across JS/TS and Python
  • Code review summary — structured findings grouped by severity (errors, warnings, suggestions) with suggested fixes
  • File upload — drag-drop or browse to load any text file into either panel
  • RetroUI design — custom pixel-border card system, badges, and tab components

Tech Stack

LayerLibrary
FrameworkReact 19 + TypeScript
BuildVite
EditorMonaco Editor (@monaco-editor/react)
Diffdiff (jsdiff)
StylingTailwind CSS
IconsLucide React

Getting Started

npm install
npm run dev

Open http://localhost:5173.

Build

npm run build

Output is written to dist/.

Project Structure

src/
App.tsx # Main layout and editor panels
types.ts # Shared TypeScript types
lib/
codeAnalysis.ts # Static analysis engine
utils.ts # Class name helper
components/retroui/ # Retro-styled UI primitives
Badge.tsx
Button.tsx
Card.tsx
Tabs.tsx

License

MIT

About

A browser-based code comparison and review platform that visualizes line- and character-level changes, detects potential issues through static analysis, and generates structured code-quality insights.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages