You are browsing as a guest. Sign up (or log in) to start making projects!

1h 11m 3s logged

Summary : Email delivery system integration (Contact Form + OTP), Railway deployment debugging, and infrastructure troubleshooting.

What’s Complete

  1. Email Service Architecture (Priority-Based Fallback)Status: Fully Integrated & Production-Ready

Contact Form Email Flow

  • File: src/routes/contact.js
  • Priority 1 (Production): Resend API — works on Railway, no outbound restrictions
  • Priority 2 (Local Dev): Nodemailer + Gmail SMTP (port 587, TLS)
  • Format: Visitor name in sender, reply-to set to visitor email for direct Gmail replies
  • Testing: Verified via curl — email successfully delivered to [email protected]

OTP Email Flow

  • File: src/routes/auth.js
  • Priority 1 (Production): Resend API — handles 6-digit OTP codes
  • Priority 2 (Local Dev): Nodemailer + Gmail SMTP
  • Timeout: 5-minute code expiration
  • Verified: Code generation and storage logic working correctly

2. Frontend Contact Form Fix

Status: Resolved Event Binding Issue

  • Problem: DOMContentLoaded event wrapper in contact.js was unreliable because script loads after DOM already ready
  • Solution: Removed wrapper, direct event attachment at script execution- Added: Console debug logging for form submission tracking and error diagnosis
  • Result: Form submission now reliably attaches event listeners and sends fetch requests

3. Railway Deployment Testing*

Status: Contact form working in production

  • Domain: https://duskcoffee-production.up.railway.app
  • Tested by: User (Kaedara) — successfully sent contact message
  • Response logs show: Payload received, message queued, response returned to frontend
  • Email delivery: Via Resend (Nodemailer fallback blocked due to Railway SMTP restrictions)
0
5

Comments 1

@Diqi

omg theres actually still a problem with send otp logic