From 20ec5f8e592df8238279c3f3ea393aec31b30c8d Mon Sep 17 00:00:00 2001 From: ezekielelvis Date: Tue, 4 Aug 2026 20:08:55 +0000 Subject: [PATCH 1/2] feat: add QuoteSection component with animated clouds and rainbow style: update ReachUs component to change text color from brass to azure style: update AuthSplitLayout and DashboardShell components to change ticket icon color from brass to azure style: update SiteNav component to change ticket icon color from brass to azure style: update accordion component to change hover text color from brass to azure feat: add BackgroundGrid and BackgroundSpotlight components for layout enhancements style: update button and input components to change focus and hover colors from brass to azure feat: add DestinationCard component for event display with image and stats style: update FAQ, footer, and various pages to change text color from brass to azure fix: add imageUrl field to EventRecord and CreateEventInput types feat: update EventDetailPage to display event image if available refactor: update EventsPage to use EventCard component for event listings feat: integrate QuoteSection into HomePage layout style: update various pages to change hover colors from brass to azure fix: add image URL input field to OrganizerEventFormPage for event creation --- .../handlers/auth/custom-message-trigger.ts | 45 ++++ backend/src/lib/date-format.ts | 15 ++ backend/src/lib/validation.ts | 1 + backend/src/models/types.ts | 1 + backend/src/services/email-layout.ts | 83 +++++++ backend/src/services/email-templates.ts | 75 +++++-- backend/src/services/event-service.ts | 2 + backend/tests/unit/lib/validation.test.ts | 1 + .../tests/unit/services/event-service.test.ts | 1 + frontend/index.html | 2 +- frontend/src/components/Hero.tsx | 79 +++---- frontend/src/components/events/EventCard.tsx | 38 ++++ frontend/src/components/home/HeroNav.tsx | 210 ++++++++++++++++++ frontend/src/components/home/HowItWorks.tsx | 2 +- .../src/components/home/OrganizerPitch.tsx | 4 +- frontend/src/components/home/QuoteSection.tsx | 116 ++++++++++ frontend/src/components/home/ReachUs.tsx | 6 +- .../src/components/layout/AuthSplitLayout.tsx | 6 +- .../src/components/layout/DashboardShell.tsx | 8 +- frontend/src/components/layout/SiteNav.tsx | 2 +- frontend/src/components/ui/accordion.tsx | 2 +- .../src/components/ui/background-grid.tsx | 13 ++ .../components/ui/background-spotlight.tsx | 11 + frontend/src/components/ui/button.tsx | 4 +- frontend/src/components/ui/card-21.tsx | 80 +++++++ frontend/src/components/ui/faq.tsx | 2 +- frontend/src/components/ui/footer.tsx | 2 +- frontend/src/components/ui/input.tsx | 2 +- frontend/src/components/ui/inputStyles.ts | 4 +- frontend/src/index.css | 21 ++ frontend/src/lib/api/types.ts | 2 + frontend/src/pages/ConfirmSignupPage.tsx | 4 +- frontend/src/pages/EventDetailPage.tsx | 9 +- frontend/src/pages/EventsPage.tsx | 29 +-- frontend/src/pages/HomePage.tsx | 8 +- frontend/src/pages/LoginPage.tsx | 2 +- frontend/src/pages/MyTicketsPage.tsx | 6 +- frontend/src/pages/NotAuthorizedPage.tsx | 2 +- frontend/src/pages/NotFoundPage.tsx | 2 +- frontend/src/pages/SignupPage.tsx | 6 +- frontend/src/pages/admin/AdminQueuePage.tsx | 2 +- frontend/src/pages/admin/AdminUsersPage.tsx | 2 +- .../organizer/OrganizerDashboardPage.tsx | 2 +- .../organizer/OrganizerEventFormPage.tsx | 27 +++ frontend/tailwind.config.js | 22 +- infrastructure/lib/stacks/auth-stack.ts | 9 + 46 files changed, 830 insertions(+), 142 deletions(-) create mode 100644 backend/src/handlers/auth/custom-message-trigger.ts create mode 100644 backend/src/lib/date-format.ts create mode 100644 backend/src/services/email-layout.ts create mode 100644 frontend/src/components/events/EventCard.tsx create mode 100644 frontend/src/components/home/HeroNav.tsx create mode 100644 frontend/src/components/home/QuoteSection.tsx create mode 100644 frontend/src/components/ui/background-grid.tsx create mode 100644 frontend/src/components/ui/background-spotlight.tsx create mode 100644 frontend/src/components/ui/card-21.tsx diff --git a/backend/src/handlers/auth/custom-message-trigger.ts b/backend/src/handlers/auth/custom-message-trigger.ts new file mode 100644 index 0000000..f84da8a --- /dev/null +++ b/backend/src/handlers/auth/custom-message-trigger.ts @@ -0,0 +1,45 @@ +import type { CustomMessageTriggerEvent } from 'aws-lambda'; +import { renderEmailLayout } from '../../services/email-layout'; + +function codeBadgeHtml(code: string): string { + return `
+ ${code} +
`; +} + +/** + * Cognito Custom Message trigger: replaces the default bare-text + * verification/reset emails with the same branded HTML shell the + * notification dispatcher uses for everything else (see + * services/email-layout.ts). Cognito still does the actual sending — + * this only supplies the subject/body it sends. + */ +export const handler = async (event: CustomMessageTriggerEvent): Promise => { + const code = event.request.codeParameter; + + if (event.triggerSource === 'CustomMessage_SignUp' || event.triggerSource === 'CustomMessage_ResendCode') { + const { html } = renderEmailLayout({ + eyebrow: 'Verify your email', + heading: 'Confirm your Muster account', + bodyHtml: `

Thanks for signing up. Enter this code to verify your email address:

${codeBadgeHtml(code)}

If you didn't create a Muster account, you can safely ignore this email.

`, + bodyText: `Enter this code to verify your email address: ${code}\n\nIf you didn't create a Muster account, you can safely ignore this email.`, + }); + event.response.emailSubject = 'Verify your Muster account'; + event.response.emailMessage = html; + return event; + } + + if (event.triggerSource === 'CustomMessage_ForgotPassword') { + const { html } = renderEmailLayout({ + eyebrow: 'Password reset', + heading: 'Reset your Muster password', + bodyHtml: `

Use this code to choose a new password:

${codeBadgeHtml(code)}

If you didn't request a password reset, you can safely ignore this email.

`, + bodyText: `Use this code to choose a new password: ${code}\n\nIf you didn't request a password reset, you can safely ignore this email.`, + }); + event.response.emailSubject = 'Reset your Muster password'; + event.response.emailMessage = html; + return event; + } + + return event; +}; diff --git a/backend/src/lib/date-format.ts b/backend/src/lib/date-format.ts new file mode 100644 index 0000000..fff348f --- /dev/null +++ b/backend/src/lib/date-format.ts @@ -0,0 +1,15 @@ +const formatter = new Intl.DateTimeFormat('en-US', { + weekday: 'short', + month: 'short', + day: 'numeric', + year: 'numeric', + hour: 'numeric', + minute: '2-digit', + timeZone: 'UTC', + timeZoneName: 'short', +}); + +/** Renders an ISO date string for email copy, e.g. "Tue, Sep 1, 2026, 9:00 AM UTC". */ +export function formatEmailDate(iso: string): string { + return formatter.format(new Date(iso)); +} diff --git a/backend/src/lib/validation.ts b/backend/src/lib/validation.ts index c2bcd3c..3bec13d 100644 --- a/backend/src/lib/validation.ts +++ b/backend/src/lib/validation.ts @@ -69,6 +69,7 @@ export const createEventSchema = z endDate: isoDateSchema, capacity: z.number().int().min(0).max(1_000_000), ticketLink: urlSchema, + imageUrl: urlSchema, }) .refine((data) => Date.parse(data.endDate) >= Date.parse(data.startDate), { message: 'endDate must be on or after startDate.', diff --git a/backend/src/models/types.ts b/backend/src/models/types.ts index 81c9919..b47d2af 100644 --- a/backend/src/models/types.ts +++ b/backend/src/models/types.ts @@ -21,6 +21,7 @@ export interface EventRecord { capacity: number; registeredCount: number; ticketLink: string; + imageUrl?: string; status: EventStatus; rejectionReason?: string; createdAt: string; diff --git a/backend/src/services/email-layout.ts b/backend/src/services/email-layout.ts new file mode 100644 index 0000000..44effe8 --- /dev/null +++ b/backend/src/services/email-layout.ts @@ -0,0 +1,83 @@ +/** + * Shared HTML shell for outbound email. Table-based markup with inline + * styles only — the notification dispatcher Lambda sends this straight + * through SES with no further processing, and inboxes (Outlook's Word + * rendering engine especially) don't reliably support