Skip to content

Waitlist Signup

A prospective user visits the Encache landing page and submits their email address and optional metadata to join the product waitlist; the server deduplicates the entry and sends an internal notification to the team.

Flow

  1. User submits the form — The landing web app (apps/landing-web) sends a POST request to the waitlist endpoint with { "email": "...", "metadata": { "name", "glassesType", "useCase", "from" } }.

  2. CORS preflightOPTIONS requests return 200 with permissive CORS headers. Non-POST methods return 405.

  3. Input parsing — The request body is parsed as JSON. Invalid JSON returns 400.

  4. Email validation — The email is trimmed and lowercased. Missing, malformed (missing @ or .), or too-long (>254 chars) emails return 400 with a descriptive message.

  5. Field length validationname (≤100), glassesType (≤100), useCase (≤2000), and from (≤100) are checked. Oversized fields return 400.

  6. DynamoDB upsert — A conditional update_item is performed with the email as the key:

  7. name, glassesType, and useCase are always updated.
  8. createdAt is set only on first insert (if_not_exists).
  9. from is set only on first insert (if_not_exists), preserving the original referral source.

  10. Team notification — If NOTIFY_EMAILS and NOTIFY_SENDER are configured, SES sends an internal notification email. Notification failure is caught and logged but does not affect the response.

  11. Response — Returns HTTP 200 { "message": "Success" }.

Entry Point

  • Lambda: main/server/api/waitlist/app.pylambda_handler
  • HTTP method: POST /waitlist (API Gateway, no auth)

Dependencies

  • DynamoDB: WAITLIST_TABLE (default encache-waitlist)
  • AWS SES: NOTIFY_SENDER, NOTIFY_EMAILS (comma-separated)
  • CORS: CORS_ORIGIN (default *)