- Node.js 18+
- npm or yarn
- Git
- Local LLM (Ollama recommended)
# Clone repository
git clone <repository-url>
cd ide-app
# Install dependencies
npm install
# Install Electron
npm install --save-dev electron
# Install UI dependencies
npm install react react-dom typescript
npm install --save-dev @types/react @types/react-dom
npm install monaco-editor
npm install tailwindcss- Initialize React app with TypeScript
- Set up Electron configuration
- Create basic layout components
Create src/services/fileSystem.ts:
- Implement recursive directory scanning
- Build tree data structure
- Handle file system events
- Provide file metadata
Create React components:
FileExplorer.tsx- Main containerFileTree.tsx- Tree view logicFileNode.tsx- Individual file/directory node
- Connect file system service to React components
- Implement click handlers
- Add file type icons
- Test with various folder structures
- Install Monaco Editor
- Configure TypeScript support
- Set up basic editor instance
Create tab system:
Editor.tsx- Main editor containerTabBar.tsx- Tab navigationMonacoEditor.tsx- Monaco wrapper
- Load file content when selected
- Detect file language
- Handle file changes
- Implement tab switching
- Syntax highlighting
- Basic editing features
- File saving
- Multiple file support
ChatPanel.tsx- Main chat containerMessageList.tsx- Message displayInputArea.tsx- User input
Create src/services/llmInterface.ts:
- Local LLM connection
- API endpoint handlers
- Request/response formatting
- Error handling
- Connect chat UI to backend
- Implement message sending
- Handle responses
- Add typing indicators
- Code analysis requests
- File editing commands
- Context awareness
- Response formatting
Create src/services/fileManager.ts:
- Temporary folder management
- File comparison logic
- Change preview
- Approval workflow
- Read file content
- Write to temporary location
- Compare changes
- Apply approved changes
- Change preview modal
- Approval buttons
- Conflict resolution
- Backup management
- Backup creation
- Rollback functionality
- Permission checks
- Error recovery
Create src/services/taskQueue.ts:
- Task data structure
- Queue management
- Priority handling
- Status tracking
- Sequential task execution
- Multi-file operations
- Progress tracking
- Error handling
- LLM batch processing
- File system operations
- Task scheduling
- Resource management
- Task progress display
- Queue status
- Cancel/pause functionality
- Error notifications
Create electron.js:
- Window management
- Menu setup
- File dialogs
- IPC communication
Create src/App.tsx:
- Three-panel layout
- Responsive design
- Component integration
- State management
- Event system
- State sharing
- Data flow
- Error propagation
- Menu integration
- Keyboard shortcuts
- Settings management
- Theme support
- Keep components focused
- Separate business logic
- Use TypeScript strictly
- Follow React patterns
- Use React.memo appropriately
- Implement lazy loading
- Optimize re-renders
- Manage memory carefully
- Implement try-catch blocks
- User-friendly error messages
- Graceful degradation
- Logging for debugging
- Write unit tests for services
- Test component rendering
- Mock external dependencies
- Test error scenarios
# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh
# Pull coding model
ollama pull qwen2.5-coder:7b
# Start Ollama server
ollama serveconst llmConfig = {
provider: 'ollama',
endpoint: 'http://localhost:11434',
model: 'qwen2.5-coder:7b',
parameters: {
temperature: 0.1,
maxTokens: 4096,
topP: 0.9
}
};- Use React DevTools
- Browser console for errors
- Network tab for API calls
- Component state inspection
- Console logging in services
- File system operation logs
- LLM API response inspection
- Task queue status
- DevTools in renderer process
- Main process console
- IPC message logging
- File access debugging
- Check file permissions
- Verify path handling
- Handle symbolic links
- Manage large directories
- Optimize file scanning
- Implement virtual scrolling
- Cache file content
- Limit concurrent operations
- Verify model availability
- Check API endpoints
- Handle network errors
- Manage response timeouts
- Window management
- Menu configuration
- File dialog handling
- Cross-platform compatibility
- Update dependencies
- Run tests
- Check TypeScript compilation
- Verify all features work
- Create production build
- Package Electron app
- Test on target platforms
- Verify installation
- Test installation process
- Verify file access
- Test LLM integration
- Check performance