- Add nodemailer dependency for SMTP email delivery
- Create src/services/email.js with reusable email service
- Update POST /api/contact to send email notification after saving
- Email is sent fire-and-forget (doesn't block API response)
- Emails include both plain-text and HTML versions
- Reply-To header set to submitter's email for easy replies
- Add SMTP environment variables to .env.example
- Document email setup in README with provider-specific guides
Features:
- Express server on port 9991 with ESM syntax
- User registration, login, and session management
- Password hashing with bcryptjs
- SQLite database with sqlite3 package
- User credits and transaction tracking
- API key management
- Admin endpoints for user management
- Stripe and PayPal webhook endpoints (ready for integration)
- Rate limiting and error handling
- CORS and security headers with helmet
Database tables:
- users (accounts, subscriptions, credits)
- sessions (auth tokens)
- api_keys (user API access)
- credit_transactions (credit history)
- payments (payment tracking)