# Agent context — FX Platform

Read these docs before making changes:

| Document | Content |
|----------|---------|
| [README.md](README.md) | Overview, deploy steps |
| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | Stack, ledger, MAM allocation |
| [docs/API.md](docs/API.md) | REST endpoints |
| [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) | Ultrahost/VPS, cron |
| [docs/SITE_MAP.md](docs/SITE_MAP.md) | All routes/pages |

## Stack (do not change without user request)

- **Backend**: `backend/` — Laravel 11, PHP 8.2, MySQL
- **Hosting**: Ultrahost shared OR VPS; **no WebSocket** in MVP — HTTP polling only
- **MAM**: Manual trade creation by operator/admin; not user discretionary orders

## Key rules

- Ledger is append-only; balances are sums
- Leverage fixed at wallet open
- Withdraw blocked if: KYC not approved, open positions, debt
- Bonus profit → `BONUS_PROFIT_CONVERT` to cash for withdrawal
- User must not see recalculation events

## Demo logins (after `php artisan db:seed`)

- `admin@fx.local` / `password`
- `operator@fx.local` / `password`
- `user1@fx.local` / `password`
