A lightweight, browser-based visual editor for designing system architectures through an intuitive drag-and-drop interface. Now with AI-powered chat assistance via Gemini and Supabase backend integration.
- π¨ Interactive Canvas - Zoomable and pannable drawing surface
- π¦ Component Library - 12 predefined system component types
- π Connection System - Draw edges between nodes
- βοΈ Node Configuration - Edit metadata through inspector panel
- πΎ Persistence - Save/load projects via Supabase (cloud) or localStorage (offline)
- π€ Export - Export diagrams as PNG images
- π€ AI Chat Assistant (Archie) - Modify diagrams using natural language via Gemini
This is now a monorepo with:
frontend/- React + TypeScript SPA (Vite)backend/- FastAPI server with Supabase + Gemini integration
- Node.js 18+ and npm
- Python 3.9+ and pip
- Supabase account and project
- Google Gemini API key
- Create a Supabase project at supabase.com
- Run the SQL schema in
SUPABASE_SCHEMA.sqlin your Supabase SQL editor - Get your Supabase URL and keys from Project Settings > API
- Navigate to backend directory:
cd backend- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create
.envfile inbackend/:
PORT=4000
SUPABASE_URL=your_supabase_url_here
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here
GOOGLE_GEMINI_API_KEY=your_gemini_api_key_here- Run the backend server:
uvicorn app.main:app --reload --port 4000The backend will be available at http://localhost:4000
- Navigate to frontend directory:
cd frontend- Install dependencies:
npm install- Create
.envfile infrontend/:
VITE_SUPABASE_URL=your_supabase_url_here
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key_here
VITE_BACKEND_URL=http://localhost:4000/api- Start the development server:
npm run devThe frontend will be available at http://localhost:5173
From the root directory:
# Install all dependencies
npm run install:all
# Run both frontend and backend
npm run devThis uses concurrently to run both servers simultaneously.
- Add Components: Drag components from the left sidebar onto the canvas
- Connect Nodes: Click and drag from a node's connection handle to another node
- Edit Properties: Click on a node to open the inspector panel on the right
- AI Chat: Use the chat panel to modify your diagram with natural language (e.g., "Add a database node", "Connect the API server to the database")
- Save Project: Projects are automatically synced to Supabase as you edit
- Export: Click "Export PNG" to download your diagram as an image
- Web Server
- Database
- Worker
- Cache
- Queue
- Storage
- Third-party API
- Compute Node
- Load Balancer
- Message Broker
- CDN
- Monitoring Service
The AI chat assistant can help you:
- Add nodes to your diagram
- Update node properties
- Create connections between nodes
- Delete nodes or edges
- Modify the overall diagram structure
Examples:
- "Add a Redis cache node"
- "Connect the web server to the database"
- "Delete the monitoring service node"
- "Update the database node name to 'PostgreSQL'"
/
βββ backend/
β βββ app/
β β βββ main.py # FastAPI app entry
β β βββ env.py # Environment config
β β βββ supabase_client.py # Supabase client
β β βββ routes/
β β βββ health.py # Health check endpoint
β β βββ chat.py # Gemini chat endpoint
β βββ requirements.txt
βββ frontend/
β βββ src/
β β βββ components/ # React components
β β βββ contexts/ # React contexts
β β βββ hooks/ # Custom hooks
β β β βββ useProjectId.ts # Supabase project ID management
β β β βββ useSupabaseDiagramSync.ts # Sync to Supabase
β β β βββ useChatWithGemini.ts # Chat with backend
β β βββ lib/
β β β βββ supabaseClient.ts # Supabase client
β β β βββ session.ts # Session management
β β βββ ...
β βββ package.json
βββ SUPABASE_SCHEMA.sql # Database schema
βββ package.json # Monorepo scripts
- React 18 - UI framework
- TypeScript - Type safety
- Vite - Build tool
- React Flow - Diagram engine
- TailwindCSS - Styling
- html2canvas - PNG export
- Supabase JS - Supabase client
- FastAPI - Python web framework
- Supabase Python - Database client
- Google Gemini - AI chat assistant
- Uvicorn - ASGI server
cd backend
uvicorn app.main:app --reload --port 4000cd frontend
npm run dev# Frontend
cd frontend
npm run build
# Backend
# Deploy using your preferred Python hosting (Render, Fly.io, etc.)PORT- Server port (default: 4000)SUPABASE_URL- Supabase project URLSUPABASE_SERVICE_ROLE_KEY- Supabase service role key (keep secret!)GOOGLE_GEMINI_API_KEY- Google Gemini API key (keep secret!)
VITE_SUPABASE_URL- Supabase project URLVITE_SUPABASE_ANON_KEY- Supabase anonymous key (safe for client)VITE_BACKEND_URL- Backend API URL (e.g.,http://localhost:4000/api)
MIT