- Add sendAutoReply() to email service with branded HTML template
- Auto-reply sends a professional thank-you with 1-business-day SLA
- Includes urgent contact info (phone + email) in a styled callout
- Wired into POST /api/contact alongside the internal notification
- Both emails are fire-and-forget (don't block API response)
- 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
- Create /api/auth routes for authentication
- Add POST /api/auth/token for code-to-token exchange
- Add GET /api/auth/callback for redirect-based flow
- Add GET /api/auth/config for frontend config
- Backend handles token exchange with client secret
- Works with Regular Web Application Auth0 type
- Replace sqlite3 (native) with sql.js (pure JS/WebAssembly)
- Fixes GLIBC version compatibility issues
- Rewrite database module for sql.js async API
- Add proper file persistence for sql.js (in-memory with save-to-file)
- Update server startup to initialize database before listening
sql.js works everywhere without native compilation
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)