Update AGENTS.md with deployment structure and vite base config note

This commit is contained in:
TradeMate Dev
2026-05-21 09:38:57 +08:00
parent 18112d5d0c
commit ef01f0dc01
+8
View File
@@ -31,6 +31,14 @@ cd backend && alembic upgrade head
alembic revision --autogenerate -m "desc"
```
## Deployment
- **Landing page** at `trade.yuzhiran.com/` — static marketing HTML
- **SPA** at `trade.yuzhiran.com/app/` — uni-app build
- **Nginx**: `location /app/ { try_files $uri $uri/ /app/index.html; }` for SPA fallback
- **vite config**: `base: '/app/'` so all asset paths are `/app/assets/...`
- **API**: proxied via nginx `location /api/` to `127.0.0.1:8000`
## Critical Quirks
- **Route ordering**: FastAPI matches top-down. Specific routes (`/{customer_id}/health`) must be registered **before** wildcard `/{customer_id}`.