From ef01f0dc01e5bc883fa8b18393a73b195a7e4133 Mon Sep 17 00:00:00 2001 From: TradeMate Dev Date: Thu, 21 May 2026 09:38:57 +0800 Subject: [PATCH] Update AGENTS.md with deployment structure and vite base config note --- AGENTS.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index b158514..e1062d4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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}`.