Waitlist
Waitlist owns public signup, confirmation, admin review, export, conversion, audit, and waitlist mode behavior.
On this page
Where to look
| Area | Maintainer reference |
|---|---|
| Public route | Implementation referencesrc/app/(public)/waitlist/page.tsx |
| Admin route | Implementation referencesrc/app/(dashboard)/admin/waitlist/page.tsx |
| API | Implementation referencesrc/app/api/waitlist/signup, confirm, export |
| Server | Implementation referencesrc/features/waitlist/server/signup, services, actions, conversion, audit.ts, settings.ts, signup-list-query.ts |
| UI | Implementation referencesrc/features/waitlist/ui/signup-form.tsx, src/features/waitlist/ui/admin |
| Shared | Implementation referencesrc/features/waitlist/shared/mode.ts, status.ts, double-opt-in-state.ts, list-types.ts |
| Database | waitlist_signups, analytics_events |
Implementation reference3 areas
These Product code locations explain how the documented behavior is implemented. Expand them when you are ready to customize or maintain this area.
Public signup and confirmation
Public routes and API handlers delegate signup, confirmation, validation, persistence, notification, and analytics work to waitlist services.
src/app/(public)/waitlist/page.tsxsrc/app/api/waitlist/signup/route.tssrc/app/api/waitlist/confirm/route.tssrc/features/waitlist/server/signup/services/submit.tssrc/features/waitlist/server/signup/services/confirm.ts
Admin operations
Admin pages and actions own review, status changes, bulk actions, resend work, export, and conversion tracking.
src/app/(dashboard)/admin/waitlist/page.tsxsrc/features/waitlist/server/actions/bulk.tssrc/features/waitlist/server/services/bulk-status.tssrc/features/waitlist/server/services/export.tssrc/features/waitlist/server/conversion/service.ts
Modes, status, and settings
Shared mode, status, double opt-in, settings, and admin helpers keep launch behavior explicit.
src/features/waitlist/shared/mode.tssrc/features/waitlist/shared/status.tssrc/features/waitlist/shared/double-opt-in-state.tssrc/features/waitlist/server/settings.tssrc/features/waitlist/shared/admin/submissions-helpers.ts
Reference paths are relative to the Shipflash-Product checkout.
Waitlist signup flow
- 1
Read launch mode and validate payload
Signup services use waitlist settings and payload schemas before accepting public submissions.
Relevant Product code
src/features/waitlist/server/settings.tssrc/features/waitlist/server/signup/schemas/payload.ts
- 2
Persist signup state
Signup persistence owns waitlist_signups writes and supports double opt-in state when enabled.
Relevant Product code
src/features/waitlist/server/signup/persistence/signups.tssrc/features/waitlist/server/signup/services/double-opt-in.ts
- 3
Notify and track events
Signup services queue notifications and analytics events after a valid public submission.
Relevant Product code
src/features/waitlist/server/signup/services/notifications.tssrc/features/waitlist/server/signup/services/events.ts
- 4
Operate from admin views
Admin services handle filtering, bulk status changes, exports, resend, conversion, and audit records.
Relevant Product code
src/features/waitlist/server/signup-list-query.tssrc/features/waitlist/server/actions/bulk.tssrc/features/waitlist/server/audit.ts
Waitlist rate limit key
Use this example as a starting point, then adapt it to your product's rules and configuration.
Public waitlist signup uses session and IP rate-limit keys before accepting submissions.
async function enforceWaitlistSignupRateLimit(params: {
clientIp: string | null;
sessionId: string | null;
requestId: string;
start: number;
}): Promise<WaitlistSignupServiceResult | null> {
const ratePolicy = getRateLimitPolicy("waitlist_signup");
const rateKey = buildRateLimitKey({
prefix: ratePolicy.prefix,
ip: params.clientIp,
identifier: params.sessionId ?? "public",
});
const rateLimit = await checkRateLimit({
key: rateKey,
limit: ratePolicy.limit,
windowSeconds: ratePolicy.windowSeconds,
});
if (rateLimit.allowed) {
return null;
}Source reference
src/features/waitlist/server/signup/actions/submit-route.ts
Waitlist rules
- Validate public signup payloads.
- Rate-limit public writes.
- Keep exports admin-only.
- Track confirmed, pending, spam, qualified, contacted, archived, and converted states clearly.
- Keep conversion logic explicit so launch metrics stay understandable.