Type a natural language system description (e.g., "Design Netflix") → AutoArchitect generates:
- 📐 Architecture Diagram (Mermaid flowchart): services, queues, caches, DBs, CDN
- 🗄️ Database Schema (SQL DDL): normalized tables with indexes and relationships
- 📈 Scaling Plan: load balancing, replication, caching, bottleneck analysis
- 🔌 API Structure (JSON/OpenAPI): endpoints, request/response schemas, auth, rate limits
- Frontend: React + Next.js + TypeScript + Tailwind CSS
- Backend: Next.js API Routes
- LLM: Google Gemini Pro (FREE, 60 requests/min)
- Visualization: Mermaid.js for diagrams
- Deployment: Vercel (free)
- Node.js 18+ (install from https://nodejs.org)
- Google Gemini API Key (free from https://aistudio.google.com/app/apikey)
-
Clone/Navigate to project:
cd /Users/utkarsh/Aya_Hackthon_project -
Install dependencies:
npm install
-
Set up environment variables: Create a
.env.localfile in the project root:GOOGLE_GENERATIVE_AI_KEY=your-api-key-here -
Run dev server:
npm run dev
Open http://localhost:3000 in your browser.
-
Build for production:
npm run build npm start
- Open http://localhost:3000
- Type a system description (e.g., "Design a real-time collaborative document editor like Google Docs")
- Click Generate Design
- View and download:
- Architecture diagram (Mermaid syntax)
- Database schema (SQL)
- Scaling plan (text)
- API endpoints (JSON)
.
├── app/
│ ├── api/generate/route.ts # OpenAI integration + generation logic
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Main UI
│ └── styles/globals.css # Tailwind + custom styles
├── components/
│ ├── MermaidDiagram.tsx # Diagram renderer
│ ├── CodeBlock.tsx # Code syntax highlighting
│ └── OutputPanel.tsx # Tab-based output display
├── package.json
├── tsconfig.json
├── next.config.js
├── tailwind.config.js
└── README.md
# Install dependencies
npm install
# Set OPENAI_API_KEY environment variable
export OPENAI_API_KEY=sk-...
# Run local development server
npm run dev
# Build for production
npm run build
# Start production server
npm start✅ Natural language input
✅ Parallel LLM calls for 4 output types
✅ Mermaid diagram rendering
✅ SQL schema generation
✅ API structure in JSON
✅ Scaling plan text
✅ Download individual outputs
✅ Responsive design
✅ Error handling & loading states