Nest Engineering Docs
Raven

Interfaces

Inbound and outbound contracts for Raven

Protocol

  • Connect Protocol (JSON) over HTTP/2.
  • RPC routes follow the Connect pattern: /raven.raven.v1.RavenService/{Method}.
  • Content-Type: application/json (Connect JSON).

Service definition

proto/raven/raven/v1/raven.proto

RPC catalog

RPCDirectionAuthNotes
SearchPatientsUnaryRequiredPatient search by query
GetPetBenefitsUnaryRequiredPet benefits lookup
StreamPatientSearchBidi streamRequiredInteractive search streaming
LoginUnaryPublicBubble login + Firebase token
SSOUnaryPublicSSO status lookup
SSOLoginUnaryPublicSSO token validation + login

Authentication

  • RPCs use Connect interceptors for auth and user claim enrichment.
  • Login and SSO flows integrate with Bubble and Microsoft OIDC.
  • For protected RPCs, send Authorization: Bearer <Firebase ID token>.

Streaming phases

StreamPatientSearch emits structured phases:

  • RUNNING: search started.
  • RESULTS: batch of results.
  • DONE: search completed.
  • CANCELLED: client cancelled the search.
  • ERROR: search failed with an error message.

Error model

  • Errors surface as Connect errors with canonical codes (UNAUTHENTICATED, PERMISSION_DENIED, INVALID_ARGUMENT, UNAVAILABLE, INTERNAL).

Outbound dependencies

  • Cloud Spanner for patient search and related data.
  • Bubble APIs for login/SSO.
  • Firebase Admin for custom tokens.

Last updated on