Skip to content

MERSEI/Vibe

Repository files navigation

# ⚑ Vibe IDE

AI-Powered Development Environment with real-time collaboration, agent orchestration, RAG pipeline, and full observability.

Vibe IDE React Liveblocks OpenTelemetry Gemini

✨ Features

🎨 Epic 1: IDE Core

  • Monaco Editor β€” Full VS Code editor with minimap, autocomplete, Ctrl+F, multi-cursor
  • CRDT Collaboration β€” Real-time text sync via Liveblocks + Yjs (open two tabs to try)
  • Live Preview β€” Sandpack-style JS sandbox with console output
  • File Tree β€” Hierarchical file browser
  • Editor Tabs β€” Multi-file editing
  • Theme Toggle β€” Dark/Light mode
  • i18n β€” English & Russian localization

πŸ€– Epic 2: Agent SDK

  • Gemini 2.0 Flash β€” Real AI responses via Google Gemini API (free tier)
  • Multi-Agent DAG β€” Visual DAG canvas with drag-and-drop nodes and connect mode
  • Parallel Execution β€” Topological sort + Promise.all() per level; true parallel agent runs with live status (blue/green/red)
  • Per-Agent API Keys β€” Provider selector (Gemini / OpenAI / Anthropic) + API key input per agent; bidirectional sync with agents/*.json files
  • File Context β€” Click Input node to attach project files as LLM context
  • Output Viewer β€” Click Output node after run to view results; save to AgentsOutputs/ folder with timestamp
  • 6 Templates β€” ChatBot, RAG-Search, Self-Healing CLI, Code Review, SQL Generator, API Designer

πŸ” Epic 3: RAG Pipeline

  • pgvector + Express Backend β€” Real PostgreSQL + pgvector backend with hybrid search. Falls back to mock data automatically if DB is not running
  • Chunking Strategies β€” Recursive, semantic, fixed-size
  • Hybrid Search β€” BM25 + vector + hybrid modes via hybrid_search() PostgreSQL function
  • Document Ingestion β€” POST /api/rag/ingest with Gemini text-embedding-004 (768 dims)

πŸ› Epic 4: Debugger

  • OpenTelemetry Tracing β€” Dual export: in-memory (DebugViewer) + Grafana Tempo (when configured)
  • Token Usage Charts β€” Cost and usage visualization
  • Event Bus Inspector β€” NATS WebSocket client with mock fallback. Shows "Live NATS" / "Mock" badge

πŸš€ Quick Start

git clone https://github.com/MERSEI/Vibe.git
cd Vibe
npm install

# Real CRDT collaboration (already configured):
# VITE_LIVEBLOCKS_PUBLIC_KEY is set in .env

# Real AI responses β€” get free key at https://aistudio.google.com/app/apikey
echo "VITE_GEMINI_API_KEY=AIza..." >> .env

# Grafana Tempo tracing (optional):
# VITE_GRAFANA_ENDPOINT=https://otlp-gateway-prod-eu-west-2.grafana.net/otlp
# VITE_GRAFANA_TOKEN=instanceId:apiKey

npm run dev
# Open in two browser tabs β€” CRDT text sync works out of the box
# Without Gemini key β€” realistic mock responses are used automatically

Real RAG (optional β€” requires Docker)

# 1. Start PostgreSQL with pgvector:
docker run -d --name pgvector -e POSTGRES_PASSWORD=secret -e POSTGRES_DB=vibe_rag -p 5432:5432 pgvector/pgvector:pg16

# 2. Apply schema:
psql postgresql://postgres:secret@localhost:5432/vibe_rag -f backend/schema.sql

# 3. Configure backend:
cp backend/.env.example backend/.env
# Edit backend/.env β€” set DATABASE_URL and GEMINI_API_KEY

# 4. Start backend:
cd backend && npm install && npm run dev   # port 3001

# RAG Playground will show "Connected" badge instead of "Mock mode"
# See docs/ROADMAP.md Phase 3 for Supabase/Neon alternatives

πŸ“ Project Structure

src/
β”œβ”€β”€ App.jsx                    # Main entry + ClerkProvider + RoomProvider
β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ anthropic/client.js   # Gemini API (free) with mock fallback
β”‚   β”œβ”€β”€ clerk/provider.jsx    # Clerk auth with mock fallback
β”‚   β”œβ”€β”€ rag/client.js         # RAG backend client (fetch + mock fallback)
β”‚   β”œβ”€β”€ nats/client.js        # NATS WebSocket client with mock fallback
β”‚   β”œβ”€β”€ liveblocks/config.jsx # Real Liveblocks (createRoomContext pattern)
β”‚   └── telemetry/tracer.js   # Real OpenTelemetry (dual: in-memory + Grafana)
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ editor/
β”‚   β”‚   β”œβ”€β”€ CodeEditor.jsx    # Monaco + Yjs CRDT sync
β”‚   β”‚   └── LivePreview.jsx   # JS sandbox executor
β”‚   β”œβ”€β”€ agents/               # AgentBuilder DAG (7 templates)
β”‚   β”œβ”€β”€ rag/                  # RAG Playground (connected to backend)
β”‚   └── debug/                # OTEL DebugViewer
β”œβ”€β”€ hooks/index.js             # useCollaborators (Liveblocks)
└── stores/index.js            # Zustand global state

backend/
β”œβ”€β”€ package.json               # Express + pg + pgvector
β”œβ”€β”€ schema.sql                 # PostgreSQL DDL (idempotent)
β”œβ”€β”€ index.js                   # Express server (port 3001)
β”œβ”€β”€ db.js                      # pg Pool
β”œβ”€β”€ embeddings.js              # Gemini text-embedding-004
└── routes/                    # health, search, ingest

πŸ› οΈ Tech Stack

Category Technology Status
Framework React 18 + Vite βœ… Live
Styling Tailwind CSS βœ… Live
State Zustand βœ… Live
Editor Monaco Editor (@monaco-editor/react) βœ… Live
Collaboration Liveblocks + Yjs CRDT βœ… Live
Tracing OpenTelemetry (in-memory + Grafana Tempo) βœ… Ready
AI Agents Gemini 2.0 Flash (free tier) βœ… Live
Vector DB pgvector + Express backend βœ… Ready (needs DB)
Event Bus NATS WebSocket (nats.ws) + mock fallback βœ… Ready (needs NATS)
Observability OTLP β†’ Grafana Tempo via Express proxy + in-memory βœ… Live
Auth Clerk (@clerk/clerk-react) + mock fallback βœ… Ready (needs Clerk key)

πŸ“‹ Roadmap

See ROADMAP.md for the full integration plan.

Next integrations (in priority order)

  1. Cursor-style inline completions β€” Ghost text in Monaco via registerInlineCompletionsProvider
  2. pgvector + PostgreSQL β€” Done! Backend + frontend code written. Connect your DB to activate (see ROADMAP Phase 3)
  3. NATS β€” Done! nats.ws client with mock fallback. Run Docker NATS to activate (see ROADMAP Phase 4)
  4. Grafana Cloud β€” Done! Dual OTLP export. Set VITE_GRAFANA_ENDPOINT + VITE_GRAFANA_TOKEN (see ROADMAP Phase 5)
  5. Clerk Auth β€” Done! ClerkProvider with mock fallback. Set VITE_CLERK_PUBLISHABLE_KEY to activate (see ROADMAP Phase 6)

⌨️ Keyboard Shortcuts

Shortcut Action
Cmd/Ctrl + S Save file
Cmd/Ctrl + R Run code
Cmd/Ctrl + / Toggle comment
Cmd/Ctrl + F Find in file
Cmd/Ctrl + P Quick open
Cmd/Ctrl + Shift + P Command palette

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes
  4. Push and open a Pull Request

πŸ“„ License

MIT License β€” see LICENSE for details.

About

🎡 AI-Powered Music Composition Platform β€’ Real-time NATS events β€’ Vercel deployment β€’ Interactive IDE impression demo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages