AI-Powered Browser-Based Code Editor
Build, edit, and preview web projects — all from your browser — with an intelligent AI coding assistant by your side.
Polaris is a full-featured, browser-based IDE that combines a modern code editor with an AI coding assistant. It runs your projects entirely in the browser using WebContainers, giving you instant previews without needing a remote server. Ask the AI to create files, refactor code, or scaffold entire features — all through natural language conversation.
- 🤖 AI Coding Assistant — Chat with an intelligent agent that can read, create, edit, rename, and delete files in your project. Powered by Inngest Agent Kit and Google Gemini.
- 📝 Rich Code Editor — Full-featured CodeMirror editor with syntax highlighting, indentation markers, minimap, and multi-language support (JavaScript, TypeScript, HTML, CSS, JSON, Python, Markdown).
- ⚡ Live In-Browser Preview — Run your apps directly in the browser via WebContainers — no server needed. See changes reflected in real time.
- 📂 Project Management — Create, organize, and manage multiple projects with a file-tree explorer, drag-and-drop support, and customizable build/dev commands.
- 🔗 GitHub Integration — Import repositories from GitHub and export your projects back. Seamless two-way sync for your workflow.
- 💬 Conversation History — Keep track of all your AI conversations per project. Auto-generated titles and full message history.
- 🔐 Authentication — Secure sign-in with Clerk, including GitHub OAuth support.
- 📊 Error Monitoring — Production-grade error tracking and performance monitoring via Sentry.
- 🌙 Dark Theme — Sleek, modern dark UI built with Radix UI primitives and Tailwind CSS.
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| Language | TypeScript 5 |
| Backend / Database | Convex (real-time serverless backend) |
| Authentication | Clerk |
| AI / LLM | Vercel AI SDK + Inngest Agent Kit + Google Gemini |
| Background Jobs | Inngest |
| Code Editor | CodeMirror 6 |
| In-Browser Runtime | WebContainers API |
| Styling | Tailwind CSS 4 + Radix UI |
| Animations | Motion (Framer Motion) |
| Web Scraping | Firecrawl |
| Error Monitoring | Sentry |
| Charts | Recharts |
- Node.js 18+ (LTS recommended)
- npm (comes with Node.js)
- A Convex account (free tier available)
- A Clerk account (free tier available)
- A Google AI API key (for Gemini)
- An Inngest account (free tier available)
-
Clone the repository
git clone https://github.com/BhushanLagare7/polaris.git cd polaris -
Install dependencies
npm install
-
Set up environment variables
Create a
.env.localfile in the project root and populate the following variables:# Convex NEXT_PUBLIC_CONVEX_URL= # Your Convex deployment URL POLARIS_CONVEX_INTERNAL_KEY= # Internal key for server-side Convex mutations # Clerk Authentication NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY= CLERK_SECRET_KEY= # AI Providers GOOGLE_GENERATIVE_AI_API_KEY= # Google Gemini API key # Inngest INNGEST_EVENT_KEY= INNGEST_SIGNING_KEY= # Firecrawl (optional — for URL scraping in AI conversations) FIRECRAWL_API_KEY= # Sentry (optional — for error monitoring) SENTRY_AUTH_TOKEN= SENTRY_ORG= SENTRY_PROJECT=
-
Start the Convex backend
npx convex dev
-
Start the development server (in a separate terminal)
npm run dev
-
Start Inngest Dev Server (in a separate terminal)
npx inngest-cli@latest dev
-
Open your browser
Visit http://localhost:3000 to start using Polaris.
polaris/
├── convex/ # Convex backend (schema, queries, mutations)
│ ├── schema.ts # Database schema (projects, files, conversations, messages)
│ ├── projects.ts # Project CRUD operations
│ ├── files.ts # File management operations
│ ├── conversations.ts # Conversation operations
│ └── system.ts # Internal system mutations
├── public/ # Static assets (logos, icons)
├── src/
│ ├── app/ # Next.js App Router pages & API routes
│ │ ├── api/ # REST endpoints (messages, GitHub, inngest)
│ │ └── projects/ # Project workspace page
│ ├── components/
│ │ ├── ai-elements/ # AI chat UI (prompt input, messages, code blocks, etc.)
│ │ └── ui/ # Reusable UI primitives (shadcn/ui + Radix)
│ ├── features/
│ │ ├── auth/ # Authentication views
│ │ ├── conversations/ # AI conversation logic & Inngest agent
│ │ ├── editor/ # CodeMirror editor components & extensions
│ │ ├── preview/ # WebContainer live preview
│ │ └── projects/ # Project management & GitHub sync
│ ├── hooks/ # Custom React hooks
│ ├── inngest/ # Inngest client & function definitions
│ └── lib/ # Utility modules (Convex client, Firecrawl, helpers)
├── next.config.ts # Next.js configuration with Sentry plugin
├── package.json
└── tsconfig.json
| Command | Description |
|---|---|
npm run dev |
Start the Next.js development server |
npm run build |
Create an optimized production build |
npm start |
Run the production server |
npm run lint |
Run ESLint checks |
npm run lint:fix |
Auto-fix ESLint issues |
Contributions are welcome! Here's how to get started:
- Fork the repository
- Create a feature branch —
git checkout -b feature/your-feature - Commit your changes —
git commit -m "feat: add your feature" - Push to your branch —
git push origin feature/your-feature - Open a Pull Request
Please follow the Conventional Commits specification for commit messages.
This project is licensed under the MIT License — see the LICENSE file for details.
If you run into issues or have questions:
- Open an issue on GitHub Issues
- Start a discussion on GitHub Discussions
Built with ❤️ by Bhushan Lagare