|
| 1 | +# Caesar Forum |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +Caesar Forum is an internal session registration platform for Caesar.nl, designed for monthly internal events (talks, workshops, discussions). Employees can browse upcoming forum sessions, register for sessions, and manage their registrations. The platform integrates directly with Microsoft Outlook shared calendars via Microsoft Graph API to fetch event data, with the Dutch language used throughout the UI. |
| 6 | + |
| 7 | +## User Preferences |
| 8 | + |
| 9 | +Preferred communication style: Simple, everyday language. |
| 10 | + |
| 11 | +## System Architecture |
| 12 | + |
| 13 | +### Frontend Architecture |
| 14 | +- **Framework**: React 18 with TypeScript |
| 15 | +- **Routing**: Wouter for lightweight client-side routing |
| 16 | +- **State Management**: TanStack React Query for server state, React Context for user authentication state |
| 17 | +- **UI Components**: shadcn/ui component library built on Radix UI primitives |
| 18 | +- **Styling**: Tailwind CSS with CSS variables for theming (light/dark mode support) |
| 19 | +- **Build Tool**: Vite with HMR support |
| 20 | + |
| 21 | +### Backend Architecture |
| 22 | +- **Runtime**: Node.js with Express |
| 23 | +- **Language**: TypeScript (ESM modules) |
| 24 | +- **API Pattern**: RESTful JSON API at `/api/*` endpoints |
| 25 | +- **Session Management**: express-session with PostgreSQL session store (connect-pg-simple) |
| 26 | +- **Authentication**: Azure AD OAuth2 via MSAL for user login |
| 27 | + |
| 28 | +### Data Layer |
| 29 | +- **ORM**: Drizzle ORM configured for PostgreSQL dialect |
| 30 | +- **Schema Validation**: Zod with drizzle-zod integration |
| 31 | +- **Schema Location**: `shared/schema.ts` contains all type definitions shared between client and server |
| 32 | +- **Primary Data Source**: Microsoft Graph API reads from a shared Outlook calendar - no local database storage for forum/session data |
| 33 | + |
| 34 | +### Key Design Patterns |
| 35 | +- **Shared Types**: TypeScript schemas in `shared/schema.ts` are used by both frontend and backend |
| 36 | +- **API Error Handling**: GraphApiUnavailableError class provides user-friendly Dutch error messages when Microsoft services are unavailable |
| 37 | +- **Session Slugs**: URL-friendly slugs auto-generated from session titles with hash suffixes for uniqueness |
| 38 | +- **Email Matching**: Local part comparison (before @) handles multi-domain email aliases |
| 39 | + |
| 40 | +## External Dependencies |
| 41 | + |
| 42 | +### Microsoft Graph API Integration |
| 43 | +- **Purpose**: Primary data source for forum editions and sessions (reads from shared Outlook calendar) |
| 44 | +- **Authentication**: Azure AD application with client credentials flow |
| 45 | +- **Libraries**: @azure/msal-node for token acquisition, @microsoft/microsoft-graph-client for API calls |
| 46 | +- **Required Environment Variables**: |
| 47 | + - `AZURE_CLIENT_ID`: Azure AD application client ID |
| 48 | + - `AZURE_CLIENT_SECRET`: Application secret |
| 49 | + - `AZURE_TENANT_ID`: Azure AD tenant ID |
| 50 | +- **Features**: |
| 51 | + - All-day events determine Forum date and title |
| 52 | + - Required attendees are treated as session speakers |
| 53 | + - Speaker photos fetched via `/api/users/{email}/photo` endpoint |
| 54 | + - Categories from Outlook displayed as-is (Talk, Workshop, Demo, etc.) |
| 55 | + |
| 56 | +### Database |
| 57 | +- **PostgreSQL**: Used for session storage (express-session) via connect-pg-simple |
| 58 | +- **Required Environment Variable**: `DATABASE_URL` |
| 59 | +- **Note**: Drizzle ORM is configured but forum data comes from Microsoft Graph, not the database |
| 60 | + |
| 61 | +### Other Required Environment Variables |
| 62 | +- `SESSION_SECRET`: Required for express-session encryption |
| 63 | +- `APP_URL` or `REPLIT_DEV_DOMAIN`: Used for OAuth redirect URIs |
0 commit comments