Striker Market Case Study
Striker Market is a Vercel-hosted sample application that shows how a tenant-owned consumer product can integrate with FWallet without sharing the FWallet admin dashboards with end users.
The sample uses FWallet for wallet creation, signed money movement, tenant operations, request logging, observer monitoring, settlement decisions, and payout demos.
What the Demo Shows
| View | Purpose |
|---|---|
| Markets | User-facing match markets and position placement. |
| Wallet | Demo deposits, balance changes, and wallet actions. |
| Positions | User positions, exposure, and settlement history. |
| Owner | Tenant-owner operating view for liquidity, P&L, and collected fees. |
| Operator | Operational controls for fixture phase, settlement, and payout decisions. |
| Observer | Read-only monitoring for request logs, signing diagnostics, and demo health. |
The live demo runs at https://fwallet-api-striker-market.vercel.app.
Architecture
Browser -> Striker Market Next.js app on Vercel -> /api/demo/* route handlers -> @f-wallet/node SDK and HMAC signing helpers -> FWallet API -> PostgreSQL ledger, workflow cases, request logs, and tenant accounts
Shared demo state -> Vercel KV or Upstash Redis -> positions, wallet actions, settlements, P&L, payout decisions, activity historyStriker Market is intentionally separate from the FWallet dashboards:
- Consumer actions stay inside the Striker product.
- Server-side route handlers own FWallet API calls and signing secrets.
- Tenant admins still use the FWallet tenant dashboard for developers, treasury, analytics, approvals, and request logs.
- Super admins still use the FWallet admin dashboard for organization, fee, platform analytics, and cross-tenant controls.
Required Environment
FWALLET_API_BASE_URL=https://staging-api.fwallet.co.ugFWALLET_STRIKER_KEY_ID=ak_...FWALLET_STRIKER_SIGNING_SECRET=...FWALLET_STRIKER_OBSERVER_KEY=fwk_test_...STRIKER_DEMO_RESET_TOKEN=...KV_REST_API_URL=...KV_REST_API_TOKEN=...KV_REST_API_URL and KV_REST_API_TOKEN can also be supplied as UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN.
SDK Usage
The sample depends on the published Node package:
{ "dependencies": { "@f-wallet/node": "0.1.0" }}Use @f-wallet/node for server-side integrations that need HMAC signing. Use @f-wallet/typescript for fetch-based TypeScript clients, @f-wallet/react for React Query helper hooks, and the language-specific SDKs listed in the SDK overview.
API Calls in the Demo
| Demo action | FWallet behavior |
|---|---|
| Create or load demo wallet | Creates or reads tenant-scoped wallets through the wallet APIs. |
| Place a position | Posts a signed transfer-like wallet movement with an idempotency key. |
| Deposit demo funds | Records a demo wallet funding event through the deposit or wallet action route. |
| Settle a market | Posts settlement movements and records P&L in shared demo state. |
| Request payout | Creates a payout approval case and moves funds to suspense. |
| Approve payout | Settles approved funds from suspense into payout clearing. |
| Observer request log | Reads FWallet request logs with a restricted observer key. |
| Signing diagnostic | Verifies HMAC headers, nonce, timestamp, content hash, and signature path. |
Financial writes are idempotent. Route handlers should create deterministic idempotency keys from the demo action, fixture, wallet, and user position so browser retries do not duplicate ledger entries.
Demo Flow
-
Open the live demo.
-
Create a wallet and fund it.
Use the Wallet view to add demo funds. The UI shows the user-facing balance and activity history.
-
Place a market position.
Open Markets, choose a fixture, and place a position. The app signs the server-side request and records the action with an idempotency key.
-
Move the fixture through phases.
Use Operator controls to open, lock, settle, and clear payout decisions. Operator state is shared through Redis.
-
Review owner analytics.
The Owner view shows tenant P&L, collected fees, liquidity, payout exposure, and settlement outcomes.
-
Inspect observer signals.
The Observer view surfaces request logs, signing diagnostics, and operational health without exposing write controls.
Resetting the Demo
Authorized operators can reset the shared demo state:
curl -X POST https://fwallet-api-striker-market.vercel.app/api/demo/reset \ -H "Authorization: Bearer $STRIKER_DEMO_RESET_TOKEN"This resets local demo state such as positions, settlement results, wallet actions, P&L, payouts, and activity history. It does not require deleting ledger records. Ledger corrections should always be posted as new entries, not by mutating old financial records.
Reproducing Locally
bun installbun run dev:strikerThe app runs on http://localhost:3004.
For local FWallet API calls, set FWALLET_API_BASE_URL to the target API and provide either staging credentials or a local tenant key. Keep signing secrets in your local shell, Vercel environment variables, or Vault; do not commit them.