Raxx · internal docs

internal · gated ↑ index

ADR 0049 — Track B: v1.0 Alpaca credential shape — single operator set, paper only

Status: Accepted
Date: 2026-05-03
Deciders: software-architect
Context doc: raxx-app-track-b.md §6
Parent epic: #94
Post-v1.0 superseded by: #183 (multi-tenant Alpaca + BYOB hybrid)


Context

Raptor's trading routes read Alpaca credentials from env vars (ALPACA_PAPER_API_KEY, ALPACA_PAPER_API_SECRET) set on the Heroku dyno. There is no per-user credential store, no OAuth flow, no "bring your own keys" UI.

At v1.0, Raxx is a single-operator deployment. The question is what shape the "user trades with Alpaca paper" story takes before multi-tenancy is designed.

Three options were considered:

  1. Single operator-owned Alpaca paper account shared by all authenticated users.
  2. Per-user Alpaca paper API key entry in a settings UI (keys stored encrypted at rest).
  3. Block all trading features until #183 multi-tenant design lands.

Decision

Option 1: Use a single operator-owned Alpaca paper account shared across all authenticated users, until #183 designs and ships per-user credential isolation.

The credentials (ALPACA_PAPER_API_KEY, ALPACA_PAPER_API_SECRET) live in Heroku config-vars sourced from Infisical /MooseQuest/alpaca/. No user-facing key entry UI is built. No user credentials are stored.

This is a deliberate v1.0 scoping decision, not an architectural oversight.


Consequences

Positive

Negative / risks

Neutral


Alternatives considered

A: Per-user Alpaca paper key entry (user stores their own keys)

Rejected for v1.0. Storing user-supplied Alpaca API keys — even encrypted at rest — touches the "no stored credentials" invariant (ADR 0002). The invariant says "the system must not have the ability to replay a credential." Encrypted-at-rest keys could be decrypted and replayed. The full multi-tenant design in #183 addresses this correctly via OAuth or scoped ephemeral tokens. That design is not ready for v1.0.

B: Disable trading routes entirely until #183

Rejected. Trading is a core value proposition of v1.0. Blocking it entirely in favor of waiting for a multi-tenant design ships zero trading capability. The single-operator paper account is a safe, non-credential-storing interim.