port-nimara-client-portal/server/api
Matt f2e0c3d1b1 DEBUG: Add comprehensive startup checks and improve OIDC configuration
##  **Debugging Improvements Added:**

### **Startup Monitoring:**
-  plugins/00.startup-check.server.ts - Server-side initialization checks
-  plugins/00.startup-check.client.ts - Client-side debugging
-  server/api/health.ts - Health check endpoint

### **OIDC Configuration Fixes:**
-  Reordered modules:
uxt-oidc-auth loads after uetify-nuxt-module
-  Temporarily removed file-based storage configuration (potential issue)
-  Maintained all session settings and provider configuration

### **Server-Side Checks:**
- Auto-creates required directories (./data/oidc-sessions, ./data/sessions)
- Validates all required environment variables are present
- Logs initialization progress and any errors

### **Client-Side Monitoring:**
- Detects OAuth callback URLs for debugging
- Checks storage availability
- Monitors startup process

### **Health Endpoint:**
- /api/health - Check server status and OIDC configuration
- Reports environment variables status
- Shows uptime and basic system info

##  **Expected Results:**

 Detailed logs will show exactly where initialization fails
 Health check endpoint works even if OIDC fails
 Better error handling prevents silent crashes
 Module loading order fixes potential conflicts
 Debugging info helps identify the 502 root cause

##  **Next Steps:**
1. Deploy this updated container
2. Check startup logs for [STARTUP] messages
3. Test /api/health endpoint first
4. Monitor OAuth callback debugging info
5. Use logs to identify and fix remaining issues

This maintains all existing functionality while adding comprehensive debugging!
2025-06-15 14:57:48 +02:00
..
debug CRITICAL FIX: Enhanced OIDC session configuration for Keycloak authentication 2025-06-14 16:17:58 +02:00
email Update logo references and email logo URL in configuration 2025-06-13 13:36:14 +02:00
eoi CRITICAL FIX: Resolve NocoDB field clearing issue for EOI cleanup 2025-06-12 17:36:27 +02:00
files updates 2025-06-10 16:48:40 +02:00
create-interest.ts Add debug logging and update API authentication 2025-06-09 23:19:52 +02:00
delete-interest.ts updates 2025-06-10 12:54:22 +02:00
eoi-send-to-sales.ts feat: update 2025-06-03 18:57:08 +03:00
get-berths.ts Improve email session management and add IMAP connection pooling 2025-06-12 15:53:12 +02:00
get-interest-berths.ts updates 2025-06-09 23:33:20 +02:00
get-interest-by-id.ts fixes 2025-06-11 16:05:19 +02:00
get-interests.ts updates 2025-06-09 23:33:20 +02:00
health.ts DEBUG: Add comprehensive startup checks and improve OIDC configuration 2025-06-15 14:57:48 +02:00
link-berth-recommendations-to-interest.ts Fix 502 errors on container restart and expand API authentication 2025-06-09 23:29:24 +02:00
link-berths-to-interest.ts Improve email session management and add IMAP connection pooling 2025-06-12 15:53:12 +02:00
request-more-info-to-sales.ts feat: update 2025-06-03 18:57:08 +03:00
request-more-information.ts feat: update 2025-06-03 18:57:08 +03:00
test-eoi-cleanup.ts CRITICAL FIX: Resolve NocoDB field clearing issue for EOI cleanup 2025-06-12 17:36:27 +02:00
unlink-berth-recommendations-from-interest.ts Fix 502 errors on container restart and expand API authentication 2025-06-09 23:29:24 +02:00
unlink-berths-from-interest.ts Improve email session management and add IMAP connection pooling 2025-06-12 15:53:12 +02:00
update-interest.ts fixes 2025-06-09 23:42:31 +02:00