Skip to main content

Purpose

The web-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

Handles user registration, login, password recovery, OAuth 2.0, and JWT issuance.
Every resource in Rapida is scoped to an Organization → Project hierarchy. The web-api enforces this at the gRPC interceptor level.
The gRPC auth interceptor rejects any request where the JWT’s organization claim does not match the target resource’s organization_id.
Provider API keys are encrypted with AES-256-GCM before storage. The encryption key is derived from SECRET.
The web-api proxies all dashboard gRPC calls after JWT validation:
Migrations run automatically at service startup using golang-migrate. Migration files are in api/web-api/migrations/:
To run migrations manually:

Running


Health Endpoints


Troubleshooting

The most common cause is PostgreSQL not yet healthy.
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.
The target downstream service must be running and healthy. Verify INTEGRATION_HOST, ENDPOINT_HOST, ASSISTANT_HOST point to reachable addresses. Check make status to confirm all containers are Up.

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.