EventsManager

Architecture Overview

This document provides a comprehensive overview of the Events Manager architecture.

System 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          │
└─────────────────────────────────────────────────────────┘

Technology Stack

Frontend

Backend

Database

Authentication

Infrastructure

Application Layers

1. Presentation Layer (Frontend)

Location: client/src/

Components:

Key Files:

2. API Layer (Backend)

Location: server/

Responsibilities:

Key Files:

3. Data Layer

Location: 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

4. Security Layer

Components:

Request Flow

Unauthenticated Request

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

Authenticated API Request

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

Authentication Flow

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

Data Model

Core Entities

Users

Events

CFP Submissions

Assets

Relationships

users (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)

Deployment Architecture

Development Environment

Production Environment

Persistent Storage

PostgreSQL Data: 10Gi PVC

Application Uploads: 10Gi PVC

Security Architecture

Defense in Depth

Layer 1: Network Security

Layer 2: Application Security

Layer 3: Authentication

Layer 4: Authorization

Layer 5: Data Security

Layer 6: File Security

Scaling Considerations

Horizontal Scaling

Vertical Scaling

Storage Scaling

Caching Strategy

Monitoring & Observability

Logs

Health Checks

Metrics

Development Workflow

  1. Local Development: Not currently supported (requires OpenShift)
  2. Development Environment: Deploy to dev namespace
  3. Testing: Manual testing in dev environment
  4. Production Deployment: Deploy to prod namespace via deploy.sh

Future Architecture Considerations

Potential Enhancements

Performance Optimization


For more detailed information, see: