feat: multi-Oracle server support with runtime switching

Complete implementation of multi-server Oracle database support:

Backend:
- Multi-pool Oracle with lazy loading per server
- Email-to-server cache for automatic server discovery
- JWT tokens include server_id claim
- /auth/check-identity and /auth/check-email endpoints
- /auth/my-servers endpoint for listing user's accessible servers
- Server switch with password re-authentication

Frontend:
- New ServerSelector component for header dropdown
- Multi-step login flow (identity → server → password)
- Server switching from header with password modal
- Mobile drawer menu with server selection
- Dark mode support for all new components
- URL bookmark support with ?server= query param

Scripts:
- Unified start.sh replacing start-prod.sh/start-test.sh
- Unified ssh-tunnel.sh with multi-server support
- Updated status.sh for new architecture

Tests:
- E2E tests for multi-server and single-server login flows
- Backend unit tests for all new endpoints
- Oracle multi-pool integration tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-01-26 22:39:06 +00:00
parent 5f99ee2fd0
commit b137e80b71
102 changed files with 9398 additions and 2787 deletions

View File

@@ -38,7 +38,7 @@ vim backend/.env.prod
# - SMTP_PASSWORD
# 4. Start
./start-prod.sh
./start.sh prod
```
### Test
@@ -47,7 +47,7 @@ vim backend/.env.prod
cp backend/.env.test.example backend/.env.test
vim backend/.env.test
# Fill in TEST credentials (separate from dev!)
./start-test.sh
./start.sh test
```
### Production
@@ -63,12 +63,12 @@ vim backend/.env.prod
### Production
```bash
./start-prod.sh # Checks for .env.prod → copies to .env → starts backend
./start.sh prod # Checks for .env.prod → copies to .env → starts backend
```
### Test
```bash
./start-test.sh # Checks for .env.test → copies to .env → starts backend
./start.sh test # Checks for .env.test → copies to .env → starts backend
```
### Production
@@ -151,7 +151,7 @@ cp backend/.env.prod.example backend/.env.prod
vim backend/.env.prod
# 3. Start
./start-prod.sh
./start.sh prod
```
### Changing Configuration
@@ -160,7 +160,7 @@ vim backend/.env.prod
vim backend/.env.prod
# 2. Restart to apply
./start-prod.sh
./start.sh prod
```
### Production Deployment
@@ -182,8 +182,8 @@ python3 -c "import secrets; print(secrets.token_urlsafe(32))"
### "Wrong database" error
Check that you're using the correct startup script:
- Production: `./start-prod.sh` (uses `.env.prod`)
- Test: `./start-test.sh` (uses `.env.test`)
- Production: `./start.sh prod` (uses `.env.prod`)
- Test: `./start.sh test` (uses `.env.test`)
### ".env.prod not found" error
First-time setup required: