Skip to content

Commit 23c08a9

Browse files
author
marcselman
committed
Fix login redirect error by ensuring session is saved
Correctly save session data before redirecting during login to prevent invalid state errors. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9b278ad5-3a45-420e-ba83-0847baf9924f Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: fd407d3e-93bb-46b4-a839-77f07af2f684 Replit-Helium-Checkpoint-Created: true
1 parent 48cd9b3 commit 23c08a9

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

replit.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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 application integrates with Microsoft Outlook via the Graph API to fetch events from a shared calendar, with sessions displayed in Dutch throughout.
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 caching, 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 using ESM modules
24+
- **API Pattern**: RESTful JSON API at `/api/*` endpoints
25+
- **Session Storage**: PostgreSQL-backed sessions via connect-pg-simple
26+
- **Authentication**: Azure AD OAuth with MSAL for user login; client credentials flow for calendar access
27+
28+
### Data Layer
29+
- **ORM**: Drizzle ORM configured for PostgreSQL dialect
30+
- **Schema Validation**: Zod with drizzle-zod integration
31+
- **Primary Data Source**: Microsoft Graph API (shared Outlook calendar)
32+
- **Schema Location**: `shared/schema.ts` contains all type definitions shared between client and server
33+
34+
### Key Design Decisions
35+
36+
1. **Microsoft Graph as Primary Data Source**: Sessions are fetched live from a shared Outlook calendar rather than stored in a local database. This ensures the calendar remains the single source of truth.
37+
38+
2. **Session Slugs**: User-friendly URLs using auto-generated slugs (title + hash suffix). Custom slugs can be set via YAML-style back-matter in Outlook event descriptions.
39+
40+
3. **Speaker Detection**: Required attendees on calendar events are treated as speakers. Falls back to organizer if no required attendees exist.
41+
42+
4. **Dutch Language UI**: All user-facing text is in Dutch to match the internal corporate audience.
43+
44+
5. **Graceful Degradation**: When Graph API is unavailable, displays user-friendly Dutch error messages rather than fallback mock data.
45+
46+
## External Dependencies
47+
48+
### Microsoft Graph API
49+
- **Purpose**: Primary data source for forum sessions (shared calendar events)
50+
- **Authentication**: Azure AD application with client credentials flow
51+
- **Library**: @azure/msal-node for token acquisition, @microsoft/microsoft-graph-client for API calls
52+
- **Required Environment Variables**:
53+
- `AZURE_CLIENT_ID`: Azure AD application client ID
54+
- `AZURE_CLIENT_SECRET`: Application secret
55+
- `AZURE_TENANT_ID`: Azure AD tenant ID
56+
57+
### PostgreSQL Database
58+
- **Purpose**: Session storage for user authentication, not primary data storage
59+
- **ORM**: Drizzle ORM
60+
- **Required Environment Variables**:
61+
- `DATABASE_URL`: PostgreSQL connection string
62+
- `SESSION_SECRET`: Secret for express-session
63+
64+
### Azure Active Directory
65+
- **Purpose**: User authentication via OAuth 2.0 PKCE flow
66+
- **Scope**: User login and profile photo retrieval from Microsoft 365

0 commit comments

Comments
 (0)