Overview
Polaris IDE can be run in two ways:- Cloud version: Use Polaris directly in your browser at polaris.dev
- Self-hosted: Clone and run locally for development or customization
Prerequisites
Before you begin, ensure you have:Node.js
Version 20.09 or higher
Package manager
npm, pnpm, or yarn
Git
For cloning the repository
API accounts
Stack Auth, Convex, AI providers
Check your Node.js version:
Required accounts
You’ll need to create accounts with these services:| Service | Purpose | Required | Free Tier |
|---|---|---|---|
| Stack Auth | Authentication & user management | Yes | Yes |
| Convex | Real-time database | Yes | Yes |
| Trigger.dev | Background jobs | Yes | Yes |
| OpenRouter | AI model routing (Kimi K2.5) | One of AI providers | No |
| Cerebras | Fast AI inference (GLM-4.7) | One of AI providers | Yes |
| Autumn | Subscription billing | Optional | Yes |
| Sentry | Error tracking | Optional | Yes |
| Firecrawl | Web scraping for AI | Optional | Yes |
You must configure at least one AI provider (OpenRouter or Cerebras). OpenRouter with Kimi K2.5 is recommended for best results.
Installation methods
- Web version
- Desktop (Electron)
Install for web development
Set up environment variables
Create a Edit
.env.local file in the root directory:.env.local with your API keys:.env.local
Start Convex development server
In one terminal window:Expected output:
Convex dev server watches for changes to
convex/ directory and hot-reloads functions automatically.Start Trigger.dev development server
In a second terminal window:Expected output:
Trigger.dev handles background jobs like AI message processing and file operations.
Open Polaris in your browser
Visit http://localhost:3000You should see the Polaris landing page. Click “Sign Up” to create your first account.
Configuration details
Stack Auth setup
- Create a project at stack-auth.com
- Enable GitHub OAuth provider:
- Go to Settings → OAuth Providers
- Enable GitHub
- Add callback URL:
http://localhost:3000/handler/oauth/callback
- Copy your API keys to
.env.local
Convex setup
- Create a project at convex.dev
- Run
npx convex devto link your local project - Convex will auto-generate
.env.localentries:
- Generate internal key for Inngest:
AI provider setup
Option 1: OpenRouter (Moonshot AI Kimi K2.5) - Recommended- Sign up at openrouter.ai
- Create an API key in Keys section
- Add to
.env.local:
- Get API key at inference.cerebras.ai
- Add to
.env.local:
Polaris will use OpenRouter (Kimi K2.5) as the primary model. Cerebras (GLM-4.7) is used as a fallback if OpenRouter is unavailable.
Autumn billing setup (Optional)
- Create account at autumn.dev
- Create two products:
- Pro Monthly ($29/mo)
- Pro Yearly ($290/yr)
- Add product IDs to
.env.local:
Database schema
Polaris uses Convex with the following tables:convex/schema.ts
Convex automatically creates indexes defined in
schema.ts. No manual database setup required.Scripts reference
All available npm scripts:package.json
Troubleshooting
Convex connection errors
Convex connection errors
Error:
ConvexError: Failed to connect to ConvexSolutions:- Check that
npx convex devis running - Verify
NEXT_PUBLIC_CONVEX_URLin.env.local - Run
npx convex dev --clearto reset local state - Check firewall settings (Convex uses WebSockets)
Stack Auth 401 errors
Stack Auth 401 errors
Error:
Unauthorized: Invalid Stack Auth tokenSolutions:- Verify both publishable and secret keys in
.env.local - Check Stack Auth dashboard for project status
- Ensure callback URLs match your environment:
- Development:
http://localhost:3000/handler/oauth/callback - Production:
https://yourdomain.com/handler/oauth/callback
- Development:
- Clear browser cookies and re-authenticate
AI suggestions not working
AI suggestions not working
Error:
Failed to fetch AI suggestionSolutions:- Verify at least one AI provider key is set:
ANTHROPIC_API_KEYORGOOGLE_GENERATIVE_AI_API_KEY
- Check API key validity in provider dashboard
- Verify network connectivity to API endpoints
- Check browser console for detailed error messages
Electron app won't start
Electron app won't start
Error:
Electron failed to startSolutions:- Ensure Next.js dev server is running first:
- Delete
dist-electron/and rebuild: - Check
electron/main/index.tsfor errors - Verify port 3000 is available (not used by another app)
Port already in use
Port already in use
Error:
Port 3000 is already in useSolutions:- Kill the process using port 3000:
macOS/LinuxWindows
- Or use a different port:
Module not found errors
Module not found errors
Error:
Cannot find module '@/components/ui/button'Solutions:- Delete
node_modules/and reinstall: - Check TypeScript paths in
tsconfig.json: - Restart your IDE/editor to reload TypeScript server
Next steps
Quick start guide
Create your first project with AI
Editor features
Learn keyboard shortcuts and advanced editing
Deploy to production
Host Polaris on Vercel or your own server
Contributing
Contribute to Polaris development