This document provides a comprehensive overview of the Events Manager architecture.
Events Manager is a full-stack web application deployed on OpenShift with the following architecture:
┌─────────────────────────────────────────────────────────┐
│ OpenShift Cluster │
│ │
│ ┌──────────────────────────────────────────────────┐ │
│ │ External Access (HTTPS/TLS) │ │
│ │ Custom Domains: *.rh-events.org │ │
│ └────────────────────┬─────────────────────────────┘ │
│ │ │
│ ┌────────────────────▼─────────────────────────────┐ │
│ │ Application Pod (ospo-app) │ │
│ │ - Node.js + Express.js │ │
│ │ - React Frontend (SSR) │ │
│ │ - Keycloak Auth Middleware │ │
│ │ Port: 4576 │ │
│ └────────┬──────────────────────┬──────────────────┘ │
│ │ │ │
│ ┌────────▼────────┐ ┌───────▼─────────┐ │
│ │ PostgreSQL │ │ Keycloak │ │
│ │ Database │ │ Auth Server │ │
│ │ Port: 5432 │ │ Port: 8080 │ │
│ └─────────────────┘ └─────────────────┘ │
│ │
│ Persistent Storage: PVCs for data persistence │
└─────────────────────────────────────────────────────────┘
Location: client/src/
Components:
pages/)components/)hooks/)contexts/)lib/)Key Files:
client/src/main.tsx: Application entry pointclient/src/App.tsx: Root component with routingclient/src/lib/keycloak.ts: Authentication clientLocation: server/
Responsibilities:
Key Files:
server/index.ts: Server initializationserver/routes.ts: API endpoints (2300+ lines)server/keycloak-config.ts: Auth middlewareserver/storage.ts: Data access interfaceLocation: server/db.ts, shared/database-schema.ts
Components:
Key Tables:
users -- User accounts
events -- Event information
cfp_submissions -- Call for papers submissions
attendees -- Event attendees
assets -- Uploaded files
stakeholders -- Stakeholder information
approval_workflows -- Approval processes
Components:
1. Browser → OpenShift Route (HTTPS)
2. Route → App Pod
3. Express Middleware Stack:
- Helmet (security headers)
- Rate Limiter
- Session Management
- Static File Server
4. → Return public content or redirect to login
1. Browser → OpenShift Route (HTTPS)
Headers: Authorization: Bearer <token>
2. Route → App Pod
3. Express Middleware Stack:
- Helmet (security headers)
- Rate Limiter
- Session Management
- JSON Parser
- Keycloak Auth Middleware
├─ Extract token
├─ Validate with Keycloak
├─ Verify signature
└─ Extract user info
4. Route Handler (server/routes.ts)
├─ Validate input
├─ Check permissions
└─ Execute business logic
5. Storage Layer (server/storage.ts)
└─ Database operations via Drizzle ORM
6. PostgreSQL Database
└─ Execute query and return results
7. Response
├─ Format data
├─ Add security headers
└─ Return JSON
8. Browser receives response
1. User visits application
└─ Keycloak JS checks for valid token
2. No valid token found
└─ Redirect to Keycloak login
URL: /auth/realms/ospo-events/protocol/openid-connect/auth
3. User enters credentials
└─ Keycloak validates credentials
4. Keycloak issues tokens
├─ ID Token (user info)
├─ Access Token (API access)
└─ Refresh Token (token renewal)
5. Redirect back to application
└─ Keycloak JS stores tokens
6. Application makes API requests
└─ Authorization: Bearer <access_token>
7. Server validates token
├─ Check signature
├─ Verify expiration
├─ Extract user claims
└─ Check roles/permissions
8. Token refresh (before expiry)
└─ Keycloak JS auto-refreshes
/app/uploadsusers (1) ──< (N) events (created_by_id)
users (1) ──< (N) cfp_submissions (submitter_id)
events (1) ──< (N) cfp_submissions (event_id)
events (1) ──< (N) attendees (event_id)
events (1) ──< (N) assets (event_id)
users (1) ──< (N) assets (uploaded_by)
cfp_submissions (1) ──< (N) assets (cfp_submission_id)
dev-rh-events-orghttps://dev.rh-events.orghttps://keycloak-dev.rh-events.orgprod-rh-events-orghttps://rh-events.orghttps://keycloak-prod.rh-events.orgPostgreSQL Data: 10Gi PVC
Application Uploads: 10Gi PVC
/app/uploadsLayer 1: Network Security
Layer 2: Application Security
Layer 3: Authentication
Layer 4: Authorization
Layer 5: Data Security
Layer 6: File Security
/api/health/api/health/api/healthdeploy.shFor more detailed information, see: