Services Overview
Rapida consists of multiple microservices, each with specific responsibilities. This guide explains each service in detail.Architecture at a Glance
document-api is optional. It is only needed for knowledge base / RAG features. Start it with
make up-all-with-knowledge. The core voice assistant services work without it.Infrastructure Services
Core Services
web-api (Port 9001)
Purpose: Core platform orchestration and management backend Responsibilities:- User authentication and authorization
- Organization and workspace management
- Project management
- Credential management
- API rate limiting
- Dashboard API endpoints
- Configuration management
- JWT-based authentication
- Role-based access control (RBAC)
- Workspace isolation
- Multi-tenancy support
web_db in PostgreSQL
Key Tables:
users- User accountsorganizations- Organization dataworkspaces- Workspace boundariesprojects- Voice AI projectscredentials- Stored API keys (encrypted)api_keys- Service-to-service authentication
- User management
- Organization settings
- API key generation
- Credential storage (encrypted)
assistant-api (Port 9007)
Purpose: Voice agent and real-time conversation management Responsibilities:- Create and manage voice assistants
- Handle real-time voice conversations
- Audio streaming and processing
- LLM integration and inference
- Speech-to-Text (STT) orchestration
- Text-to-Speech (TTS) orchestration
- Voice activity detection (VAD)
- Conversation persistence and search
- Real-time WebSocket communication
- Low-latency audio streaming
- Voice activity detection (stops listening for silence)
- Multiple LLM provider support
- Conversation analytics
- Full conversation history with search
assistant_db in PostgreSQL
Search Engine: OpenSearch (for conversation search and analytics)
Key Tables:
assistants- Assistant configurationsassistant_versions- Version managementconversations- Conversation metadatamessages- Individual messages in conversationsaudio_files- Stored audio recordingsconversation_analysis- Call analytics data
assistant-conversations- Searchable conversation contentconversation-metrics- Call duration, quality metricsassistant-analytics- Agent performance data
- OpenAI (GPT-4, GPT-3.5)
- Anthropic Claude
- Google Gemini, Vertex AI
- Cohere
- Azure OpenAI
- AWS Bedrock
- Mistral
- HuggingFace
- Google Cloud Speech-to-Text
- Azure Cognitive Services
- Deepgram
- AssemblyAI
- Cartesia
- Sarvam AI
- Google Cloud Text-to-Speech
- Azure Cognitive Services
- ElevenLabs
- Deepgram
- Cartesia
- Sarvam AI
- Create voice assistants
- Start/manage conversations
- Query conversation history
- Update assistant configuration
integration-api (Port 9004)
Purpose: Third-party service integration and credential management Responsibilities:- Store and manage API credentials securely
- Handle OAuth authentication flows
- Integration configuration
- Provider validation and health checks
- Encryption/decryption of sensitive data
- Integration marketplace
- End-to-end credential encryption
- OAuth 2.0 support
- Provider health monitoring
- Integration templates
- Credential rotation support
integration_db in PostgreSQL
Key Tables:
integrations- Integration configurationsproviders- Provider definitionscredentials- Encrypted API keys and tokensoauth_tokens- OAuth session tokensoauth_providers- OAuth configuration
Health Check:
- Store API credentials
- Test provider connections
- List available providers
- Update credential permissions
endpoint-api (Port 9005)
Purpose: Webhook and callback management Responsibilities:- Webhook configuration and delivery
- Callback handling for external events
- Event routing and filtering
- Retry logic and failure handling
- Webhook signature verification
- Event logging
- Multiple webhook events
- Automatic retry with exponential backoff
- Event filtering by type
- Webhook testing
- Event history and replay
endpoint_db in PostgreSQL
Key Tables:
webhooks- Webhook configurationswebhook_events- Event definitionswebhook_deliveries- Delivery historywebhook_logs- Detailed delivery logs
conversation.started- New conversation initiatedconversation.ended- Conversation completedmessage.sent- Message sent by assistantmessage.received- Message received from userassistant.updated- Assistant configuration changedassistant.deleted- Assistant removederror.occurred- Error in conversation
- Register webhooks
- Test webhook deliveries
- View delivery history
- Replay failed events
document-api (Port 9010) — Optional
Purpose: Knowledge base management and RAG (Retrieval Augmented Generation)This service is optional. It is only required if you want to use the knowledge base / RAG features. To start it, use
make up-all-with-knowledge. Voice assistants work fully without it.- Document upload and processing
- Text extraction and chunking
- Semantic embeddings generation
- Vector search
- Knowledge base organization
- Audio noise reduction (RNNoise)
- Entity extraction and tagging
- Multiple file format support (PDF, DOCX, XLSX, CSV, MD, HTML)
- Automatic text chunking with overlap
- Semantic search via embeddings
- Knowledge organization by collections
- Audio processing with noise reduction
- Metadata extraction
documents- Document metadatachunks- Text chunks from documentsembeddings- Vector embeddings for searchknowledge_bases- Knowledge collectionsdocument_processing_jobs- Background job tracking
documents-*- Full-text searchable documentsembeddings-*- Vector embeddings for similarity search
Audio Processing:
RNNoise (Recurrent Neural Network Noise Suppression) is included for noise reduction in audio documents.
- Upload documents
- Organize knowledge bases
- Search documents
- Process audio files
- Extract entities
Frontend Service
ui (Port 3000)
Purpose: Web dashboard for managing Rapida platform Technology: React, TypeScript, Tailwind CSS Key Features:- Responsive design
- Real-time updates via WebSocket
- Dark/light theme support
- Mobile-friendly
- Offline support
- Assistant management interface
- Conversation viewing and analysis
- Knowledge base management
- Credential configuration
- Analytics and reporting
- User settings and preferences
- Webhook configuration
.env):
API Gateway
nginx (Port 8080)
Purpose: Reverse proxy, load balancing, and request routing Responsibilities:- Route requests to appropriate services
- Load balancing across services
- SSL/TLS termination (when configured)
- Request/response compression
- Static file serving (UI)
- Rate limiting
- CORS handling
/nginx/nginx.conf
Default Routes:
Health Check:
Infrastructure Services
PostgreSQL (Port 5432)
Purpose: Primary relational database for all services Databases:
Connection Details:
Redis (Port 6379)
Purpose: In-memory cache and message queue Uses:- Session caching
- Rate limiting
- API response caching
- Job queue for background tasks
- Real-time data caching
- Pub/Sub for real-time updates
Connection Command:
OpenSearch (Port 9200)
Purpose: Full-text search and analytics engine Indices:
Health Check:
Service Dependencies
Service Interaction Flow
1. User Authentication Flow
2. Create Voice Agent Flow
3. Start Conversation Flow
4. Upload Document Flow
Scaling & Load Balancing
Each service can be scaled independently:Next Steps
- Configuration - Configure each service
- Installation - Deploy Rapida
- Troubleshooting - Fix common issues