code-server/cursor-fullstack
Cursor Agent e5bfb02460 Refactor: Simplify frontend code and dependencies
This commit refactors the frontend code by removing unnecessary meta tags, simplifying CSS, and updating dependencies in package.json and vite.config.js. It also streamlines the App component by removing unused state and props, and improving the loading and error handling.

Co-authored-by: fekofal332 <fekofal332@reaxu.com>
2025-10-13 13:24:25 +00:00
..
cloudflare Refactor: Simplify frontend code and dependencies 2025-10-13 13:24:25 +00:00
deployment-package feat: Add Cloudflare Pages deployment and update build config 2025-10-12 21:44:54 +00:00
packages feat: Add OpenRouter AI provider and UI enhancements 2025-10-12 12:43:02 +00:00
.gitignore feat: Add deployment docs, gitignore, and complete tests 2025-10-12 12:55:59 +00:00
build-and-push.sh feat: Add Dockerfiles and build scripts 2025-10-12 13:14:55 +00:00
build-images.sh feat: Implement full-stack AI IDE with tool integration 2025-10-12 12:31:03 +00:00
build.sh feat: Implement full-stack AI IDE with tool integration 2025-10-12 12:31:03 +00:00
cloudflare-pages.json Fix: Resolve Cloudflare deployment and configuration issues 2025-10-13 08:24:55 +00:00
CLOUDFLARE_DEPLOYMENT_STATUS.md feat: Configure Cloudflare KV namespaces and add deployment scripts 2025-10-13 09:09:10 +00:00
CLOUDFLARE_PAGES_DEPLOYMENT.md feat: Add Cloudflare Pages deployment guides and scripts 2025-10-12 14:30:18 +00:00
CLOUDFLARE_PUBLISHING_FIXES.md Fix: Resolve Cloudflare deployment and configuration issues 2025-10-13 08:24:55 +00:00
COMPLETE_SOLUTION.md feat: Add comprehensive documentation for Cursor AI IDE 2025-10-12 14:50:18 +00:00
DEPLOYMENT.md feat: Add deployment docs, gitignore, and complete tests 2025-10-12 12:55:59 +00:00
DEPLOYMENT_COMPLETE.md feat: Add Cloudflare Pages deployment and update build config 2025-10-12 21:44:54 +00:00
DEPLOYMENT_GUIDE.md feat: Add Cloudflare Pages deployment and update build config 2025-10-12 21:44:54 +00:00
DEPLOYMENT_READY.md Fix: Resolve Cloudflare deployment and configuration issues 2025-10-13 08:24:55 +00:00
DEPLOYMENT_SOLUTION.md feat: Add deployment documentation for Cloudflare Pages 2025-10-12 14:43:52 +00:00
docker-compose.prod.yml feat: Implement full-stack AI IDE with tool integration 2025-10-12 12:31:03 +00:00
docker-compose.yml feat: Set up fullstack Cursor IDE with backend and frontend 2025-10-12 12:22:34 +00:00
DOCKER_IMAGES.md feat: Add Dockerfiles and build scripts 2025-10-12 13:14:55 +00:00
DOCKER_REGISTRY_SETUP.md feat: Add Dockerfiles and build scripts 2025-10-12 13:14:55 +00:00
FINAL_SUMMARY.md feat: Add deployment docs, gitignore, and complete tests 2025-10-12 12:55:59 +00:00
GITHUB_SETUP.md feat: Add deployment docs, gitignore, and complete tests 2025-10-12 12:55:59 +00:00
IMPROVEMENTS.md feat: Add OpenRouter AI provider and UI enhancements 2025-10-12 12:43:02 +00:00
INTEGRATED_DEPLOYMENT.md feat: Add comprehensive documentation for Cursor AI IDE 2025-10-12 14:50:18 +00:00
nginx.conf feat: Implement full-stack AI IDE with tool integration 2025-10-12 12:31:03 +00:00
package-lock.json Refactor: Simplify frontend code and dependencies 2025-10-13 13:24:25 +00:00
package.json Fix: Resolve Cloudflare deployment and configuration issues 2025-10-13 08:24:55 +00:00
prepare-deployment.sh feat: Add Cloudflare Pages deployment and update build config 2025-10-12 21:44:54 +00:00
PROJECT_SUMMARY.md feat: Implement full-stack AI IDE with tool integration 2025-10-12 12:31:03 +00:00
PUSH_TO_GITHUB.md feat: Add deployment docs, gitignore, and complete tests 2025-10-12 12:55:59 +00:00
QUICK_DEPLOY.md feat: Add Cloudflare Pages deployment guides and scripts 2025-10-12 14:30:18 +00:00
README.md feat: Implement full-stack AI IDE with tool integration 2025-10-12 12:31:03 +00:00
SETUP.md feat: Implement full-stack AI IDE with tool integration 2025-10-12 12:31:03 +00:00
test-complete.js feat: Add deployment docs, gitignore, and complete tests 2025-10-12 12:55:59 +00:00
test-system.js feat: Implement full-stack AI IDE with tool integration 2025-10-12 12:31:03 +00:00
UNIFIED_GUIDE.md feat: Add comprehensive documentation for Cursor AI IDE 2025-10-12 14:50:18 +00:00
إصلاح_Frontend_والربط_بالBackend.md Fix: Connect frontend to backend and deploy 2025-10-13 13:17:18 +00:00
إصلاح_الشاشة_السوداء_النهائي.md Refactor: Simplify frontend code and dependencies 2025-10-13 13:24:25 +00:00
التطبيق_الحقيقي_النهائي.md Fix: Connect frontend to backend and deploy 2025-10-13 13:17:18 +00:00
تقرير_الاختبار_الشامل.md feat: Add Cloudflare backend deployment and testing scripts 2025-10-13 10:33:10 +00:00
تقرير_النجاح_النهائي.md feat: Add Cloudflare backend and testing scripts 2025-10-13 11:04:42 +00:00
تقرير_الوضع_النهائي.md feat: Add backend deployment scripts and worker code 2025-10-13 10:57:57 +00:00
حالة_النشر_النهائية.md Checkpoint before follow-up message 2025-10-13 09:47:19 +00:00
حل_مشكلة_Frontend.md feat: Add Cloudflare deployment scripts for frontend 2025-10-13 10:14:50 +00:00
حل_مشكلة_wrangler.md docs: Add comprehensive wrangler troubleshooting guide 2025-10-13 10:07:45 +00:00
حل_مشكلة_التوكن_النهائي.md Fix: Update Cloudflare backend with new token and script 2025-10-13 10:37:20 +00:00
حل_مشكلة_التوكن_وإعدادات_المراقبة.md feat: Add observability to Cloudflare backend 2025-10-13 10:43:46 +00:00
حل_مشكلة_التوكن_والنشر.md Add Cloudflare token check script and comment out R2 bucket 2025-10-13 09:28:43 +00:00
حل_مشكلة_النشر_على_Cloudflare.md feat: Add Cloudflare deployment script 2025-10-13 09:14:40 +00:00
دليل_إنشاء_التوكن_الصحيح.md Fix: Deploy backend worker with observability 2025-10-13 10:49:52 +00:00
نتائج_النشر.md feat: Add Cloudflare worker and deployment scripts 2025-10-13 09:37:45 +00:00

Cursor Full Stack AI IDE

A complete full-stack AI-powered IDE similar to Cursor Web, built with real backend services, WebSocket communication, and comprehensive tool integrations.

🚀 Features

Backend (Claudable + code-server)

  • Real AI Integration: OpenAI, Anthropic Claude, Google Gemini, Mistral
  • WebSocket Communication: Real-time chat and tool execution
  • Comprehensive Tool System: File operations, Git, Terminal, Docker, NPM
  • Code Execution: Support for JavaScript, Python, TypeScript, Shell
  • Live Code-server: Full VS Code experience in browser

Frontend (React + Vite + Tailwind)

  • Cursor-like UI: Dark theme with professional design
  • Monaco Editor: Full-featured code editor with syntax highlighting
  • Real-time Chat: AI assistant with live WebSocket communication
  • Tool Panel: Interactive tool execution interface
  • Live Preview: Real-time code execution and preview
  • File Explorer: Complete workspace management

AI Tool Integration

  • File Operations: Read, write, create, delete, move, copy files
  • Git Integration: Status, commit, push, pull operations
  • Terminal Commands: Execute any shell command
  • Code Search: Search patterns across codebase
  • Package Management: NPM install, run scripts
  • Docker Operations: Build and run containers
  • Directory Management: Create, navigate, list directories

🛠️ Tech Stack

Backend

  • Bun: Fast JavaScript runtime
  • Express: Web framework
  • Socket.IO: Real-time communication
  • WebSocket: Native WebSocket support
  • Zod: Schema validation
  • AI Providers: OpenAI, Anthropic, Google, Mistral

Frontend

  • React 18: UI framework
  • Vite: Build tool and dev server
  • Tailwind CSS: Styling
  • Monaco Editor: Code editor
  • Socket.IO Client: Real-time communication
  • Lucide React: Icons

Infrastructure

  • Docker: Containerization
  • Docker Compose: Multi-service orchestration
  • Nginx: Reverse proxy
  • code-server: VS Code in browser

🚀 Quick Start

Prerequisites

  • Docker and Docker Compose
  • Git

Installation

  1. Clone the repository
git clone <repository-url>
cd cursor-fullstack
  1. Start all services
docker-compose up --build
  1. Access the application

Configuration

  1. Set AI Provider API Keys

    • Click "AI Settings" in the sidebar
    • Select your preferred AI provider
    • Enter your API key
    • Test the connection
  2. Available AI Providers

    • OpenAI: GPT-4, GPT-3.5 Turbo
    • Anthropic: Claude 3 Sonnet, Claude 3 Haiku
    • Google: Gemini Pro, Gemini Pro Vision
    • Mistral: Mistral Large, Mistral Medium

🔧 Usage

Basic Usage

  1. File Management

    • Browse files in the sidebar
    • Click to open files in the editor
    • Use Ctrl+S to save files
  2. AI Chat

    • Click "AI Chat" in the sidebar
    • Type your questions or requests
    • AI will respond with real-time streaming
  3. Tool Execution

    • Click "Tools" in the sidebar
    • Select a tool from the list
    • Configure parameters
    • Execute and view results
  4. Code Execution

    • Write code in the editor
    • Click "Run" to execute
    • View output in the terminal panel

Advanced Features

  1. AI Tool Integration

    • Enable "Use Tools" in chat settings
    • AI can automatically use tools to help with tasks
    • Examples: "Create a new React component", "Search for all functions named 'handleClick'"
  2. Git Integration

    • Use tools to check git status
    • Commit changes with custom messages
    • Push/pull from remote repositories
  3. Docker Operations

    • Build Docker images from Dockerfiles
    • Run containers with custom configurations
    • Manage volumes and ports
  4. Package Management

    • Install npm packages
    • Run npm scripts
    • Manage dependencies

🏗️ Architecture

cursor-fullstack/
├── docker-compose.yml          # Multi-service orchestration
├── packages/
│   ├── backend/claudable/      # Backend service
│   │   ├── src/
│   │   │   ├── index.ts        # Main server
│   │   │   ├── routes/         # API routes
│   │   │   ├── ai/             # AI providers
│   │   │   ├── tools/          # Tool system
│   │   │   └── ws.ts           # WebSocket handlers
│   │   └── Dockerfile
│   └── frontend/cursor-web/    # Frontend service
│       ├── src/
│       │   ├── components/     # React components
│       │   ├── App.tsx         # Main app
│       │   └── main.tsx        # Entry point
│       └── Dockerfile
└── workspace/                  # Shared workspace

🔌 API Endpoints

Chat & AI

  • POST /api/chat - Send message to AI
  • GET /api/providers - List available AI providers

File Operations

  • GET /api/workspace/files - List workspace files
  • GET /api/workspace/file/:path - Read file content
  • POST /api/workspace/file/:path - Write file content

Tools

  • GET /api/tools - List available tools
  • POST /api/tools/execute - Execute a tool
  • POST /api/terminal - Execute terminal command
  • POST /api/execute - Execute code

WebSocket Events

  • chat-message - Send chat message
  • chat-response - Receive AI response
  • typing-start/stop - Typing indicators

🛡️ Security

  • API keys are stored locally in browser
  • No server-side storage of sensitive data
  • Direct communication with AI providers
  • Secure WebSocket connections
  • Input validation and sanitization

🚀 Deployment

Production Deployment

  1. Environment Variables
# Backend
NODE_ENV=production
PORT=3001
WS_PORT=8080

# Frontend
VITE_BACKEND_URL=https://your-backend.com
VITE_WS_URL=wss://your-backend.com
  1. Docker Build
docker-compose -f docker-compose.prod.yml up --build
  1. Reverse Proxy Setup
    • Configure Nginx for SSL termination
    • Set up domain names
    • Enable HTTPS

Scaling

  • Horizontal Scaling: Multiple backend instances
  • Load Balancing: Nginx load balancer
  • Database: Add PostgreSQL for persistence
  • Caching: Redis for session management

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

📝 License

MIT License - see LICENSE file for details

🆘 Support

  • Issues: GitHub Issues
  • Documentation: README.md
  • Discussions: GitHub Discussions

🔄 Updates

Version 1.0.0

  • Initial release
  • Full AI integration
  • Complete tool system
  • Real-time communication
  • Docker deployment

Built with ❤️ using modern web technologies