84 lines
2.1 KiB
Markdown
84 lines
2.1 KiB
Markdown
# Shahoo BFF
|
|
|
|
Adapter between **Shahoo** (`/api/1/*`) and **Fibitex** (Dalan + Dena).
|
|
|
|
## Fibitex docs
|
|
|
|
| Doc | Topic |
|
|
|-----|--------|
|
|
| [`Docs/Fibitex-staging-deploy.md`](../Docs/Fibitex-staging-deploy.md) | Staging deploy |
|
|
| [`Shahoo/README.md`](../Shahoo/README.md) | Frontend |
|
|
| [`Docs/README.md`](../Docs/README.md) | Central Fibitex docs |
|
|
|
|
## Quick start
|
|
|
|
```powershell
|
|
cd Shahoo-BFF
|
|
yarn install
|
|
yarn start
|
|
# → http://localhost:8082
|
|
```
|
|
|
|
Copy `.env.example` → `.env` if needed. Requires Fibitex local stack (`www.app.local`).
|
|
|
|
## Shahoo config
|
|
|
|
In `Shahoo/.env.development`:
|
|
|
|
```env
|
|
REACT_APP_API_URL=http://localhost:8082
|
|
```
|
|
|
|
Docker (Traefik): same-origin — `REACT_APP_API_URL=` (empty) at build time.
|
|
|
|
## Test login (Fibitex local)
|
|
|
|
| Email | Password | Notes |
|
|
|-------|----------|-------|
|
|
| `user@test.com` | `123qwe!@#QWE` | member, KYC 0 |
|
|
| `bot@test.com` | `123qwe!@#QWE` | bot group, KYC full |
|
|
| `admin@test.com` | `123qwe!@#QWE` | superadmin |
|
|
|
|
## E2E smoke test
|
|
|
|
From monorepo root:
|
|
|
|
```powershell
|
|
.\scripts\test-shahoo-e2e.ps1
|
|
```
|
|
|
|
## Implemented routes (summary)
|
|
|
|
| Area | Routes |
|
|
|------|--------|
|
|
| Health | `GET /health`, `GET /api/1/health` |
|
|
| Auth | authenticate, logout, register, forgot |
|
|
| User | currentUserSummary, profile, referrer, limitations, login/info, device/info, 2FA, change password, setting |
|
|
| Wallets | self, balance, currencies, address, update/favorite, totalBalances |
|
|
| Market | orders, orderBook, ohlcvs, trades, doneOrders, constants |
|
|
| Fiat/crypto | deposits, withdrawals, irtpays, bank, destinationWallets |
|
|
| KYC | kycUsers, otp, jibit, locations, tts |
|
|
| Extras | notifications, alerts, market/favorite, transactions, assetHistory |
|
|
|
|
Unimplemented `/api/1/*` → `501`.
|
|
|
|
## Architecture
|
|
|
|
```
|
|
Shahoo :3000 → BFF :8082 → gateway:8099/api/v2/dalan|dena
|
|
```
|
|
|
|
Session: BFF UUID token; Dalan cookies + CSRF stored server-side.
|
|
|
|
## Docker
|
|
|
|
```powershell
|
|
scripts\build-docker-apps.bat # custom/shahoo-bff:1
|
|
```
|
|
|
|
Traefik: `shahoo.<domain>/api/1` → BFF, `shahoo.<domain>/` → Shahoo SPA.
|
|
|
|
## Git
|
|
|
|
Separate repo on branch `Update2026` (see `Docs/agents/mandatory-rules.md`).
|