feat: add volunteer shift signup app

Initial source, tests, migrations, and local Docker setup for the Hope Food Pantry volunteer scheduler.
This commit is contained in:
blake committed 2026-10-16 09:33:39 -05:00
commit f1a46e2ba7
129 files changed
+25290

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
export class EmailAddressError extends Error {
constructor(message: string) {
super(message);
this.name = 'EmailAddressError';
}
}
/** Trim, Unicode normalize, and lowercase. Dots and plus-tags are kept. */
export function normalizeEmail(input: string): string {
const normalized = input.normalize('NFC').trim().toLowerCase();
if (
normalized.length === 0 ||
/\s/.test(normalized) ||
!normalized.includes('@') ||
normalized.startsWith('@') ||
normalized.endsWith('@')
) {
throw new EmailAddressError('Enter an email address.');
}
return normalized;
}