first commit

This commit is contained in:
2026-07-17 21:48:37 +05:30
commit f85599dac5
124 changed files with 10775 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
import type { Backend } from "./Backend";
import { mockBackend } from "./mock";
import { iiosBackend } from "./iios";
/**
* Choose the BFF backend from env. Default "mock" (in-memory store). Set
* BFF_BACKEND=iios (+ IIOS_URL etc.) to proxy the real IIOS service.
* Importing the IIOS backend runs no network calls until a method is invoked
* (the token is minted lazily), so the mock demo never needs IIOS present.
*/
export function getBackend(): Backend {
return (process.env.BFF_BACKEND ?? "mock").toLowerCase() === "iios" ? iiosBackend : mockBackend;
}
export type { Backend };