Major Enhancement: NestJS Migration + CASL Authorization + Error Handling
Some checks failed
CI/CD Pipeline / Backend Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Tests (push) Has been cancelled
CI/CD Pipeline / Build Docker Images (push) Has been cancelled
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled

Complete rewrite from Express to NestJS with enterprise-grade features:

## Backend Improvements
- Migrated from Express to NestJS 11.0.1 with TypeScript
- Implemented Prisma ORM 7.3.0 for type-safe database access
- Added CASL authorization system replacing role-based guards
- Created global exception filters with structured logging
- Implemented Auth0 JWT authentication with Passport.js
- Added vehicle management with conflict detection
- Enhanced event scheduling with driver/vehicle assignment
- Comprehensive error handling and logging

## Frontend Improvements
- Upgraded to React 19.2.0 with Vite 7.2.4
- Implemented CASL-based permission system
- Added AbilityContext for declarative permissions
- Created ErrorHandler utility for consistent error messages
- Enhanced API client with request/response logging
- Added War Room (Command Center) dashboard
- Created VIP Schedule view with complete itineraries
- Implemented Vehicle Management UI
- Added mock data generators for testing (288 events across 20 VIPs)

## New Features
- Vehicle fleet management (types, capacity, status tracking)
- Complete 3-day Jamboree schedule generation
- Individual VIP schedule pages with PDF export (planned)
- Real-time War Room dashboard with auto-refresh
- Permission-based navigation filtering
- First user auto-approval as administrator

## Documentation
- Created CASL_AUTHORIZATION.md (comprehensive guide)
- Created ERROR_HANDLING.md (error handling patterns)
- Updated CLAUDE.md with new architecture
- Added migration guides and best practices

## Technical Debt Resolved
- Removed custom authentication in favor of Auth0
- Replaced role checks with CASL abilities
- Standardized error responses across API
- Implemented proper TypeScript typing
- Added comprehensive logging

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-31 08:50:25 +01:00
parent 8ace1ab2c1
commit 868f7efc23
351 changed files with 44997 additions and 6276 deletions

View File

@@ -0,0 +1,197 @@
import { z } from 'zod';
import { Request, Response, NextFunction } from 'express';
export declare const schemas: {
createVip: z.ZodObject<{
name: z.ZodString;
organization: z.ZodOptional<z.ZodString>;
department: z.ZodDefault<z.ZodEnum<["Office of Development", "Admin"]>>;
transportMode: z.ZodDefault<z.ZodEnum<["flight", "self-driving"]>>;
flights: z.ZodOptional<z.ZodArray<z.ZodObject<{
flightNumber: z.ZodString;
airline: z.ZodOptional<z.ZodString>;
scheduledArrival: z.ZodString;
scheduledDeparture: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
flightNumber: string;
scheduledArrival: string;
airline?: string | undefined;
scheduledDeparture?: string | undefined;
}, {
flightNumber: string;
scheduledArrival: string;
airline?: string | undefined;
scheduledDeparture?: string | undefined;
}>, "many">>;
expectedArrival: z.ZodOptional<z.ZodString>;
needsAirportPickup: z.ZodDefault<z.ZodBoolean>;
needsVenueTransport: z.ZodDefault<z.ZodBoolean>;
notes: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string;
department: "Office of Development" | "Admin";
transportMode: "flight" | "self-driving";
needsAirportPickup: boolean;
needsVenueTransport: boolean;
organization?: string | undefined;
flights?: {
flightNumber: string;
scheduledArrival: string;
airline?: string | undefined;
scheduledDeparture?: string | undefined;
}[] | undefined;
expectedArrival?: string | undefined;
notes?: string | undefined;
}, {
name: string;
organization?: string | undefined;
department?: "Office of Development" | "Admin" | undefined;
transportMode?: "flight" | "self-driving" | undefined;
flights?: {
flightNumber: string;
scheduledArrival: string;
airline?: string | undefined;
scheduledDeparture?: string | undefined;
}[] | undefined;
expectedArrival?: string | undefined;
needsAirportPickup?: boolean | undefined;
needsVenueTransport?: boolean | undefined;
notes?: string | undefined;
}>;
updateVip: z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
organization: z.ZodOptional<z.ZodString>;
department: z.ZodOptional<z.ZodEnum<["Office of Development", "Admin"]>>;
transportMode: z.ZodOptional<z.ZodEnum<["flight", "self-driving"]>>;
flights: z.ZodOptional<z.ZodArray<z.ZodObject<{
flightNumber: z.ZodString;
airline: z.ZodOptional<z.ZodString>;
scheduledArrival: z.ZodString;
scheduledDeparture: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
flightNumber: string;
scheduledArrival: string;
airline?: string | undefined;
scheduledDeparture?: string | undefined;
}, {
flightNumber: string;
scheduledArrival: string;
airline?: string | undefined;
scheduledDeparture?: string | undefined;
}>, "many">>;
expectedArrival: z.ZodOptional<z.ZodString>;
needsAirportPickup: z.ZodOptional<z.ZodBoolean>;
needsVenueTransport: z.ZodOptional<z.ZodBoolean>;
notes: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name?: string | undefined;
organization?: string | undefined;
department?: "Office of Development" | "Admin" | undefined;
transportMode?: "flight" | "self-driving" | undefined;
flights?: {
flightNumber: string;
scheduledArrival: string;
airline?: string | undefined;
scheduledDeparture?: string | undefined;
}[] | undefined;
expectedArrival?: string | undefined;
needsAirportPickup?: boolean | undefined;
needsVenueTransport?: boolean | undefined;
notes?: string | undefined;
}, {
name?: string | undefined;
organization?: string | undefined;
department?: "Office of Development" | "Admin" | undefined;
transportMode?: "flight" | "self-driving" | undefined;
flights?: {
flightNumber: string;
scheduledArrival: string;
airline?: string | undefined;
scheduledDeparture?: string | undefined;
}[] | undefined;
expectedArrival?: string | undefined;
needsAirportPickup?: boolean | undefined;
needsVenueTransport?: boolean | undefined;
notes?: string | undefined;
}>;
createDriver: z.ZodObject<{
name: z.ZodString;
email: z.ZodOptional<z.ZodString>;
phone: z.ZodString;
vehicleInfo: z.ZodOptional<z.ZodString>;
status: z.ZodDefault<z.ZodEnum<["available", "assigned", "unavailable"]>>;
}, "strip", z.ZodTypeAny, {
name: string;
phone: string;
status: "available" | "assigned" | "unavailable";
email?: string | undefined;
vehicleInfo?: string | undefined;
}, {
name: string;
phone: string;
email?: string | undefined;
vehicleInfo?: string | undefined;
status?: "available" | "assigned" | "unavailable" | undefined;
}>;
updateDriver: z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
email: z.ZodOptional<z.ZodString>;
phone: z.ZodOptional<z.ZodString>;
vehicleInfo: z.ZodOptional<z.ZodString>;
status: z.ZodOptional<z.ZodEnum<["available", "assigned", "unavailable"]>>;
}, "strip", z.ZodTypeAny, {
name?: string | undefined;
email?: string | undefined;
phone?: string | undefined;
vehicleInfo?: string | undefined;
status?: "available" | "assigned" | "unavailable" | undefined;
}, {
name?: string | undefined;
email?: string | undefined;
phone?: string | undefined;
vehicleInfo?: string | undefined;
status?: "available" | "assigned" | "unavailable" | undefined;
}>;
createScheduleEvent: z.ZodObject<{
driverId: z.ZodOptional<z.ZodString>;
eventTime: z.ZodString;
eventType: z.ZodEnum<["pickup", "dropoff", "custom"]>;
location: z.ZodString;
notes: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
eventTime: string;
eventType: "custom" | "pickup" | "dropoff";
location: string;
notes?: string | undefined;
driverId?: string | undefined;
}, {
eventTime: string;
eventType: "custom" | "pickup" | "dropoff";
location: string;
notes?: string | undefined;
driverId?: string | undefined;
}>;
updateScheduleEvent: z.ZodObject<{
driverId: z.ZodOptional<z.ZodString>;
eventTime: z.ZodOptional<z.ZodString>;
eventType: z.ZodOptional<z.ZodEnum<["pickup", "dropoff", "custom"]>>;
location: z.ZodOptional<z.ZodString>;
notes: z.ZodOptional<z.ZodString>;
status: z.ZodOptional<z.ZodEnum<["scheduled", "in_progress", "completed", "cancelled"]>>;
}, "strip", z.ZodTypeAny, {
notes?: string | undefined;
status?: "scheduled" | "in_progress" | "completed" | "cancelled" | undefined;
driverId?: string | undefined;
eventTime?: string | undefined;
eventType?: "custom" | "pickup" | "dropoff" | undefined;
location?: string | undefined;
}, {
notes?: string | undefined;
status?: "scheduled" | "in_progress" | "completed" | "cancelled" | undefined;
driverId?: string | undefined;
eventTime?: string | undefined;
eventType?: "custom" | "pickup" | "dropoff" | undefined;
location?: string | undefined;
}>;
};
export declare const validate: (schema: z.ZodSchema) => (req: Request, res: Response, next: NextFunction) => Promise<Response<any, Record<string, any>> | undefined>;
//# sourceMappingURL=simpleValidation.d.ts.map