System Architecture
Rapida is a Go-based microservices platform (module:github.com/rapidaai, Go 1.25). Services communicate over gRPC internally and expose REST and gRPC-web APIs via a shared Nginx gateway on port 8080. A single TCP port per service multiplexes HTTP/2 (gRPC), grpc-web, and HTTP/1.1 using cmux.
Service Responsibilities
document-api and opensearch are optional. They are only needed for knowledge base / RAG features. Voice assistants (STT/LLM/TTS) work fully without them.
Nginx Routing
The Nginx gateway at port 8080 routes requests based on the gRPC service path prefix:
Real-time audio connections use the WebSocket upgrade path. The browser SDK connects to ws://hostname:8080/talk_api.TalkService/AssistantTalk for bidirectional audio streaming.
Data Layer
PostgreSQL Databases
PostgreSQL 15 is the primary relational store. Each service owns a dedicated database. Theinit.sql initializes all required databases on first container start.
Theweb_dbis defined as the default database inPOSTGRES_DBin docker-compose and created automatically by the PostgreSQL image. The remaining three databases are created bydocker/postgres/init.sql.
Redis Databases
Redis 7 serves as the in-memory cache, session store, and job broker.OpenSearch Indices (Optional — Knowledge Base Only)
OpenSearch 2.11.1 handles full-text search and vector similarity search. It is only required when running with the knowledge base profile (make up-all-with-knowledge).
Data Flows
1. User Authentication
2. Voice Conversation
3. Inbound Phone Call (Twilio / Vonage)
4. SIP / Asterisk Connection
5. Document Upload and RAG Indexing
Communication Patterns
Synchronous
Asynchronous
Port Reference
Scaling
All application services are stateless and scale horizontally behind the Nginx load balancer.Next Steps
- Installation — Deploy locally with Docker Compose
- Configuration — Environment variable reference
- Services Overview — Per-service documentation