A standalone React application for customizing delivery notifications (SMS and Email) with real-time compliance validation.
Choose between two notification channels:
- SMS Templates - Text message notifications with real-time compliance validation
- Email Templates - Email notifications with custom subject lines and reply-to addresses
Both SMS and Email support the same notification events:
- Delivery Scheduled
- Out for Delivery
- Delivery Completed
- Delivery Missed
-
Real-time Validation:
- Character count with GSM-7/UCS-2 encoding detection
- SHAFT-C compliance checking (Sex, Hate, Alcohol, Firearms, Tobacco, Cannabis)
- URL detection with deliverability warnings (URLs shown in warning message)
- Phone number detection with spam filter warnings
- Invalid tag detection with clear error messages
- Excessive capitalization warnings
-
Compliance Scoring: 0-100 score with guidance
- Custom Subject Lines: Personalize email subject with dynamic tags
- Multi-line Body Content: Rich text formatting support
- Reply-To Configuration: Set custom reply-to email address for your account
- Dynamic Tags: Insert customer data like name, delivery time, tracking links
- Slack notifications to your designated channel
- Asana task creation in your project with automatic assignment and due dates
- Hidden unicorn celebration (press Ctrl+Shift+U)
- Dancing unicorns on rainbows with sparkle effects
- Mobile-responsive magical animations
- React 18
- Vite
- Vercel (hosting + serverless functions)
- Install dependencies:
npm install- Create a
.envfile (copy from.env.example):
cp .env.example .env- Add your environment variables to
.env:
SLACK_WEBHOOK_URL=your_slack_webhook_url
ASANA_ACCESS_TOKEN=your_asana_token
ASANA_PROJECT_ID=your_project_id
ASANA_ASSIGNEE_GID=your_asana_user_gid
ASANA_COLLABORATOR_GID=collaborator_asana_user_gid
- Start the development server:
npm run dev- Open http://localhost:5173 in your browser
- Install Vercel CLI:
npm install -g vercel- Login to Vercel:
vercel login- Deploy:
vercel- Set environment variables in Vercel dashboard:
- Go to your project settings
- Navigate to Environment Variables
- Add
SLACK_WEBHOOK_URL,ASANA_ACCESS_TOKEN,ASANA_PROJECT_ID - Optionally add
ASANA_ASSIGNEE_GIDandASANA_COLLABORATOR_GID
-
Push your code to GitHub
-
Go to https://vercel.com and import your repository
-
Configure build settings (Vercel should auto-detect Vite):
- Framework Preset: Vite
- Build Command:
npm run build - Output Directory:
dist
-
Add environment variables:
SLACK_WEBHOOK_URLASANA_ACCESS_TOKENASANA_PROJECT_IDASANA_ASSIGNEE_GID(optional)ASANA_COLLABORATOR_GID(optional)
-
Deploy!
- Go to https://api.slack.com/apps
- Create a new app or select existing
- Enable Incoming Webhooks
- Add webhook to your desired channel
- Copy webhook URL and add to environment variables
-
Generate a Personal Access Token:
- Go to Asana settings → Apps → Manage Developer Apps
- Create Personal Access Token
-
Find your Project ID:
- Open your Asana project
- Copy the project ID from the URL or use the Asana API
-
Get User GIDs (optional):
- Assignee GID - User who will be assigned the task (e.g., Marc Kuo)
- Collaborator GID - User who will be added as a follower and notified when task is completed (e.g., Sophie)
You can find a user's GID by calling the Asana API:
curl https://app.asana.com/api/1.0/users/me \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"Or search for users in your workspace:
curl https://app.asana.com/api/1.0/users?workspace=YOUR_WORKSPACE_GID \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
The
gidfield in the response is what you need for both variables.- If
ASANA_ASSIGNEE_GIDis not set, tasks will be created unassigned - If
ASANA_COLLABORATOR_GIDis not set, no follower will be added
-
Add all values to environment variables
To use a custom domain (e.g., sms-templates.yourdomain.com):
- Go to your Vercel project settings
- Navigate to Domains
- Add your custom domain
- Update your DNS records as instructed by Vercel
- Vercel project created and linked to repo
- Environment variables configured
- Slack webhook tested
- Asana integration tested
- Custom domain configured (optional)
- SSL certificate verified
- Mobile responsiveness tested
- Form validation tested
- Submission flow tested end-to-end
sms-customizer/
├── api/
│ └── submit.js # Vercel serverless function
├── src/
│ ├── components/
│ │ ├── ComplianceScore.jsx # SMS compliance scoring display
│ │ ├── EmailForm.jsx # Email template form
│ │ ├── EmailInput.jsx # Reusable email input
│ │ ├── EmailTemplateSection.jsx # Email template editor
│ │ ├── LoadingSpinner.jsx # Loading indicator
│ │ ├── NotificationTypeSelector.jsx # SMS vs Email chooser
│ │ ├── SMSForm.jsx # SMS template form
│ │ ├── SuccessMessage.jsx # Success confirmation
│ │ ├── TemplateSection.jsx # SMS template editor
│ │ ├── UnicornCelebration.jsx # Easter egg component
│ │ └── ValidationFeedback.jsx # SMS validation display
│ ├── utils/
│ │ ├── emailTemplateConfig.js # Email template configs
│ │ ├── smsValidation.js # SMS validation logic
│ │ └── templateConfig.js # SMS template configs
│ ├── App.jsx # Main app with routing
│ └── main.jsx # Entry point
├── index.html
├── package.json
├── vercel.json
└── vite.config.js
For issues or questions, contact the Routific development team.