Accepted
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.
Use a layered web architecture:
novaRewards/frontend provides the Next.js PWA, wallet UI, API clients,
contexts, and user-facing state.novaRewards/backend provides the Express API, route-level authorization,
middleware, domain services, repositories, workers, and observability.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.
Positive:
Negative:
novaRewards/frontend/lib/api.jsnovaRewards/backend/server.jsdeployment/nginx/nginx.confhelm/nova-rewards/templates/ingress.yaml