Overview
Polaris IDE is built as a modern cloud-based development environment with real-time collaboration, AI-powered code assistance, and multi-platform support (web + Electron desktop).
Technology Stack
Frontend Layer
Next.js 16
App Router architecture with React Server Components
React 19
Latest features including concurrent rendering
TypeScript
Strict mode enabled for type safety
Tailwind CSS 4
PostCSS integration for styling
Backend Services
Convex
Real-time database with optimistic updates
Trigger.dev
Background job processing and workflows
Stack Auth
Authentication with GitHub OAuth
Editor & AI
CodeMirror 6
Extensible code editor with custom extensions
Kimi K2.5/Cerebras
AI-powered code suggestions and chat
WebContainer
In-browser Node.js runtime
xterm.js
Terminal emulation
System Architecture Diagram
Based onARCHITECTURE_DIAGRAM.md, here’s the complete data flow:
Database Schema
Polaris uses Convex for real-time data synchronization:Core Tables
- users
- projects
- files
- conversations
Authentication Flow
Web Application
Electron Desktop App
Data Flow Patterns
Creating a Project
AI Message Processing
Component Architecture
Feature-Based Organization
Polaris uses a feature-based folder structure:Shared Components
Background Job Processing
All heavy operations run as background jobs via Trigger.dev:process-message
process-message
Handles AI chat responses with tool execution:
- Fetches conversation context from Convex
- Streams AI response with real-time updates
- Executes file tools (read, write, delete)
- Executes LSP tools (find symbols, diagnostics)
- Executes search tools (code search, file search)
generate-project
generate-project
Creates complete project from description:
- Validates input
- Generates config files (package.json, tsconfig.json)
- Creates source structure (main.tsx, App.tsx)
- Generates components, pages, hooks
- Writes README documentation
Subscription Management
Autumn handles billing and subscriptions:Subscription Tiers
| Tier | Projects | Price | Status |
|---|---|---|---|
| Free | 10 | $0/mo | free |
| Pro Monthly | Unlimited | $29/mo | active/trialing |
| Pro Yearly | Unlimited | $290/yr | active/trialing |
Integration Flow
- User clicks “Upgrade to Pro”
- Frontend calls
/api/autumn/checkout - Autumn creates checkout session with
stackUserIdin metadata - User completes payment
- Autumn sends webhook to
/api/webhooks/autumn - Webhook updates Convex user record:
Error Tracking
Sentry monitors errors and AI performance:Next Steps
Setup Guide
Set up your development environment
Background Jobs
Learn about Trigger.dev integration
Custom Extensions
Build CodeMirror extensions
Contributing
Contribute to Polaris