Prerequisites
Before setting up Polaris IDE, ensure you have the following installed:Node.js
Version 20.09 or higher required
Package Manager
npm or pnpm (bun also supported)
Required Accounts
You’ll need to create accounts with the following services:Stack Auth - Authentication
Stack Auth - Authentication
Stack Auth provides authentication for Polaris IDE.
- Sign up at stack-auth.com
- Create a new project
- Copy your publishable and secret keys
Convex - Real-time Database
Convex - Real-time Database
Convex powers the real-time backend.
- Sign up at convex.dev
- Create a new project
- Run
npx convex devto get your deployment URL
Trigger.dev - Background Jobs
Trigger.dev - Background Jobs
Trigger.dev handles asynchronous task processing.
- Sign up at trigger.dev
- Create a new project
- Copy your API key from project settings
AI Providers - Code Intelligence
AI Providers - Code Intelligence
Choose one or both AI providers:OpenRouter (Recommended)
- Sign up at openrouter.ai
- Uses Moonshot AI Kimi K2.5 for superior code generation
- Sign up at inference.cerebras.ai
- Uses GLM-4.7 with generous free tier and fast inference
Optional Services
Optional Services
Firecrawl - Web scraping for documentation
- Sign up at firecrawl.dev
- Sign up at sentry.io
- Sign up at autumncollective.com
Installation
Initialize Convex database
Start the Convex development server:This will:
- Deploy your database schema
- Generate TypeScript types
- Provide a development URL for
NEXT_PUBLIC_CONVEX_URL
Keep this terminal window open - Convex needs to run continuously
Start the Next.js development server
Verify Installation
Once all three servers are running, verify your setup:- Next.js server running at
http://localhost:3000 - Convex dashboard accessible (check terminal output for URL)
- Trigger.dev dashboard shows connected tasks
- Authentication redirects to Stack Auth sign-in page
Development Workflow
Running Development Servers
You need three terminal windows for full development:Hot Reload Behavior
- Frontend changes (
.tsx,.tsinsrc/): Instant hot reload - Convex functions (
.tsinconvex/): Auto-deploy on save - Trigger.dev tasks (
.tsintrigger/): Auto-reload on save - Environment variables: Requires server restart
Common Issues
Port 3000 already in use
Port 3000 already in use
Change the development port:
Convex authentication errors
Convex authentication errors
Ensure your Stack Auth configuration matches:
- Check
convex/auth.config.tshas correct project ID - Verify
NEXT_PUBLIC_STACK_PUBLISHABLE_KEYis set - Clear browser cookies and try again
Missing environment variables
Missing environment variables
If you see errors about missing environment variables:
- Copy
.env.exampleto.env.local - Fill in all required values
- Restart all development servers
Database schema mismatch
Database schema mismatch
If Convex shows schema errors:
Next Steps
Architecture
Understand the system design and data flow
Contributing
Learn how to contribute to Polaris
Custom Extensions
Build your own CodeMirror extensions
Deployment
Deploy Polaris to production