A minimalist WhatsApp clone built with Next.js for developing and testing WhatsApp chatbots in a controlled environment.
This application is designed exclusively for development and testing purposes. It is NOT intended for production use or as a replacement for the official WhatsApp application.
This project provides a sandbox environment that allows developers to:
- Test WhatsApp chatbot responses without using actual WhatsApp infrastructure
- Simulate conversations between users and bots
- Develop and debug webhooks and API integrations
- Test the UI/UX of chatbot interactions in a WhatsApp-like interface
- Real-time messaging: Send and receive messages with persistent storage
- WhatsApp-like UI: Familiar interface mimicking WhatsApp Web
- Message status indicators: "Sending", "Sent", and "Error" states
- Temporary message handling: Optimistic updates with server reconciliation
- Auto-scrolling: Smart scroll behavior that respects user interactions
- Database integration: PostgreSQL backend for message persistence
- API webhook integration: Connect to your own chatbot backend services
- Connection status handling: Graceful handling of connectivity issues
- Frontend: Next.js, React, TypeScript, Tailwind CSS
- Backend: Next.js Server Actions, PostgreSQL with Drizzle ORM
- Node.js 18+ and npm/pnpm
- PostgreSQL database
Create a .env file in the root directory with:
DATABASE_URL="postgresql://username:password@localhost:5432/dbname"
CHATBOT_CALLBACK_URL="http://localhost:3001/api/webhook"
# Install dependencies
pnpm install
# Start the development server
pnpm run devTo connect your chatbot:
- Set
CHATBOT_CALLBACK_URLin your.envto point to your chatbot's webhook endpoint - Ensure your chatbot responds with the expected format (see API documentation)
- Use the interface to send messages and receive responses
This project is not affiliated with Meta, WhatsApp Inc., or any related entities. WhatsApp name and branding are properties of their respective owners. This clone is strictly for development and educational purposes.
MIT - Feel free to use and modify for your development needs.