A web application that can handle incoming WhatsApp messages and send automated replies on your behalf.
WhatsApp Business API Setup:
https://your-val-url.web.val.run/webhook
Environment Variables: Set these in your Val Town environment:
WHATSAPP_ACCESS_TOKEN
: Your WhatsApp Business API access tokenWHATSAPP_PHONE_NUMBER_ID
: Your WhatsApp Business phone number IDWEBHOOK_VERIFY_TOKEN
: A secret token for webhook verificationWebhook Configuration:
https://your-val-url.web.val.run/webhook
WEBHOOK_VERIFY_TOKEN
messages
events├── backend/
│ ├── index.ts # Main Hono server
│ ├── database/
│ │ ├── migrations.ts # Database schema
│ │ └── queries.ts # Database operations
│ └── routes/
│ ├── webhook.ts # WhatsApp webhook handler
│ ├── api.ts # API routes for frontend
│ └── static.ts # Static file serving
├── frontend/
│ ├── index.html # Main web interface
│ ├── index.tsx # React app entry point
│ └── components/
│ ├── App.tsx # Main app component
│ ├── Dashboard.tsx # Settings dashboard
│ └── MessageHistory.tsx # Message history view
└── shared/
└── types.ts # Shared TypeScript types
GET /
- Web interfacePOST /webhook
- WhatsApp webhook endpointGET /webhook
- Webhook verificationGET /api/settings
- Get current settingsPOST /api/settings
- Update settingsGET /api/messages
- Get message history