A modern, AI-powered code editor built with Electron, React, TypeScript, and Python. Features VS Code-like interface, integrated terminal, AI assistance, and professional development tools.
⚠️ Latest Updates: Settings loading fixed with improved error handling | New comprehensive build scripts added | Enhanced proxy configuration for API endpoints
- VS Code-like UI - Familiar interface with professional themes
- Monaco Editor - Full-featured editor with syntax highlighting for 50+ languages
- Split View - Side-by-side file editing with multiple panes
- Customizable Themes - Dark/light themes with VS Code compatibility
- Integrated AI Chat - Built-in AI assistant for code help and explanations
- Code Completion - AI-powered autocomplete and suggestions
- Code Analysis - Intelligent code review and optimization suggestions
- Web Search Integration - Real-time web search using Google Search Results API
- File Explorer - Full-featured file tree with create/edit/delete
- Real-time Sync - Live file synchronization and auto-save
- Project Workspace - Multi-project support with workspace management
- Search & Replace - Global search across files with regex support
- Built-in Terminal - xterm.js powered terminal with shell integration
- Git Integration - Version control with visual diff and branch management
- Multi-cursor Support - Advanced editing with multiple cursors
- Code Folding - Collapsible code sections for better navigation
- Discord Rich Presence - Show your coding activity on Discord
- Cross-platform - Windows, macOS, and Linux support
- Keyboard Shortcuts - Full VS Code-compatible shortcuts
- Extension Support - Plugin architecture for custom functionality
- Node.js (v18 or higher)
- Python (v3.8 or higher)
- Yarn (recommended) or npm
- Git
-
Clone Repository
git clone https://github.com/PointerIDE/Pointer.git cd Pointer/App -
Install Frontend Dependencies
yarn install # or npm install -
Install Backend Dependencies
Choose your platform-specific requirements:
# Windows pip install -r backend/requirements_windows.txt # macOS pip install -r backend/requirements_macos.txt # Linux pip install -r backend/requirements_linux.txt
-
Install Required Models
# Required for AI features python -m spacy download en_core_web_sm -
Configure Environment
# Create .env file echo "VITE_API_URL=http://localhost:23816" > .env
or
npm run env
-
Launch Application
# Easy start (recommended) - uses new build scripts yarn dev # Alternative: Use automated build script # Windows (CMD): build.bat # Windows (PowerShell): .\build.ps1 # macOS/Linux: ./build.sh # Alternative: Manual start node start-pointer.js
We've added comprehensive build scripts with enhanced error handling and automatic troubleshooting:
# Windows (Command Prompt)
build.bat [OPTIONS]
# Windows (PowerShell)
.\build.ps1 [OPTIONS]
# macOS/Linux
./build.sh [OPTIONS]Available Options:
--skip-checks/-s- Skip prerequisite checks (faster)--debug/-d- Enable debug mode with verbose output--clean/-c- Clean installation (removes node_modules)--background/-b- Run components in background--help/-h- Show help message
Examples:
build.bat --clean --debug # Windows: Clean install with debug
./build.sh --skip-checks # macOS/Linux: Skip checks for speed
.\build.ps1 -CleanInstall -Debug # PowerShell: Clean install with debugSee BUILD_SCRIPTS_README.md for detailed documentation.
Problem: SyntaxError: Unexpected token '<', "<!DOCTYPE "..."
Solution:
- Added global HTTP exception handler in backend (
backend.py) to ensure JSON responses - Improved frontend error handling in
FileSystemService.tsto detect and gracefully handle HTML responses - Added detailed error logging with response preview for debugging
Files Modified:
backend/backend.py- Added@app.exception_handler(HTTPException)for JSON error responsessrc/services/FileSystemService.ts- Enhanced error handling with content-type validation
Problem: Frontend couldn't reach backend in development mode
Solution:
- Added comprehensive proxy configuration in
vite.config.tsfor all API endpoints - Proxies now include:
/api,/read-settings-files,/save-settings-files,/execute-command,/read-file,/ws
Files Modified:
vite.config.ts- Added multiple proxy entries for backend communication
Problem: Optional parameters causing validation errors
Solution:
- Made
settingsDirparameter optional with default empty string inSettingsRequestmodel - Backend now uses its own cross-platform path resolution
Files Modified:
backend/backend.py- Updated request model to handle optional parameters
Three unified build scripts with automatic error handling and troubleshooting:
Scripts Created:
build.bat- Windows Command Prompt (CMD.exe)build.ps1- Windows PowerShell (PS 5.0+)build.sh- macOS/Linux Bash
Features:
- ✅ Automatic prerequisite checking (Node.js, Python, Yarn/npm, Git)
- ✅ Port conflict detection
- ✅ Platform-specific requirements installation
- ✅ Error handling with automatic alternatives (npm fallback, Python3/Python)
- ✅ Debug mode with verbose output
- ✅ Clean installation option
- ✅ Integrated troubleshooting guide
- ✅ Colorized output with timestamps
- ✅ Interactive startup assistant
Files Created:
build.bat- Windows batch scriptbuild.ps1- PowerShell scriptbuild.sh- Bash scriptBUILD_SCRIPTS_README.md- Comprehensive documentation
If you prefer to start components individually:
# Terminal 1: Backend Server
cd backend
python run.py
# Terminal 2: Frontend Development Server
yarn start
# Terminal 3: Electron App
yarn electron:devCreate .env file with optional configurations:
# Backend API URL (default: http://localhost:23816)
VITE_API_URL=http://localhost:23816
# Development server port (default: 3000)
VITE_DEV_SERVER_PORT=3000
# OpenAI API key for enhanced AI features (optional)
OPENAI_API_KEY=your_openai_key_here
# Debug mode (optional)
DEBUG=true# Build web application
yarn build
# Build Electron application
yarn electron:build
# Build for specific platform
yarn electron:build --win
yarn electron:build --mac
yarn electron:build --linuxApp/
├── src/ # React TypeScript frontend
│ ├── components/ # UI components
│ │ ├── Editor/ # Monaco editor components
│ │ ├── FileExplorer/ # File tree components
│ │ ├── Terminal/ # Terminal components
│ │ └── AIChat/ # AI chat interface
│ ├── services/ # API services and utilities
│ ├── hooks/ # React hooks
│ ├── utils/ # Utility functions
│ ├── themes/ # UI themes and styling
│ ├── types/ # TypeScript type definitions
│ └── App.tsx # Main application component
├── backend/ # Python FastAPI backend
│ ├── backend.py # Main FastAPI server
│ ├── tools_handlers.py # AI tool handlers
│ ├── git_endpoints.py # Git integration endpoints
│ ├── codebase_indexer.py # Code analysis and indexing
│ ├── routes/ # API route modules
│ ├── tools/ # Backend utility tools
│ └── requirements*.txt # Platform-specific dependencies
├── electron/ # Electron main process
│ ├── main.js # Main Electron application
│ ├── preload.js # Preload script for renderer
│ ├── server.js # Local server integration
│ └── git.js # Git operations for Electron
├── tools/ # Development and build tools
├── start-pointer.js # Unified startup script
├── vite.config.ts # Vite build configuration
└── package.json # Dependencies and npm scripts
# Standard startup
node start-pointer.js
# Background mode (detached terminal)
node start-pointer.js --background
# Skip connection checks (faster startup)
node start-pointer.js --skip-checks
# Both background and skip checks
node start-pointer.js --background --skip-checks# Development
yarn dev # Start all components
yarn dev:server # Frontend only
yarn dev:electron # Electron only
# Building
yarn build # Build for web
yarn electron:build # Build Electron app
# Utilities
yarn electron:start # Start built Electron app
yarn serve # Serve built web appConfigure Discord integration by editing settings in the application or manually:
{
"enabled": true,
"details": "Editing {file} | Line {line}:{column}",
"state": "Workspace: {workspace}",
"largeImageKey": "pointer_logo",
"button1Label": "Website",
"button1Url": "https://pointr.sh"
}Enable real-time web search functionality using Startpage scraping:
Features:
- Real-time Google search results (via Startpage)
- No API keys or rate limits required
- Privacy-focused search (no tracking)
- Works immediately without setup
Test Integration:
cd backend
python test_startpage_scraping.pyFor detailed implementation information, see backend/WEB_SEARCH_IMPLEMENTATION.md
Backend Connection Errors
# Check if backend is running
curl http://localhost:23816/health
# Restart backend
cd backend && python run.pyPort Conflicts
# Check what's using ports
netstat -an | grep :23816
netstat -an | grep :3000
# Use different ports
VITE_PORT=3001 yarn devFrontend Build Issues
# Clear dependencies and reinstall
rm -rf node_modules package-lock.json
yarn install
# Clear build cache
rm -rf dist
yarn buildElectron App Issues
# Rebuild Electron dependencies
yarn postinstall
# Start with debug info
DEBUG=* yarn electron:devPython Dependencies
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Linux/macOS
# or
venv\Scripts\activate # Windows
# Reinstall requirements
pip install -r backend/requirements.txtEnable detailed logging:
# Enable debug logging
DEBUG=true yarn dev
# Check backend logs
cd backend && python run.py --debug
# Electron with developer tools
yarn electron:dev --dev-toolsOptimize for better performance:
- Disable unnecessary features in development
- Use
--skip-checksflag for faster startup - Close unused file tabs in the editor
- Limit terminal history if terminal becomes slow
Configure proxy or firewall:
# Check if ports are accessible
telnet localhost 23816
telnet localhost 3000
# Configure proxy in vite.config.ts if neededThe backend provides these main endpoints:
GET /health- Health checkPOST /execute-command- Execute terminal commandsGET /read-file- Read file contentsPOST /write-file- Write file contentsGET /list-directory- List directory contentsPOST /git/*- Git operationsPOST /ai/chat- AI chat interfaceGET /ws- WebSocket for real-time updates
- Fork the repository
- Create feature branch (
git checkout -b feature/editor-improvement) - Setup development environment following the installation guide
- Make changes and test thoroughly
- Submit pull request with clear description
- TypeScript: Use strict type checking
- React: Functional components with hooks
- Python: Follow PEP 8 style guide
- File naming: Use kebab-case for files, PascalCase for components
# Run frontend tests (when available)
yarn test
# Test backend endpoints
cd backend && python -m pytest
# Manual testing checklist:
# - File operations (create, edit, delete)
# - Terminal functionality
# - AI chat features
# - Git integration
# - Cross-platform compatibilityThis component is part of the Pointer project, licensed under the MIT License.
- Monaco Editor - VS Code's editor component
- xterm.js - Terminal emulator
- Electron - Cross-platform desktop framework
- FastAPI - Modern Python web framework
- React - UI library
- Vite - Build tool and dev server
← Back to Main README | Website Component → | Discord Bots →