A distributed, microservices-based platform enabling real-time team collaboration with an integrated, context-aware AI Assistant. This system utilizes a Retrieval-Augmented Generation (RAG) pipeline to ground AI responses in private project data and conversation history.
The platform is built on a Polyglot Microservices Architecture, separating real-time traffic handling from heavy AI inference tasks.
-
User Service (Go)
- Manages identity
- JWT-based authentication
- Persistent group (room) membership
-
Collaboration Service (Go)
- Handles high-concurrency WebSocket connections using a custom Hub pattern
- Manages room namespacing
- Persists chat history to PostgreSQL
-
LLM Orchestrator (Go)
- Acts as the system "brain"
- Coordinates RAG retrieval
- Assembles augmented prompts
- Manages asynchronous events via Redis
-
LLM Inference Service (Python)
- Hosts a gRPC server
- Performs semantic embedding (Sentence-Transformers)
- Streams responses from Google Gemini 1.5 Flash
- Nginx – API Gateway and WebSocket reverse proxy
- Redis – Low-latency Pub/Sub for real-time AI token streaming
- Apache Kafka – Durable event log for background AI processing
- PostgreSQL + pgvector – Relational + vector database for hybrid storage
-
Real-Time Messaging
- Bi-directional communication with near zero latency
-
Namespaced Rooms
- Multi-tenant isolation (e.g.,
#science,#dev)
- Multi-tenant isolation (e.g.,
-
Persistent Groups
- Password-protected rooms
- Join once → access forever
-
Hybrid Context Awareness
- Chat history (PostgreSQL)
- Documents (pgvector embeddings)
-
Streaming Responses
- Token-by-token delivery via WebSockets
- Real-time typing effect
-
Passive AI Observation
- Kafka-based background worker
- Generates automatic Room Snapshots (TL;DRs) every 10 messages
-
Live Training
- Users can teach the AI directly from UI
-
Document Ingestion
- Supports PDF & TXT uploads
-
Smart Chunking with Overlap
- Prevents context loss during embedding
- Private AI chat interface
- Ask questions about room context
- Keeps main chat clean and focused
- Go (Golang)
- Python
- React
- Vite
- Tailwind CSS v4
- Lucide Icons
- gRPC
- Protobuf
- WebSockets
- Redis Pub/Sub
- Apache Kafka
- PostgreSQL (pgvector)
- Redis (Caching)
- Docker
- Docker Compose
- Nginx
- Docker & Docker Compose
- Google Gemini API Key
git clone https://github.com/yourusername/ai-collab-system.git
cd ai-collab-systemCreate a .env file in the root directory:
GEMINI_API_KEY=your_actual_key_here
DB_DSN=postgres://admin:secretpassword@postgres:5432/collab_db?sslmode=disable
REDIS_ADDR=redis:6379
KAFKA_ADDR=kafka:9092docker-compose up -d --build-
Frontend (via Nginx):
http://localhost:8080 -
Or your Vite dev server port
-
Cross-Language Integration
- Bridging Go & Python via gRPC
- Combines performance (Go) with ML ecosystem (Python)
-
Event-Driven Design
- Redis & Kafka for decoupling services
- Keeps UI responsive during heavy AI tasks
-
Vector Search
- Semantic retrieval using pgvector
- Solves the "small context window" limitation of LLMs
- Role-based access control (RBAC)
- Multi-modal document ingestion (images, audio)
- Fine-tuned local LLM support
- Advanced analytics dashboard