A production-ready SaaS certificate generator with Vite frontend and n8n backend orchestration. Supports single and bulk certificate generation with custom templates or AI-generated designs, automated delivery via Gmail and WhatsApp.
✨ Dual Generation Modes
- AI-Generated: Let Google Gemini create beautiful certificate designs automatically
- Custom Template: Upload your own template (PNG, JPG, PDF) with customizable placeholders
📧 Multi-Channel Delivery
- Email via Gmail API
- WhatsApp via Evolution API
- Support for both channels simultaneously
📊 Bulk Processing
- Excel file upload (.xlsx, .xls)
- Google Sheets integration
- Field mapping interface
- Progress tracking and error reporting
🎨 Modern UI
- Built with React + TypeScript
- TailwindCSS styling
- Responsive design
- Real-time validation
certificate_v1/
├── src/
│ ├── components/
│ │ ├── CertificateForm.tsx # Main form component
│ │ ├── BulkUpload.tsx # Bulk upload interface
│ │ └── CertificatePreview.tsx # Preview component
│ ├── services/
│ │ └── webhookService.ts # n8n webhook integration
│ ├── types/
│ │ └── certificate.ts # TypeScript definitions
│ ├── config/
│ │ └── config.ts # Configuration
│ ├── App.tsx # Main app
│ └── index.css # Styles
├── N8N_WORKFLOW_GUIDE.md # Detailed n8n setup guide
└── README.md # This file
- Install dependencies:
npm install- Configure environment variables:
Create a
.envfile in the root directory:
VITE_N8N_WEBHOOK_URL=http://localhost:5678/webhook/certificate- Start development server:
npm run devThe application will be available at http://localhost:5173
- Install n8n (if not already installed):
npm install -g n8n- Install required packages in n8n:
# In your n8n directory
npm install node-html-to-image xlsx- Configure environment variables:
Add to your n8n
.envfile:
GEMINI_API_KEY=your_gemini_api_key
EVOLUTION_API_URL=http://localhost:8080
EVOLUTION_API_KEY=your_evolution_api_key
EVOLUTION_INSTANCE=your_instance_name- Import workflows:
- Follow the detailed guide in
N8N_WORKFLOW_GUIDE.md - Create the main orchestrator workflow
- Set up sub-workflows for AI generation, custom templates, and delivery
- Select "Single Certificate" mode
- Choose "AI Generated" template type
- Enter recipient information:
- Name, Badge/Title, Date
- Description (optional)
- Issuer name
- Optionally add brand colors (hex codes)
- Select delivery channels
- Click "Generate & Send Certificate"
- Select "Single Certificate" mode
- Choose "Custom Template" template type
- Upload your template file
- The system will automatically position placeholders
- Enter recipient data
- Select delivery channels
- Generate and send
- Select "Bulk Generation" mode
- Choose "Excel File" as data source
- Upload your Excel file with columns:
- Name, Badge, Date, Description (optional)
- Email, WhatsApp (based on delivery channels)
- Map Excel columns to certificate fields
- Select template type (AI or Custom)
- Process bulk certificates
- Select "Bulk Generation" mode
- Choose "Google Sheets" as data source
- Enter your Google Sheets URL
- Specify sheet name (default: Sheet1)
- Map columns to fields
- Select template type
- Process
{
"mode": "single",
"templateType": "ai",
"data": {
"name": "John Doe",
"badge": "Excellence Award",
"date": "2026-01-14",
"description": "For outstanding achievement",
"issuer": "ABC Organization"
},
"branding": {
"colors": ["#1e40af", "#3b82f6"]
},
"delivery": {
"email": "john@example.com",
"whatsapp": "+1234567890",
"channels": ["gmail", "whatsapp"]
},
"sender": {
"name": "ABC Organization",
"email": "sender@abc.org"
}
}{
"success": true,
"certificateId": "cert_abc123",
"deliveryStatus": {
"gmail": "sent",
"whatsapp": "sent"
},
"preview": "data:image/png;base64,..."
}n8nWebhookUrl: n8n webhook endpointmaxFileSize: Maximum upload file size (default: 10MB)supportedImageFormats: Allowed template formatssupportedExcelFormats: Allowed Excel formatsmaxBatchSize: Maximum bulk records (default: 100)
See N8N_WORKFLOW_GUIDE.md for detailed workflow setup and configuration.
npm run buildDeploy the dist folder to:
- Vercel:
vercel --prod - Netlify: Drag & drop
distfolder - cPanel: Upload to
public_html
Set VITE_N8N_WEBHOOK_URL to your production n8n URL
# Using PM2
pm2 start n8n
# Using Docker
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
n8nio/n8n- Deploy to n8n.cloud
- Import workflows
- Configure credentials
- Update frontend webhook URL
- API Keys: Never commit API keys - use environment variables
- CORS: Configure CORS in n8n for your frontend domain
- Rate Limiting: Implement rate limiting in n8n
- Input Validation: Both frontend and backend validate inputs
- File Upload: Validate file types and sizes
- Authentication: Add user authentication for production use
Frontend won't connect to n8n
- Check
VITE_N8N_WEBHOOK_URLin.env - Verify n8n is running on specified port
- Check CORS settings in n8n
Certificates not generating
- Check n8n workflow is activated
- Verify Gemini API key is valid
- Check node-html-to-image is installed
Email delivery failing
- Verify Gmail credentials in n8n
- Check OAuth2 configuration
- Review Gmail sending limits
WhatsApp not sending
- Confirm Evolution API is running
- Verify instance is connected
- Check API key and URL
npm run testnpm run lint
npm run formatnpm run type-check-
Database Integration
- Store certificate records
- Track delivery status
- User management
-
Cloud Storage
- Store templates in S3/GCS
- Reference by URL instead of Base64
-
Queue System
- Redis-based queue for bulk jobs
- Async processing with webhooks
-
Multi-Tenancy
- Tenant isolation
- Per-tenant quotas
- Custom branding per tenant
-
Monitoring
- Application Performance Monitoring
- Error tracking (Sentry)
- Analytics
- Frontend: Vite, React 18, TypeScript
- Styling: TailwindCSS
- Form Handling: React Hook Form + Zod
- HTTP Client: Axios
- Backend: n8n workflow automation
- AI: Google Gemini 1.5
- Email: Gmail API
- WhatsApp: Evolution API
- File Processing: XLSX, node-html-to-image
MIT License - feel free to use for personal or commercial projects
For issues and questions:
- Check
N8N_WORKFLOW_GUIDE.mdfor n8n setup - Review the troubleshooting section
- Consult n8n documentation: https://docs.n8n.io
- Check Evolution API docs: https://doc.evolution-api.com
Built with ❤️ for seamless certificate generation and delivery