Skip to main content

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
Key Features:
  • JWT-based authentication
  • Role-based access control (RBAC)
  • Workspace isolation
  • Multi-tenancy support
Database: web_db in PostgreSQL Key Tables:
  • users - User accounts
  • organizations - Organization data
  • workspaces - Workspace boundaries
  • projects - Voice AI projects
  • credentials - Stored API keys (encrypted)
  • api_keys - Service-to-service authentication
Environment Variables:
Health Check:
Common Operations:
  • 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
Key Features:
  • 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
Database: assistant_db in PostgreSQL Search Engine: OpenSearch (for conversation search and analytics) Key Tables:
  • assistants - Assistant configurations
  • assistant_versions - Version management
  • conversations - Conversation metadata
  • messages - Individual messages in conversations
  • audio_files - Stored audio recordings
  • conversation_analysis - Call analytics data
OpenSearch Indices:
  • assistant-conversations - Searchable conversation content
  • conversation-metrics - Call duration, quality metrics
  • assistant-analytics - Agent performance data
Environment Variables:
Supported LLMs:
  • OpenAI (GPT-4, GPT-3.5)
  • Anthropic Claude
  • Google Gemini, Vertex AI
  • Cohere
  • Azure OpenAI
  • AWS Bedrock
  • Mistral
  • HuggingFace
Supported STT Providers:
  • Google Cloud Speech-to-Text
  • Azure Cognitive Services
  • Deepgram
  • AssemblyAI
  • Cartesia
  • Sarvam AI
Supported TTS Providers:
  • Google Cloud Text-to-Speech
  • Azure Cognitive Services
  • ElevenLabs
  • Deepgram
  • Cartesia
  • Sarvam AI
Health Check:
Common Operations:
  • 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
Key Features:
  • End-to-end credential encryption
  • OAuth 2.0 support
  • Provider health monitoring
  • Integration templates
  • Credential rotation support
Database: integration_db in PostgreSQL Key Tables:
  • integrations - Integration configurations
  • providers - Provider definitions
  • credentials - Encrypted API keys and tokens
  • oauth_tokens - OAuth session tokens
  • oauth_providers - OAuth configuration
Environment Variables:
Supported Integrations: Health Check:
Common Operations:
  • 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
Key Features:
  • Multiple webhook events
  • Automatic retry with exponential backoff
  • Event filtering by type
  • Webhook testing
  • Event history and replay
Database: endpoint_db in PostgreSQL Key Tables:
  • webhooks - Webhook configurations
  • webhook_events - Event definitions
  • webhook_deliveries - Delivery history
  • webhook_logs - Detailed delivery logs
Environment Variables:
Webhook Events:
  • conversation.started - New conversation initiated
  • conversation.ended - Conversation completed
  • message.sent - Message sent by assistant
  • message.received - Message received from user
  • assistant.updated - Assistant configuration changed
  • assistant.deleted - Assistant removed
  • error.occurred - Error in conversation
Health Check:
Common Operations:
  • 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.
Responsibilities:
  • Document upload and processing
  • Text extraction and chunking
  • Semantic embeddings generation
  • Vector search
  • Knowledge base organization
  • Audio noise reduction (RNNoise)
  • Entity extraction and tagging
Key Features:
  • 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
Technology: Python, FastAPI, Celery, SQLAlchemy Database: PostgreSQL + OpenSearch Key Tables:
  • documents - Document metadata
  • chunks - Text chunks from documents
  • embeddings - Vector embeddings for search
  • knowledge_bases - Knowledge collections
  • document_processing_jobs - Background job tracking
OpenSearch Indices:
  • documents-* - Full-text searchable documents
  • embeddings-* - Vector embeddings for similarity search
Environment Variables:
Supported File Types: Audio Processing: RNNoise (Recurrent Neural Network Noise Suppression) is included for noise reduction in audio documents.
Health Check:
Common Operations:
  • 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
Responsibilities:
  • Assistant management interface
  • Conversation viewing and analysis
  • Knowledge base management
  • Credential configuration
  • Analytics and reporting
  • User settings and preferences
  • Webhook configuration
Environment Variables (in .env):
Build Commands:

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
Configuration: /nginx/nginx.conf Default Routes: Health Check:

Infrastructure Services

PostgreSQL (Port 5432)

Purpose: Primary relational database for all services Databases: Connection Details:
Connection Command:

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
Database Slots: Connection Command:
Common Commands:

OpenSearch (Port 9200)

Purpose: Full-text search and analytics engine Indices: Health Check:
Common Operations:

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

  1. Configuration - Configure each service
  2. Installation - Deploy Rapida
  3. Troubleshooting - Fix common issues