A complete serverless email and database solution for the Prosthetic Companion website with:
.env.example - Environment variables templateSETUP.md - Comprehensive setup guideIMPLEMENTATION_SUMMARY.md - This filesrc/app/api/waitlist/route.ts - Waitlist signup endpointsrc/app/api/partnership/route.ts - Partnership inquiry endpointsrc/components/waitlist-modal.tsx - Waitlist form modalsrc/components/partnership-modal.tsx - Partnership form modalsrc/components/ui/dialog.tsx - Modal/dialog componentsrc/components/ui/toast.tsx - Toast notification componentsrc/components/ui/toaster.tsx - Toast container componentsrc/lib/validations.ts - Zod validation schemassrc/hooks/use-toast.ts - Toast notification hookpackage.json - Added dependencies (Resend, @vercel/kv, Zod, @hookform/resolvers)src/app/page.tsx - Added modal state and onClick handlerssrc/app/layout.tsx - Added Toaster componentsrc/hooks/index.ts - Exported useToast hookβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β USER INTERFACE β
β ββββββββββββββββββββ ββββββββββββββββββββ β
β β Waitlist Button β β Partnership Btn β β
β ββββββββββ¬ββββββββββ ββββββββββ¬ββββββββββ β
β β β β
β βΌ βΌ β
β ββββββββββββββββββββ ββββββββββββββββββββ β
β β Waitlist Modal β β Partnership Modalβ β
β β - Email (req) β β - Name (req) β β
β β - Name (opt) β β - Email (req) β β
β β β β - Org (req) β β
β β β β - Message (req) β β
β ββββββββββ¬ββββββββββ ββββββββββ¬ββββββββββ β
βββββββββββββΌβββββββββββββββββββββββββββΌβββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β API ROUTES β
β ββββββββββββββββββββ ββββββββββββββββββββ β
β β /api/waitlist β β /api/partnership β β
β β POST β β POST β β
β ββββββββββ¬ββββββββββ ββββββββββ¬ββββββββββ β
β β β β
β βββββββββββββ¬ββββββββββββββββ€ β
β βΌ βΌ βΌ β
β βββββββββββββββ βββββββββββ ββββββββββββββββ β
β β Validate β β Store β β Send Emails β β
β β with Zod β β in KV β β via Resend β β
β βββββββββββββββ βββββββββββ ββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EXTERNAL SERVICES β
β ββββββββββββββββββββ ββββββββββββββββββββ β
β β Vercel KV β β Resend β β
β β (Redis) β β (Email API) β β
β β β β β β
β β β’ Waitlist data β β β’ Admin notify β β
β β β’ Partnership β β β’ User confirm β β
β β inquiries β β β β
β ββββββββββββββββββββ ββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
/api/waitlistwaitlist:{email}/api/partnership// Key format
"waitlist:{email}"
// Value structure
{
email: string,
name: string | null,
timestamp: ISO8601 string
}
// Example
Key: "waitlist:john@example.com"
Value: {
email: "john@example.com",
name: "John Doe",
timestamp: "2026-03-02T17:00:00.000Z"
}
// Counter
Key: "waitlist:count"
Value: number
// Key format
"partnership:{timestamp}:{email}"
// Value structure
{
name: string,
email: string,
organization: string,
message: string,
timestamp: ISO8601 string,
status: "new" | "contacted" | "closed"
}
// Example
Key: "partnership:1709402400000:jane@company.com"
Value: {
name: "Jane Smith",
email: "jane@company.com",
organization: "Tech Corp",
message: "Interested in collaboration...",
timestamp: "2026-03-02T17:00:00.000Z",
status: "new"
}
// List of all inquiry IDs
Key: "partnership:inquiries"
Type: List
Values: ["partnership:1709402400000:jane@company.com", ...]
// Counter
Key: "partnership:count"
Value: number
Subject: π New Waitlist Signup - Prosthetic Companion
Content:
Subject: Welcome to the Prosthetic Companion Waitlist
Content:
Subject: π€ New Partnership Inquiry - Prosthetic Companion
Content:
Subject: Thank You for Your Partnership Inquiry
Content:
npm installFROM_EMAIL to use verified domainwaitlist:countpartnership:countβ
Environment variables for sensitive data
β
Server-side validation
β
Input sanitization
β
No client-side API keys
β
HTTPS only (enforced by Vercel)
β
CORS protection (Next.js default)
Solution: Check RESEND_API_KEY and NOTIFICATION_EMAIL env vars
Solution: Run vercel env pull .env.local
Solution: Check browser console for validation errors
Solution: Ensure useState hooks are properly initialized
Solution: Verify Toaster component is in layout.tsx
This project is private and proprietary to the Prosthetic Companion project.
For questions or support regarding this implementation:
Implementation Date: March 2, 2026
Version: 1.0.0
Status: β
Complete and Production Ready