https://github.com/itssanthoshhere/ghost-arc
๐ป AI-powered collaborative architecture design platform with real-time multiplayer canvas, Gemini AI agents, Liveblocks sync, and automated technical spec generation.
https://github.com/itssanthoshhere/ghost-arc
architecture-diagram collaborative-editor fullstack liveblocks postgresql prisma realtime-collaboration system-design triggerdev
Last synced: 2 days ago
JSON representation
๐ป AI-powered collaborative architecture design platform with real-time multiplayer canvas, Gemini AI agents, Liveblocks sync, and automated technical spec generation.
- Host: GitHub
- URL: https://github.com/itssanthoshhere/ghost-arc
- Owner: Itssanthoshhere
- Created: 2026-05-10T19:32:11.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-13T16:42:42.000Z (about 2 months ago)
- Last Synced: 2026-05-30T19:21:46.962Z (about 1 month ago)
- Topics: architecture-diagram, collaborative-editor, fullstack, liveblocks, postgresql, prisma, realtime-collaboration, system-design, triggerdev
- Language: TypeScript
- Homepage: https://ghost-ai-zeta-seven.vercel.app/
- Size: 1.61 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Agents: AGENTS.md
Awesome Lists containing this project
README

# ๐ป Ghost Arc
### AI-Powered Collaborative System Architecture Platform
> Design scalable software systems with AI, collaborate in real-time, and generate production-ready technical specifications instantly.

---
# ๐ Table of Contents
- [๐ About The Project](#-about-the-project)
- [โจ Features](#-features)
- [๐ง How It Works](#-how-it-works)
- [๐๏ธ Architecture](#๏ธ-architecture)
- [โ๏ธ Tech Stack](#๏ธ-tech-stack)
- [๐ Project Structure](#-project-structure)
- [๐ Getting Started](#-getting-started)
- [๐ Environment Variables](#-environment-variables)
- [๐ฏ Core AI Workflow](#-core-ai-workflow)
- [โก Performance Optimizations](#-performance-optimizations)
- [๐งช Future Improvements](#-future-improvements)
- [๐ค Contributing](#-contributing)
- [๐จโ๐ป Author](#-author)
---
# ๐ About The Project
**Ghost Arc** is an AI-powered collaborative architecture design platform that helps developers and software teams generate scalable system designs using natural language.
Instead of manually drawing architecture diagrams and writing lengthy technical documentation, users can simply describe a system like:
Design a scalable e-commerce backend with authentication,
payment gateway, Redis caching, and microservices
Ghost Arc uses **Google Gemini AI** to autonomously generate architecture nodes and connections on a collaborative React Flow canvas in real time.
Multiple users can join the same workspace, edit diagrams together, and generate production-ready technical specifications instantly.
---
## ๐ฏ Problem It Solves
Modern software teams often struggle with:
- Manual architecture diagram creation
- Outdated technical documentation
- Slow collaboration workflows
- Repetitive system design discussions
- Poor visibility into architectural decisions
Ghost Arc solves this by combining:
- ๐ค AI-generated architecture planning
- โก Real-time multiplayer collaboration
- ๐ง AI-generated technical documentation
- ๐ฆ Persistent project management
- ๐ Live synchronization across users
---
# โจ Features
## ๐ค AI Architecture Agent
Describe your system in plain English and let Gemini AI generate architecture diagrams automatically.
---
## ๐ฅ Multiplayer Collaboration
Real-time shared canvas powered by Liveblocks:
- Live cursors
- Presence indicators
- Shared canvas state
- Synchronized editing
---
## ๐ง AI Technical Specification Generator
Generate multi-page Markdown technical specifications directly from the architecture graph.
Includes:
- System overview
- Database design
- API architecture
- Deployment recommendations
- Scalability notes
---
## ๐จ Interactive React Flow Canvas
Supports:
- Drag & drop nodes
- Resizable components
- Custom node styling
- Dynamic edges
- Inline editing
- Color customization
---
## ๐พ Persistent Project Storage
Projects are stored using:
- PostgreSQL (metadata)
- Blob storage (spec files)
- JSON canvas persistence
---
## ๐ Authentication & Access Control
Secure authentication powered by Clerk:
- Sign in / Sign up
- Protected routes
- Session handling
- User-based project access
---
## โก Background AI Workflows
Long-running AI tasks handled by Trigger.dev:
- AI architecture generation
- Spec generation
- Retry handling
- Workflow orchestration
---
# ๐ง How It Works
## AI Architecture Generation Flow
```text
User Prompt
โ
Trigger.dev Background Task
โ
Gemini AI Tool Calling
โ
Structured Architecture Actions
โ
Liveblocks Storage Mutation
โ
Realtime Canvas Update
```
---
## Technical Specification Flow
```text
Canvas Graph
โ
Context Builder
โ
Gemini AI
โ
Markdown Generation
โ
Blob Storage Upload
โ
Downloadable Technical Spec
```
---
# ๐๏ธ Architecture
```text
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Frontend โ
โ Next.js + React + React Flow โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ API Layer โ
โ Next.js Route Handlers โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Background Workflows โ
โ Trigger.dev โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AI Processing โ
โ Google Gemini Models โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Realtime Collaboration โ
โ Liveblocks โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Persistence โ
โ PostgreSQL + Prisma + Blob Storage โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
---
# โ๏ธ Tech Stack
| Category | Technology | Purpose |
| --------------- | -------------- | ------------------------------- |
| Frontend | Next.js 16 | Full-stack React framework |
| UI | React 19 | Component-based architecture |
| Language | TypeScript | Type safety |
| Styling | TailwindCSS v4 | Utility-first styling |
| Realtime | Liveblocks | Multiplayer collaboration |
| Authentication | Clerk | Auth & user management |
| Database | PostgreSQL | Persistent storage |
| ORM | Prisma | Database modeling |
| AI | Google Gemini | AI architecture generation |
| Background Jobs | Trigger.dev | Async AI workflows |
| Flow Editor | React Flow | Interactive architecture canvas |
| Deployment | Vercel | Hosting platform |
---
# ๐ Project Structure
```bash
Ghost-Arc/
โ
โโโ app/
โ โโโ api/ # API route handlers
โ โโโ editor/ # Collaborative editor pages
โ โโโ sign-in/ # Clerk auth pages
โ โโโ sign-up/
โ
โโโ components/
โ โโโ editor/ # Canvas/editor components
โ โโโ ui/ # Reusable UI primitives
โ
โโโ hooks/ # Custom React hooks
โ
โโโ lib/
โ โโโ ai/ # Gemini AI logic
โ โโโ liveblocks/ # Liveblocks config
โ โโโ prisma/ # Prisma client
โ โโโ utils/
โ
โโโ prisma/
โ โโโ schema.prisma
โ โโโ migrations/
โ
โโโ trigger/
โ โโโ design-agent.ts # AI architecture generation
โ โโโ generate-spec.ts # AI spec generation
โ
โโโ data/
โ โโโ canvas/
โ โโโ specs/
โ
โโโ types/
```
---
# ๐ Getting Started
## Prerequisites
Make sure you have installed:
- Node.js >= 18
- npm
- PostgreSQL
- Git
---
## 1. Clone Repository
```bash
git clone https://github.com/Itssanthoshhere/Ghost-Arc.git
cd Ghost-Arc
```
---
## 2. Install Dependencies
```bash
npm install
```
---
## 3. Setup Environment Variables
Create a `.env.local` file in the root directory.
---
# ๐ Environment Variables
```env
# Clerk
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
โโโโโโโโโโโโโโโโโโโโ
# Liveblocks
NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY=
LIVEBLOCKS_SECRET_KEY=
โโโโโโโโโโโโโโโโโโโโ
# Trigger.dev
TRIGGER_PROJECT_REF=
TRIGGER_SECRET_KEY=
โโโโโโโโโโโโโโโโโโโโ
# Database
DATABASE_URL=
โโโโโโโโโโโโโโโโโโโโ
# Blob Storage
BLOB_READ_WRITE_TOKEN=
โโโโโโโโโโโโโโโโโโโโ
# Google AI
GOOGLE_AI_API_KEY=
# Optional
GEMINI_MODEL=
GEMINI_SPEC_MODEL=
โโโโโโโโโโโโโโโโโโโโ
APP_URL=http://localhost:3000
```
---
## 4. Setup Prisma
```bash
npx prisma generate
npx prisma migrate dev
```
---
## 5. Run Development Server
```bash
npm run dev
```
Open:
```txt
http://localhost:3000
```
---
## 6. Start Trigger.dev Worker
Open a second terminal:
```bash
npx trigger.dev@latest dev
```
---
# ๐ฏ Core AI Workflow
## Step 1 โ User Prompt
User submits a natural language architecture request.
Example:
```txt
Build a scalable SaaS backend with Redis,
PostgreSQL, authentication, and microservices
```
---
## Step 2 โ Trigger.dev Background Task
A long-running background workflow is triggered.
---
## Step 3 โ Gemini AI Tool Calling
Gemini AI receives:
- system prompts
- canvas context
- available architecture tools
AI generates structured actions like:
```json
{
"tool": "addNode",
"input": {
"label": "API Gateway"
}
}
```
---
## Step 4 โ Liveblocks Sync
Canvas state updates are broadcast in real time to all connected users.
---
## Step 5 โ Technical Spec Generation
The final architecture graph is transformed into a detailed Markdown technical document.
---
# โก Performance Optimizations
- Debounced canvas auto-save
- Background AI workflows
- Blob-based specification storage
- Incremental realtime updates
- Shared collaborative state synchronization
- Optimized React Flow rendering
---
# ๐งช Future Improvements
- [ ] AI diff previews before applying changes
- [ ] Canvas version history
- [ ] Multiplayer commenting
- [ ] Voice-based architecture generation
- [ ] AI architecture recommendations
- [ ] Dockerized deployment
- [ ] Kubernetes deployment templates
- [ ] Testing suite (Vitest + Playwright)
- [ ] Prompt injection protection
- [ ] Rate limiting & abuse prevention
---
# ๐ค Contributing
Contributions are welcome!
## Steps
```bash
1. Fork the repository
2. Create your feature branch
3. Commit your changes
4. Push to GitHub
5. Open a Pull Request
```
---
# ๐จโ๐ป Author
## V S Santhosh
- ๐ Portfolio: [https://santhosh-vs-portfolio.vercel.app](https://santhosh-vs-portfolio.vercel.app)
- ๐ผ LinkedIn: [https://linkedin.com/in/thesanthoshvs](https://linkedin.com/in/thesanthoshvs)
- ๐ GitHub: [https://github.com/Itssanthoshhere](https://github.com/Itssanthoshhere)
---
# ๐ License
This project is licensed under the MIT License.
---
### โญ If you found this project interesting, consider giving it a star!
Built with โค๏ธ by Itssanthoshhere
---