Session-aware BFF
Same-origin Next.js routes attach authenticated user and account context before proxying private services.
Developer surface
Build with the same-origin application layer, authenticated profile context, and explicit data states that power the trading desk.
Same-origin Next.js routes attach authenticated user and account context before proxying private services.
SSE and WebSocket paths carry market and operational updates without exposing private service addresses.
PostgreSQL, DynamoDB-backed profiles, durable engine state, and caching support user and execution workflows.
Inference and agent requests resolve through configured channels rather than binding the browser to one provider.
Airflow, Spark, Jenkins, and service tooling coordinate research, pipelines, deployment, and operational checks.
Broker records are encrypted at rest and resolved server-side for the authenticated profile and requested lane.
Frontend contract
This browser-side example reads the normalized dashboard through the BFF. It does not embed a token, private host, broker secret, or state-changing order request.
const response = await fetch("/api/dashboard", {
credentials: "include",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`Dashboard unavailable (${response.status})`);
}
const dashboard = await response.json();
// Preserve dashboard freshness and availability metadata
// instead of converting unknown values to zero.Call the web application’s /api routes from the browser; private hosts remain server-side details.
Use the authenticated session and let the BFF resolve canonical profile and account scope.
Keep loading, unavailable, stale, empty, and confirmed-zero states distinct in every consumer.
Require explicit intent, surface partial failure, and reconcile the external result.