Invitation-only sign-up, invitation e-mails and waitlist

- SIGNUP_MODE=invite (default): a new account needs an open invitation for
  its address, or the invitation link (then any Google account will do)
- admin page "Meghívók": invite many addresses at once, personal message,
  resend (max 3, 24 h apart), revoke, copy link, mail preview and test copy,
  waitlist
- invitation e-mail in HTML and plain text; Message-ID on the sender's
  domain, List-Unsubscribe with one-click POST, opt-out list (hashes only)
- e-mail texts moved to a shared crate (crates/email-templates)
- login page shows the invitation; waitlist for uninvited visitors;
  unsubscribe page; privacy policy updated
- docs/levelkuldes.md: Brevo, DNS (SPF, DKIM, DMARC) and the SMTP setup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-17 18:37:15 +00:00
co-authored by Claude Opus 5.5
parent b53cadcd8c
commit 7272d0f1f3
37 changed files with 2333 additions and 231 deletions
+46
View File
@@ -71,6 +71,8 @@ export interface PublicConfig {
mock_payments: boolean;
/** New detailed analyses a day with the unlimited package. */
unlimited_daily_limit: number;
/** "invite": new accounts need an invitation. */
signup_mode: "invite" | "open";
}
export interface Position {
@@ -298,3 +300,47 @@ export interface Country {
iso2: string;
name: string;
}
export type InvitationStatus = "pending" | "accepted" | "expired" | "revoked";
/** What an invitation link shows before login. */
export interface InvitationLanding {
inviter_name: string | null;
message: string | null;
status: InvitationStatus;
expires_at: string;
}
export interface AdminInvitation {
id: string;
email: string;
message: string | null;
locale: string;
status: InvitationStatus;
created_at: string;
expires_at: string;
sent_count: number;
last_sent_at: string;
accepted_at: string | null;
accepted_by: string | null;
invited_by: string | null;
/** The last e-mail: sent, waiting, failed, or already removed from the outbox. */
mail: "sent" | "queued" | "failed" | "archived";
mail_error: string | null;
can_resend: boolean;
}
export interface WaitlistEntry {
email: string;
locale: string;
created_at: string;
/** The address's latest invitation, if any. */
invitation: "pending" | "accepted" | null;
}
export interface InvitationResult {
email: string;
status: "invited" | "invalid" | "already_user" | "already_invited" | "opted_out";
id?: string;
url?: string;
}