Raven
Overview
Python 3.13 ConnectRPC backend for the Raven desktop app
Raven is a Python 3.13 ConnectRPC service that powers the Raven desktop client
(apps/raven/). It speaks the Connect Protocol (JSON) over HTTP/2 and exposes
patient search, SSO, and related RPCs backed by Cloud Spanner.
Service profile
| Field | Value |
|---|---|
| Code | services/raven/ |
| Package | raven-service |
| Runtime | Python 3.13 (ConnectRPC/ASGI) |
| Status | Active |
| Primary owner | Akansh Divker |
| Secondary owner | None |
| Primary consumer | Raven desktop app |
| Protocol | Connect (JSON) over HTTP/2 |
Responsibilities
- Serve ConnectRPC APIs for the Raven desktop app.
- Perform patient search and related lookups in Spanner.
- Handle login and SSO flows for the Raven client.
- Stream search results for interactive UX in the desktop app.
Non-goals
- General-purpose public API surface.
- ETL ingestion or pipeline scheduling (handled by Stream/Handler).
Tech stack
- Python 3.13 +
connect-python(ConnectRPC) on ASGI. - Granian ASGI server with HTTP/2 (h2c) support.
- Cloud Spanner via the shared async Spanner client.
- Firebase Admin for ID token verification + custom token minting.
- Bubble APIs via
httpxwith retry/backoff. - Microsoft OIDC validation via
pyjwt+ JWKS discovery. - Structured logging via
common.logging_utils.
Code entrypoints
services/raven/main.py: ASGI entrypoint + lifespan orchestration.services/raven/core/runtime.py: ConnectRPC handler wiring + lifecycle.services/raven/core/engine.py: search orchestration and ranking.services/raven/core/repository.py: Spanner SQL + index hints.services/raven/core/sso_service.py: Microsoft SSO validation and login.services/raven/core/pet_benefits.py: pet benefits aggregation.
Dependencies
- Upstream: Raven desktop app.
- Downstream: Cloud Spanner; Bubble APIs; Firebase Admin.
- External: Secret Manager; Microsoft OIDC.
Related pages
Last updated on