A modern, browser-based code editor built with React 19, TypeScript, CodeMirror 6, Tailwind CSS 4, and Radix UI. VS Code-inspired interface that runs entirely in your browser.
- Multi-file editing with tabbed interface and dirty state tracking
- Hierarchical file tree with create, rename, and delete operations
- Syntax highlighting for JavaScript, TypeScript, HTML, CSS, JSON, Markdown, Python, Rust, Go
- Resizable panels that persist layout preferences
- AI chat assistant for code help and explanations
- Project dashboard with search, filters, and quick actions
- Theme support — Light, Dark, and System preference
- Persistent storage using IndexedDB (offline-first)
- Customizable settings — Font, tab size, line numbers, word wrap, auto-save
| Technology | Purpose |
|---|---|
| React 19 | UI framework with concurrent rendering |
| TypeScript 5.9 | Type safety |
| Vite 7.2 | Build tool and dev server |
| CodeMirror 6 | Code editor engine |
| Tailwind CSS 4 | Utility-first styling |
| Radix UI | Accessible UI primitives |
| react-resizable-panels | Draggable panel layout |
| IndexedDB | Local persistence |
| Tabler Icons + Lucide | Icon sets |
- Node.js 18+
- npm or yarn
git clone https://github.com/<!-- TODO: username -->/code-editor-x.git
cd code-editor-x
npm installnpm run devnpm run build # Type-check and build for production
npm run preview # Preview production buildnpm run lint # Run ESLint
npm run lint:fix # Fix linting issues
npm run format # Format with Prettiersrc/
├── components/
│ ├── layout/ # EditorShell (main IDE layout)
│ ├── dashboard-page/ # Project listing and management
│ ├── editor-page/ # Editor-specific components
│ │ ├── ai-chat-panel/ # AI assistant chat interface
│ │ ├── bottom-panel/ # Terminal/output tabs
│ │ ├── editor-panel/ # CodeMirror editor + tabs + status bar
│ │ ├── file-tree/ # Collapsible file/folder tree
│ │ ├── header/ # Top header bar
│ │ └── sidebar/ # Left sidebar with widgets
│ ├── settings-page/ # Settings UI
│ └── ui/ # Shared UI primitives
├── lib/
│ ├── theme-provider.tsx # Theme context (light/dark/system)
│ ├── settings-provider.tsx # Editor settings context
│ ├── project-provider.tsx # Project and file management
│ ├── storage/ # IndexedDB persistence layer
│ └── utils.ts # Utility functions
├── types/
│ └── index.ts # TypeScript definitions
└── App.tsx # Routes and providers
The editor uses react-resizable-panels for a VS Code-like layout:
- Header — Project name, search, command palette
- Left Sidebar — File tree and widget navigation (collapsible)
- Center — Tabs, breadcrumbs, CodeMirror editor, status bar
- Bottom Panel — Output, terminal, problems (collapsible)
- Right Panel — AI chat (collapsible)
Three React Context providers:
- ThemeProvider — Light/dark/system theme with localStorage persistence
- SettingsProvider — Editor settings (font, tabs, auto-save, etc.)
- ProjectProvider — Projects, files, and file tree operations
All data persists locally in IndexedDB. No backend required.
| Setting | Options |
|---|---|
| Theme | Light, Dark, System |
| Font Family | 5 options (monospace fonts) |
| Font Size | 10-24px |
| Tab Size | 2, 4, 8 spaces |
| Line Numbers | On/Off |
| Word Wrap | On/Off |
| Minimap | On/Off |
| Auto-save | On/Off with delay (500ms - 5s) |
- Add to
FileLanguageunion insrc/types/index.ts - Import extension from
@codemirror/lang-* - Add case in
getLanguageExtension()ineditor-panel.tsx
| Command | Description |
|---|---|
npm run dev |
Start dev server |
npm run build |
Type-check + production build |
npm run preview |
Preview production build |
npm run lint |
Run ESLint |
npm run lint:fix |
Fix linting issues |
npm run format |
Format with Prettier |
MIT
