Nova-Rewards

ADR 0001: Layered PWA and Express API

Status

Accepted

Context

Nova Rewards supports user wallet flows, merchant campaign management, admin operations, and public API integrations. The frontend needs browser wallet access through Freighter, while privileged actions such as merchant authentication, reward issuance, webhook delivery, and database writes need server-side controls.

Decision

Use a layered web architecture:

The browser never receives server signing secrets. Wallet interactions that need user approval stay in the browser through Freighter, while backend-owned operations stay behind Express middleware.

Consequences

Positive:

Negative: