A modern compliance management platform built with Vite, React, and TypeScript.
This code was generated by Magic Patterns for this design: Source Design
- Node.js 16+
- npm or yarn
- Clone the repository
- Run
npm install - Configure environment variables (see Configuration section below)
- Run
npm run devto start the development server - Open
http://localhost:3000in your browser
npm run build
npm run previewCreate a .env.local file in the root directory with the following variables:
# Email Configuration (for trial form submissions)
EMAIL_USER=[email protected]
EMAIL_PASSWORD=your-app-passwordNote: For Gmail, use App Passwords instead of your regular password.
The trial form submissions are sent via email to your configured email address.
- Enable 2-step verification on your Google account
- Generate an App Password at https://myaccount.google.com/apppasswords
- Use the generated 16-character password in
EMAIL_PASSWORD
Edit src/services/emailService.ts to configure your SMTP server.
POST /api/submit-trial-form- Submit trial form data via email (backend-only)- Request body:
{ fullName, email, companyName, teamSize, objectives, utmSource? } - Response:
{ success: boolean, message?: string, error?: string }
- Request body:
src/components/- React componentssrc/api/- API client functionssrc/lib/- Utilities and helperssrc/pages/api/- Backend API endpoints (Vercel serverless functions)src/services/- Service implementations (email, analytics, etc.)
- Trial Form: Collects user information and sends via email
- Multi-language Support: French and English
- Form Validation: Client-side with Zod, server-side validation
- Email Notifications: Sends confirmation to users and admin notifications
- Frontend: Never exposes email credentials
- Backend: Credentials stored as environment variables on the hosting platform
- HTTPS Only: All communication is encrypted in production
- Frontend: Initial validation using Zod and React Hook Form
- Backend: Complete validation before sending emails
This project is configured for deployment on Vercel:
- Push your code to GitHub
- Connect your repository to Vercel
- Set environment variables in Vercel project settings:
EMAIL_USER- Your email addressEMAIL_PASSWORD- Your app-specific password
- Deploy
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run linter
npm run lint- ✅ Trial form with email submission
- ✅ Multi-language support (FR/EN)
- ✅ Server-side validation
- ✅ Responsive design with Tailwind CSS
For questions or issues, please create an issue in the repository.