Modern web interface for Claude Code CLI and Cursor CLI built with Next.js 15, powered by v0 components, and deployed on Vercel.
Claude Code UI is a comprehensive web application that provides a beautiful, responsive interface for interacting with Claude Code and Cursor CLI tools. Built with modern technologies and best practices, it offers:
- Real-time AI Chat Interface - Communicate with Claude and Cursor AI
- Integrated Terminal - Direct CLI access through web browser
- File Management - Browse, edit, and manage project files
- Git Integration - Full Git workflow support
- Production Monitoring Dashboard - Real-time error tracking, CI/CD monitoring, and system health
- Intelligent Caching - Redis-backed caching with automatic fallback
- Performance Monitoring - Comprehensive API and database performance tracking
- Automated Reporting - Scheduled reports with email delivery
- Mobile Responsive - Works perfectly on all devices
- High Performance - Optimized for speed and scalability
- Node.js 20+
- npm 10+
- Claude Code CLI or Cursor CLI installed
- Git
-
Clone the repository
git clone https://github.com/your-org/claude-code-ui-nextjs.git cd claude-code-ui-nextjs -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env # Edit .env with your configuration -
Start development server
npm run dev
-
Open in browser
http://localhost:3000
The application follows a modern, scalable architecture:
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β API Routes β β External APIs β
β (Next.js) βββββΊβ (Next.js API) βββββΊβ Claude/Cursor β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Components β β WebSocket β β File System β
β (v0 + shadcn) β β (Real-time) β β (Local/Cloud) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Next.js 15 - React framework with App Router
- React 19 - Latest React with concurrent features
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- v0 Components - AI-generated UI components
- shadcn/ui - High-quality React components
- Next.js API Routes - Serverless API endpoints
- Vercel Edge Functions - Ultra-fast serverless functions
- WebSockets - Real-time communication
- NextAuth.js - Authentication solution
- Prisma - Database ORM
- Redis Caching - High-performance distributed caching
- SSE (Server-Sent Events) - Real-time notifications
- Performance Monitoring - Response time tracking and analytics
- Vercel - Hosting and deployment
- PostgreSQL - Primary database
- Redis - Caching and session storage
- Vercel Blob - File storage
- Sentry - Error tracking and monitoring
- GitHub Actions - CI/CD pipeline integration
Copy .env.example to .env and configure:
# Required - Basic Configuration
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-generated-secret-here
# Required - AI Provider API Keys (choose one or both)
CLAUDE_API_KEY=your-claude-api-key
CURSOR_API_KEY=your-cursor-api-key
# Optional - Additional providers
OPENAI_API_KEY=your-openai-api-key
# Optional - Database (for production)
DATABASE_URL=postgresql://username:password@localhost:5432/claude-code-uiFor NEXTAUTH_SECRET, generate a secure random string:
openssl rand -base64 32Comprehensive documentation is available in the /docs directory:
- Installation Guide - Step-by-step setup
- Architecture Overview - System design and structure
- Integration Guide - External services setup (Sentry, GitHub, Email)
- Caching & Performance - Optimization strategies
- API Reference - HTTP endpoints
- Component Library - UI components
- Deployment Guide - Production deployment
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
npm run type-check # Run TypeScript checks
# Database commands
npm run db:generate # Generate Prisma client
npm run db:push # Push schema to database
npm run db:migrate # Run migrations
npm run db:seed # Seed database with sample data
npm run db:setup # Complete database setupclaude-code-ui-nextjs/
βββ app/ # Next.js App Router
β βββ api/ # API routes
β βββ dashboard/ # Dashboard pages
β βββ globals.css # Global styles
βββ components/ # React components
β βββ chat/ # AI chat interface
β βββ file-manager/ # File explorer
β βββ terminal/ # Terminal emulator
β βββ layout/ # Layout components
β βββ ui/ # Base UI components
βββ lib/ # Utilities and helpers
βββ types/ # TypeScript type definitions
βββ docs/ # Documentation
βββ public/ # Static assets
GET /api/metrics/overview- System health overviewGET /api/metrics/sentry- Error tracking metricsGET /api/metrics/cicd- CI/CD pipeline healthGET /api/metrics/conflicts- Merge conflict tracking
GET /api/reports- Get scheduled reportsPOST /api/reports/generate- Generate report on-demandGET /api/reports/history- Report history with paginationGET /api/notifications/sse- Real-time notification streamGET /api/notifications- List notifications
GET /api/cache- Cache statisticsDELETE /api/cache?tag=metrics- Invalidate cache by tagGET /api/monitoring/performance- Performance metrics
POST /api/claude- Send messages to Claude AIPOST /api/cursor- Execute Cursor CLI commands
POST /api/terminal- Execute terminal commandsGET /api/terminal- List terminal sessionsDELETE /api/terminal- Close terminal session
GET /api/files- List directory contentsPOST /api/files- Create/write filesDELETE /api/files- Delete files
WS /api/ws- Real-time communication
- One-click deploy using the button above
- Configure environment variables in Vercel dashboard
- Set up custom domain (optional)
# Install Vercel CLI
npm install -g vercel
# Deploy
vercel --prod
# Set environment variables
vercel env add NEXTAUTH_SECRET
vercel env add CLAUDE_API_KEY
# ... add other required variables- Environment Variables - Sensitive data stored securely
- NextAuth.js - Industry-standard authentication
- CORS Protection - Cross-origin request filtering
- Rate Limiting - API abuse prevention
- Input Validation - SQL injection protection
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- π Documentation
- π Issue Tracker
- π¬ Discussions
- Claude Code CLI - AI-powered development
- Cursor IDE - AI code editor
- v0 - AI component generation
- Next.js - React framework
- Vercel - Deployment platform
Built with β€οΈ using Next.js, v0, and Vercel