Purpose
Theweb-api is the primary API backend for the Rapida dashboard. Every request from the browser — authentication, organization setup, assistant management, credential storage — goes through this service. It also acts as the gRPC proxy for downstream services, validating JWT tokens before forwarding requests.
Port
9001 — HTTP · gRPC · gRPC-web (cmux)Language
Go 1.25
Gin (REST) + gRPC
Storage
PostgreSQL
web_db
Redis (session cache)Request Flow
Core Components
Authentication & Session Management
Authentication & Session Management
Handles user registration, login, password recovery, OAuth 2.0, and JWT issuance.
Organization & Project Hierarchy
Organization & Project Hierarchy
Every resource in Rapida is scoped to an The gRPC auth interceptor rejects any request where the JWT’s organization claim does not match the target resource’s
Organization → Project hierarchy. The web-api enforces this at the gRPC interceptor level.organization_id.Credential Vault
Credential Vault
Provider API keys are encrypted with AES-256-GCM before storage. The encryption key is derived from
SECRET.gRPC Proxy Routing
gRPC Proxy Routing
The web-api proxies all dashboard gRPC calls after JWT validation:
Database Migrations
Database Migrations
Migrations run automatically at service startup using golang-migrate. Migration files are in To run migrations manually:
api/web-api/migrations/:Running
- Docker Compose
- From Source
Health Endpoints
Troubleshooting
Service exits immediately on startup
Service exits immediately on startup
The most common cause is PostgreSQL not yet healthy.
JWT validation fails across services
JWT validation fails across services
All services must share the same secret value. Confirm
secret is identical in docker/web-api/web.yml, docker/assistant-api/assistant.yml, docker/integration-api/integration.yml, and docker/endpoint-api/endpoint.yml.Next Steps
Configuration
All environment variables and internal service addresses.
Assistant API
Voice orchestration service that web-api proxies to.
Integration API
Provider credential management.
Architecture
Full system topology and routing.