A modern, web-based recreation of the classic Visual Basic 6 IDE built with React, TypeScript, and Vite. Experience the nostalgia of VB6 development with modern web technologies.
- Drag & Drop Canvas: Intuitive visual form designer with 35+ VB6 controls
- Advanced Layout Tools: Multi-select, alignment, distribution, and snap-to-grid
- Zoom Support: 25% to 400% zoom levels with grid alignment
- Undo/Redo: Full history tracking for all design operations
- Control Tree: Hierarchical view of all form controls
- Monaco Editor Integration: VS Code's powerful editor with lazy loading
- VB6 Syntax Highlighting: Complete VB6 language support
- IntelliSense: Auto-completion for VB6 keywords and functions
- Code Snippets: Built-in snippets for common VB6 patterns
- Event Handlers: Direct editing of control event procedures
- Lexer: Full VB6 tokenization
- Parser: AST generation for VB6 code
- Semantic Analyzer: Type checking and validation
- Transpiler: VB6 to JavaScript conversion
- Runtime: VB6 function implementations (MsgBox, InputBox, etc.)
- Project Explorer: Manage forms and modules
- Properties Window: Edit control properties in real-time
- Immediate Window: Interactive REPL for VB6 code
- Error List: Track syntax and runtime errors
- Code Analyzer: Static analysis and suggestions
- Refactoring Tools: Rename, extract, and reorganize code
- Breakpoint Manager: Visual debugging support
- Performance Monitor: Track IDE and runtime performance
General Controls: CommandButton, Label, TextBox, Frame, CheckBox, OptionButton, ComboBox, ListBox, HScrollBar, VScrollBar, Timer, DriveListBox, DirListBox, FileListBox, Shape, Line, Image, Data, OLE
ActiveX Controls: PictureBox, ImageList, Toolbar, StatusBar, ProgressBar, TreeView, ListView, TabStrip, Slider, ImageCombo, Animation, UpDown, MonthView, DateTimePicker, FlatScrollBar, CoolBar, RichTextBox
- Node.js 20.18.0 or higher (use
.nvmrcfor version management) - npm or yarn package manager
-
Clone the repository
git clone https://github.com/phuetz/VB6.git cd VB6 -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local # Edit .env.local with your configuration -
Start development server
npm run dev
The application will be available at
http://localhost:5173
| Script | Description |
|---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Build for production with optimizations |
npm run preview |
Preview production build locally |
npm test |
Run tests in watch mode |
npm run test:ui |
Open interactive test UI |
npm run test:coverage |
Generate test coverage report |
npm run lint |
Check code quality with ESLint |
npm run format |
Format code with Prettier |
npm run format:check |
Check code formatting |
- Framework: React 18.3.1
- Language: TypeScript 5.5.3
- Build Tool: Vite 5.4.2
- State Management: Zustand 5.0.6
- Styling: Tailwind CSS 3.4.1
- Code Editor: Monaco Editor 0.45.0
- Drag & Drop: @dnd-kit/core 6.3.1
- Testing: Vitest 1.6.1 with React Testing Library
- Linting: ESLint 9.9.1 with TypeScript ESLint
- Formatting: Prettier with EditorConfig
VB6/
โโโ .github/workflows/ # CI/CD pipelines
โโโ .husky/ # Git hooks
โโโ docs/ # Documentation (French)
โโโ src/
โ โโโ components/ # React components
โ โ โโโ Designer/ # Form designer
โ โ โโโ Editor/ # Code editor
โ โ โโโ Layout/ # Menu, toolbar, status bar
โ โ โโโ Panels/ # Toolbox, properties, explorer
โ โ โโโ ...
โ โโโ context/ # React context providers
โ โโโ stores/ # Zustand state management
โ โโโ services/ # Compiler, debugger, file manager
โ โโโ utils/ # Lexer, parser, transpiler, logger
โ โโโ hooks/ # Custom React hooks
โ โโโ types/ # TypeScript type definitions
โ โโโ test/ # Test suites
โโโ vite.config.ts # Vite configuration with optimizations
โโโ vitest.config.ts # Test configuration with coverage
โโโ package.json # Dependencies and scripts
Run the test suite:
npm testGenerate coverage report:
npm run test:coverageView interactive test UI:
npm run test:uiCoverage reports are generated in ./coverage/ directory.
This project uses multiple tools to ensure code quality:
- ESLint: Static code analysis
- Prettier: Code formatting
- TypeScript: Type safety
- Husky: Git hooks
- lint-staged: Pre-commit linting
Pre-commit hooks automatically run linting and formatting on staged files.
- Monaco Editor is lazy-loaded to reduce initial bundle size
- Manual chunk splitting for better caching
- Vendor bundles separated by dependency
- Automatic tracking of Core Web Vitals (CLS, FID, FCP, LCP, TTFB, INP)
- Performance metrics stored in localStorage for debugging
- Development console logging with performance ratings
After building, view bundle stats:
npm run build
# Open dist/stats.html in your browserCreate a .env.local file based on .env.example:
# Feature Flags
VITE_ENABLE_ANALYTICS=false
VITE_ENABLE_ERROR_TRACKING=false
VITE_ENABLE_WEB_VITALS=true
# Debug Settings
VITE_DEBUG_MODE=false
VITE_LOG_LEVEL=infoAutomatic deployment is configured via GitHub Actions. Push to main branch to trigger deployment.
npm run build
# Deploy the dist/ directory to your hosting provider- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the EditorConfig settings
- Ensure tests pass before committing
- Lint and format your code
- Write meaningful commit messages
Additional documentation is available in the docs/ directory:
- Form Designer Guide
- French Documentation (Various guides in French)
- Some VB6 features are not fully implemented (see transpiler limitations)
- Monaco Editor bundle is large (~10MB) - lazy loading helps but initial load on code editor is slow
- npm audit shows some moderate vulnerabilities in dev dependencies
This project is licensed under the MIT License - see the LICENSE file for details.
- Monaco Editor team for the excellent code editor
- Visual Basic 6 for the inspiration
- React and Vite communities for amazing tools
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with โค๏ธ using React and TypeScript