A production-ready AI-powered code editor and IDE with an intelligent coding agent, in-browser code execution, GitHub integration, and complete subscription management. Built with Next.js 16, CodeMirror 6, WebContainers, multiple AI providers (Claude, Gemini), and Clerk authentication.
Credit: This project is based on the tutorial by Antonio Erdeljac (Code With Antonio)
- π¨ Syntax Highlighting - Support for JavaScript, TypeScript, HTML, CSS, JSON, Python, Markdown
- πΊοΈ Minimap - Replit-powered code minimap for navigation
- π One Dark Theme - Beautiful dark theme out of the box
- π Indentation Markers - Visual indentation guides
- π File Explorer - Full project file tree with create, rename, delete operations
- π§ AI Coding Agent - Claude-powered agent with file manipulation tools (read, write, create, delete, rename)
- β‘ Quick Edit (Cmd+K) - Edit selected code with AI instructions inline
- π‘ Code Suggestions - Real-time AI-powered code suggestions as you type
- π Auto Title Generation - AI-generated conversation titles
- π URL Scraping - Fetch and include web documentation in AI context via Firecrawl
- π§ Multi-Tool Agent - AI agent with 7+ tools for file system operations
- π¨οΈ Chat Interface - Full conversation UI with streaming AI responses
- π File Attachments - Attach project files to conversations
- π Message Streaming - Real-time streaming responses with status tracking
- π§© Rich AI Elements - 50+ specialized components for displaying AI responses (code blocks, reasoning, plans, artifacts)
- β Cancellable - Cancel in-progress AI responses
- π WebContainer Runtime - Run Node.js projects directly in the browser
- π₯οΈ Integrated Terminal - xterm.js terminal with full output streaming
- ποΈ Live Preview - Real-time preview of running applications
- π₯ Hot Reload - Automatic reload on file changes
- βοΈ Custom Commands - Configurable install and dev commands per project
- π₯ Import Repositories - Import GitHub repos into the editor (Pro)
- π€ Export to GitHub - Push projects to new GitHub repositories (Pro)
- π GitHub OAuth - Secure token-based access via Clerk
- π Status Tracking - Real-time import/export progress
- π Clerk Authentication - Google, GitHub, and Email/Password sign-in
- π³ Subscription Billing - Pro plan with Clerk organizations
- β‘ Background Jobs - Inngest-powered reliable AI agent execution
- ποΈ Real-time Database - Convex for live data sync
- π Error Tracking - Sentry integration with LLM monitoring
- π Dark/Light Mode - Theme switching with next-themes
- π Resizable Panels - Allotment-powered split pane layout
- π GitHub repository import
- π€ GitHub repository export
- β¨ Full AI agent capabilities
- π Priority support
- Next.js 16 - React framework with App Router
- React 19 - UI library
- TypeScript - Type safety
- TailwindCSS 4 - Utility-first styling
- Shadcn UI - Beautiful component library
- CodeMirror 6 - Advanced code editor
- Allotment - Resizable split panels
- Zustand - Lightweight state management
- React Hook Form - Form handling
- Motion - Animations
- Lucide React & React Icons - Icon systems
- Next Themes - Dark mode support
- Convex - Real-time serverless database & backend
- Inngest - Background job execution & orchestration
- Inngest Agent Kit - AI agent framework
- Vercel AI SDK - Unified AI provider interface
- Anthropic Claude - Claude 3.5 Haiku, Claude 4.5 Haiku, Claude 3.7 Sonnet
- Google Gemini - Gemini AI integration
- Firecrawl - Web scraping for documentation
- Shiki - Syntax highlighting for AI responses
- WebContainers - In-browser Node.js runtime
- xterm.js - Terminal emulator
- Octokit - GitHub API client
- Clerk - Authentication & user management
- Clerk Organizations - Plan-based billing
Before you begin, ensure you have:
- Node.js (v18 or higher)
- npm, yarn, pnpm, or bun
- Git
- Accounts for:
git clone https://github.com/git-adventures/polaris-clone.git
cd polaris-clonenpm install
# or
bun installCreate a .env.local file in the root directory:
# Clerk (Authentication)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
CLERK_JWT_ISSUER_DOMAIN=your_clerk_jwt_issuer_domain
# Convex (Database)
CONVEX_DEPLOYMENT=your_convex_deployment
NEXT_PUBLIC_CONVEX_URL=your_convex_url
NEXT_PUBLIC_CONVEX_SITE_URL=your_convex_site_url
POLARIS_CONVEX_INTERNAL_KEY=your_convex_internal_key
# AI Providers
ANTHROPIC_API_KEY=your_anthropic_api_key
GOOGLE_GENERATIVE_AI_API_KEY=your_google_ai_api_key
# Model Selection (optional)
TITLE_GENERATOR_MODEL=claude-3-5-haiku-20241022
CODING_AGENT_MODEL=claude-haiku-4-5-20251001
# Firecrawl (Web Scraping)
FIRECRAWL_API_KEY=your_firecrawl_api_key
# Sentry (Error Tracking)
SENTRY_AUTH_TOKEN=your_sentry_auth_token
# App Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000# Start the Convex dev server
npx convex dev# Run Inngest dev server in a separate terminal
npx --ignore-scripts=false inngest-cli@latest devnpm run dev
# or
bun run devOpen http://localhost:3000 in your browser.
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm start |
Start production server |
npm run lint |
Run ESLint |
- Ensure Convex dev server is running (
npx convex dev) - Check Convex dashboard for deployment status
- Verify
NEXT_PUBLIC_CONVEX_URLis set correctly
- Make sure Inngest dev server is running
- Check Inngest dashboard for function logs
- Verify
NEXT_PUBLIC_APP_URLis set correctly
- Verify Clerk API keys are correct
- Check OAuth callback URLs in Clerk dashboard
- Ensure
CLERK_JWT_ISSUER_DOMAINmatches your Clerk instance
- WebContainers require specific browser headers (COOP/COEP)
- Ensure you're using a Chromium-based browser for best compatibility
- Check browser console for WebContainer boot errors
- Ensure GitHub OAuth is configured in Clerk
- Pro plan is required for import/export features
- Check GitHub token permissions
- Next.js Documentation
- Convex Documentation
- Clerk Documentation
- Inngest Documentation
- CodeMirror Documentation
- WebContainers Documentation
- Vercel AI SDK Documentation
- Firecrawl Documentation
- Sentry Documentation
- YouTube Tutorial Part 1 - Build the AI-powered code editor
- Code With Antonio - Course creator
- Vercel - Deployment platform
- Shadcn - UI components
β If you found this project helpful, please give it a star!
π Resources:
