React on Remix and deployed to vercel. For my CSS I used Tailwind and some React Icons.
- Proper TypeScript types for all contact form data and email handling
- Separation of concerns with dedicated services and utilities
- Consistent error handling with custom error classes and logging
- Input validation and sanitization with proper security measures
- Configuration management through centralized constants
- Extracted email logic into dedicated service (
src/services/emailService.ts) - Improved email template generation with better HTML structure
- Better error handling
- Proper environment variable validation
- HTML sanitization to prevent XSS attacks
- Email format validation with robust regex
- Field length limits to prevent abuse
- Proper form data validation with detailed error messages
- Services layer:
src/services/for business logic - Types:
src/types/for TypeScript definitions - Utils:
src/utils/for shared utilities - Hooks:
src/hooks/for reusable React logic
To run Remix locally, make sure your project's local dependencies are installed:
npm installAfterwards, start the Remix development server like so:
npm run devOpen up http://localhost:3000 and you should be ready to go!