Every developer starts the same way. You have an idea. You open Cursor. You start prompting.
72 hours later you realize your database can't handle relational queries, your auth costs $500/mo at scale, and your AI pipeline has no queue so users stare at a spinner for 40 seconds.
The wrong architecture costs startups $50,000+ in rewrites. Every AI tool helps you write code faster. None of them ask if you should.
Preflight fixes that in 60 seconds.
Preflight is the world's first AI-powered architecture planning platform. It sits before your IDE and ensures every line of code is built on the right foundation.
|
Tell Preflight your idea in plain English |
AI asks smart follow-ups like a $400/hr architect |
Get a scored, linted, visual architecture |
One-click to Cursor, Claude Code, Lovable, or VS Code |
|
~3,000 lines of hand-scored TypeScript data. Every technology from SQLite to Kubernetes with 8-dimensional scores, real company usage data, cost estimates, maturity ratings, and best-for/avoid-when tags. 22 categories: Frontend, Backend, Database, Auth, AI/ML, Mobile, Desktop, Hosting, Payments, Messaging, Search, Monitoring, CI/CD, Storage, CMS, Realtime, Email, Testing, API Tools, Blockchain, Gaming, IoT |
Every technology scored across build speed, complexity, scalability, cost, ops burden, vendor lock-in, reliability, and AI-readiness. Weights shift based on your project constraints. A hackathon project and an enterprise app get genuinely different recommendations from the same catalog. |
||||||||||||
|
30+ lint rules catch real anti-patterns before they cost you weeks:
|
Tool-specific artifacts, not generic READMEs:
|
graph LR
A["💬 Describe Your Idea"] --> B["🔍 AI Asks Smart Questions"]
B --> C["🧩 Component Selection"]
C --> D["🏗️ Visual Architecture"]
D --> E["📊 Score & Lint"]
E --> F["🚀 Export to IDE"]
style A fill:#1a1a1c,stroke:#c9a84c,color:#fff
style B fill:#1a1a1c,stroke:#c9a84c,color:#fff
style C fill:#1a1a1c,stroke:#c9a84c,color:#fff
style D fill:#1a1a1c,stroke:#c9a84c,color:#fff
style E fill:#1a1a1c,stroke:#c9a84c,color:#fff
style F fill:#1a1a1c,stroke:#c9a84c,color:#fff
stateDiagram-v2
[*] --> UNDERSTAND: User describes idea
UNDERSTAND --> COMPONENT_SELECTION: Enough context gathered
COMPONENT_SELECTION --> CONFIRM: Components chosen
CONFIRM --> SANDBOX: Architecture finalized
SANDBOX --> EXPORT: User satisfied
SANDBOX --> COMPONENT_SELECTION: User wants changes
note right of UNDERSTAND
AI asks max 4 questions per turn
Extracts 8 required dimensions
end note
note right of SANDBOX
Visual canvas with scoring
30+ lint rules validated
end note
graph TB
subgraph CLIENT ["🖥️ Client (Next.js 15 + React 19)"]
UI["UI Layer<br/>shadcn/ui + Radix + Framer Motion"]
STATE["State<br/>Zustand + TanStack Query"]
CANVAS["Canvas<br/>React Flow"]
CHAT["Chat Interface<br/>Streaming + Claymorphism"]
end
subgraph CONVEX ["⚡ Convex Backend"]
QUERIES["Reactive Queries<br/>Real-time subscriptions"]
MUTATIONS["Mutations<br/>Transactional writes"]
ACTIONS["Actions<br/>AI + External APIs"]
CRONS["Scheduled Functions<br/>Async linting & scoring"]
DB["Database<br/>Type-safe schema"]
end
subgraph AI ["🧠 AI Engine"]
GPT["OpenAI GPT 5.2<br/>2,000+ word system prompt"]
SCORING["Scoring Engine<br/>8-dimension weighted formula"]
LINTER["Architecture Linter<br/>30+ anti-pattern rules"]
CATALOG["Tech Catalog<br/>229 components · 3,000 lines"]
end
subgraph EXPORT ["🚀 Export Targets"]
CURSOR["Cursor<br/>.cursorrules"]
CLAUDE["Claude Code<br/>CLAUDE.md"]
LOVABLE["Lovable<br/>LOVABLE_PROMPT.md"]
ANTIGRAVITY["Antigravity<br/>AGENT_DIRECTIVE.md"]
VSCODE["VS Code<br/>copilot-instructions.md"]
end
subgraph AUTH ["🔐 Auth"]
CLERK["Clerk<br/>JWT + OAuth + Orgs"]
end
UI --> STATE
STATE --> QUERIES
CHAT --> ACTIONS
CANVAS --> QUERIES
ACTIONS --> GPT
GPT --> SCORING
GPT --> LINTER
SCORING --> CATALOG
MUTATIONS --> DB
QUERIES --> DB
CRONS --> LINTER
CLERK --> CONVEX
STATE --> EXPORT
style CLIENT fill:#1a1a1c,stroke:#c9a84c,color:#fff
style CONVEX fill:#1a1a1c,stroke:#FF6F00,color:#fff
style AI fill:#1a1a1c,stroke:#412991,color:#fff
style EXPORT fill:#1a1a1c,stroke:#4ade80,color:#fff
style AUTH fill:#1a1a1c,stroke:#6C47FF,color:#fff
Every technology in our catalog is evaluated using a weighted multi-dimensional formula:
Score(t, p) = Σ(wᵢ(p) · sᵢ(t)) / Σ(wᵢ(p)) for i = 1..8
| Dimension | What It Measures | Scale |
|---|---|---|
| ⚡ Build Speed | How fast can you ship v1? | 1-10 |
| 🧩 Complexity | Learning curve + moving parts | 1-10 |
| 📈 Scalability | Handles 10x-100x growth? | 1-10 |
| 💰 Cost | Monthly cost at moderate usage | USD |
| 🔧 Ops Burden | Maintenance / DevOps effort | 1-10 |
| 🔒 Lock-in | Vendor dependency | 1-10 |
| 🛡️ Reliability | Uptime / fault tolerance | 1-10 |
| 🤖 AI-Readiness | Native AI/ML support | 1-10 |
📋 Example: How weights shift by project type
| Dimension | 🏃 Hackathon | 🏢 Enterprise | 🤖 AI Startup | 💰 SaaS |
|---|---|---|---|---|
| Build Speed | 3.0x | 0.5x | 2.0x | 1.5x |
| Complexity | 0.5x | 1.0x | 1.0x | 1.0x |
| Scalability | 0.3x | 3.0x | 2.0x | 2.5x |
| Cost | 2.0x | 0.5x | 1.5x | 1.0x |
| Ops Burden | 0.3x | 1.5x | 1.0x | 1.5x |
| Lock-in | 0.2x | 2.5x | 1.0x | 2.0x |
| Reliability | 0.5x | 3.0x | 1.5x | 2.5x |
| AI-Readiness | 1.0x | 0.5x | 3.0x | 1.0x |
preflight/
├── app/ # Next.js 15 App Router
│ ├── (auth)/ # Auth routes (Clerk)
│ ├── (dashboard)/ # Main app routes
│ │ ├── chat/ # Chat-first interface
│ │ ├── sandbox/ # Visual architecture canvas
│ │ └── export/ # IDE export page
│ ├── api/ # API routes
│ ├── layout.tsx # Root layout (fonts, providers)
│ └── globals.css # Tailwind + Claymorphism tokens
│
├── components/
│ ├── chat/ # Chat UI components
│ │ ├── ChatPage.tsx # Main chat container
│ │ ├── MessageBubble.tsx # User/AI message rendering
│ │ ├── ChatInput.tsx # Input with quick actions
│ │ ├── ComponentCard.tsx # Technology selection cards
│ │ ├── ComponentGrid.tsx # Grid layout for recommendations
│ │ └── TypingIndicator.tsx # AI thinking animation
│ │
│ ├── canvas/ # Architecture visualization
│ │ ├── ArchitectureCanvas.tsx # React Flow wrapper
│ │ ├── TechNode.tsx # Custom node component
│ │ ├── ScorePanel.tsx # Dimension score breakdown
│ │ └── LintPanel.tsx # Anti-pattern warnings
│ │
│ ├── export/ # IDE export generators
│ │ ├── CursorExport.tsx # .cursorrules generator
│ │ ├── ClaudeExport.tsx # CLAUDE.md generator
│ │ ├── LovableExport.tsx # Lovable prompt generator
│ │ └── ExportButton.tsx # One-click export UI
│ │
│ └── ui/ # shadcn/ui + Claymorphism
│ ├── button.tsx
│ ├── dialog.tsx
│ ├── dropdown.tsx
│ └── tooltip.tsx
│
├── convex/ # Convex backend
│ ├── schema.ts # Database schema (type-safe)
│ ├── chat.ts # Chat mutations & queries
│ ├── architecture.ts # Architecture CRUD
│ ├── scoring.ts # Scoring engine actions
│ ├── linter.ts # Lint rule engine
│ └── ai.ts # GPT 5.2 integration
│
├── lib/
│ ├── component-weights.ts # 229 technologies (3,000 lines)
│ ├── scoring-engine.ts # 8-dimension formula
│ ├── lint-rules.ts # 30+ architecture rules
│ ├── export-generators.ts # Tool-specific artifact gen
│ └── prompts/
│ └── system-prompt.ts # 2,000+ word architect prompt
│
├── public/
│ └── screenshots/ # App screenshots
│
├── tailwind.config.ts # Tailwind v4 + clay tokens
├── convex.config.ts # Convex configuration
├── next.config.ts # Next.js configuration
├── tsconfig.json # TypeScript strict mode
└── package.json
- Node.js 18+
- pnpm (recommended) or npm
- Convex account (convex.dev)
- Clerk account (clerk.com)
- OpenAI API key (platform.openai.com)
# Clone the repository
git clone https://github.com/yourusername/preflight.git
cd preflight
# Install dependencies
pnpm install
# Set up environment variables
cp .env.example .env.local# Convex
CONVEX_DEPLOYMENT=your-deployment
NEXT_PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
# Clerk
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxx
CLERK_SECRET_KEY=sk_live_xxxxx
# OpenAI
OPENAI_API_KEY=sk-xxxxx# Start Convex backend
pnpm convex dev
# Start Next.js frontend (in another terminal)
pnpm devOpen http://localhost:3000 and start planning.
| Status | Feature | Description |
|---|---|---|
| ✅ | Chat-First Interface | Conversational architecture discovery |
| ✅ | 229 Tech Catalog | 22 categories, 8-dimension scoring |
| ✅ | Architecture Linter | 30+ anti-pattern detection rules |
| ✅ | Visual Canvas | Interactive architecture graph |
| ✅ | One-Click Export | Cursor, Claude Code, Lovable, VS Code |
| ✅ | Claymorphism Design | Professional dark theme, gold accents |
| 🔜 | Stripe Subscriptions | Free + Pro tiers, launching in days |
| 🔮 | Agentic Builder | AI scaffolds entire codebase from architecture |
| 🔮 | Multi-LLM Council | Claude + GPT + Gemini debate your architecture |
| 🔮 | Architecture Marketplace | Share, fork, remix community templates |
Contributions make Preflight better. Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- 🆕 Add new technologies to the catalog (
lib/component-weights.ts) - 🔬 Write new lint rules (
lib/lint-rules.ts) - 🎨 Improve UI components
- 📖 Improve documentation
- 🐛 Fix bugs
Distributed under the MIT License. See LICENSE for details.
Have questions? Found a bug? Want to collaborate?