A comprehensive starter kit for building WhatsApp Business API applications. This open-source suite provides all the essential tools, components, and examples needed to quickly build and deploy WhatsApp-powered applications.
- Complete Starter Kit: Everything you need to build WhatsApp applications
- Multiple Integrations: API Playground, Embedded Signup, and Template Management
- Production Ready: Battle-tested components and configurations
- Modular Architecture: Use individual components or the complete suite
- TypeScript Support: Full type safety and IntelliSense support
- Responsive Design: Mobile-first approach with modern UI components
- Documentation: Comprehensive guides and examples
- Community Support: Active community and regular updates
- Frontend: Next.js 15 with App Router
- UI Framework: React 19
- Styling: Tailwind CSS
- Components: shadcn/ui
- Language: TypeScript
- Package Manager: pnpm
- Build Tool: Turbo
- State Management: Zustand
- API Client: Axios
- Node.js >= 20
- pnpm >= 10.15.0
# Clone the repository
git clone https://github.com/sendzen-io/whatsapp-api-starter-kit.git
# Navigate to the project directory
cd whatsapp-api-starter-kit
# Install dependencies
pnpm install
# Start the development server
pnpm devThe application will be available at http://localhost:3000
whatsapp-api-starter-kit/
βββ apps/
β βββ suite/ # Main application
β βββ api-playground/ # API testing interface
β βββ embedded-setup/ # Embedded signup component
β βββ template-management/ # Template management system
βββ packages/
β βββ ui-core/ # Core UI components
β βββ ui-api-playground/ # API playground components
β βββ ui-embedded-setup/ # Embedded setup components
β βββ ui-template-management/ # Template management components
β βββ ui-suite/ # Suite-specific components
β βββ typescript-config/ # Shared TypeScript configs
β βββ eslint-config/ # Shared ESLint configs
βββ docs/ # Documentation
Interactive interface for testing WhatsApp Business API endpoints:
- Message sending and receiving
- Template management
- Media upload/download
- Webhook testing
- Real-time API responses
Seamless onboarding component for WhatsApp Business API:
- Multi-step signup flow
- Phone number verification
- Business information collection
- API configuration setup
- Customizable UI themes
Complete template management system:
- Create and edit message templates
- Template approval workflow
- Bulk template operations
- Template analytics
- Multi-language support
Reusable UI components and utilities:
- Form components with validation
- Data tables and pagination
- Modal dialogs and notifications
- Loading states and error handling
- Theme system and dark mode
- Clone and Install
git clone https://github.com/sendzen-io/whatsapp-api-starter-kit.git
cd whatsapp-api-starter-kit
pnpm install- Environment Configuration
# Copy environment template
cp .env.example .env.local
# Edit with your credentials
nano .env.local- Start Development
pnpm devCreate a .env.local file:
# WhatsApp Business API
WHATSAPP_ACCESS_TOKEN=your_access_token_here
WHATSAPP_PHONE_NUMBER_ID=your_phone_number_id
WHATSAPP_BUSINESS_ACCOUNT_ID=your_business_account_id
WHATSAPP_WEBHOOK_VERIFY_TOKEN=your_webhook_verify_token
# API Configuration
WHATSAPP_API_BASE_URL=https://graph.facebook.com/v21.0
SENDZEN_API_BASE_URL=https://api.sendzen.io
# Database (if using database features)
DATABASE_URL=your_database_url_here
# Optional: Analytics and Monitoring
GOOGLE_ANALYTICS_ID=your_ga_id
SENTRY_DSN=your_sentry_dsn
# Optional: Authentication
NEXTAUTH_SECRET=your_nextauth_secret
NEXTAUTH_URL=http://localhost:3000The starter kit includes a comprehensive theming system:
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
whatsapp: {
50: '#f0fdf4',
100: '#dcfce7',
500: '#25D366',
600: '#128C7E',
900: '#075E54',
}
}
}
}
}Override default components:
// components/custom-button.tsx
import { Button } from '@sendzen/ui-core/components/button'
export function CustomButton({ children, ...props }) {
return (
<Button
className="bg-whatsapp-500 hover:bg-whatsapp-600"
{...props}
>
{children}
</Button>
)
}The main application that combines all features:
- Dashboard: Overview of all WhatsApp activities
- Message Center: Send and receive messages
- Template Manager: Manage message templates
- Analytics: Usage statistics and insights
- Settings: Configuration and preferences
Interactive API testing interface:
- Request Builder: Visual interface for API calls
- Response Viewer: Formatted API responses
- History: Track previous API calls
- Collections: Organize API requests
Standalone signup component:
- Embeddable: Can be integrated into any website
- Customizable: Match your brand colors and fonts
- Responsive: Works on all device sizes
- Accessible: Built with accessibility in mind
Dedicated template management system:
- Template Editor: Rich text editor for templates
- Approval Workflow: Submit templates for approval
- Bulk Operations: Manage multiple templates
- Analytics: Track template performance
# Development
pnpm dev # Start all applications
pnpm dev:suite # Start only suite app
pnpm dev:playground # Start only playground app
pnpm dev:embedded # Start only embedded app
pnpm dev:template # Start only template app
# Building
pnpm build # Build all applications
pnpm build:suite # Build suite app
pnpm build:playground # Build playground app
pnpm build:embedded # Build embedded app
pnpm build:template # Build template app
# Testing
pnpm test # Run all tests
pnpm test:unit # Run unit tests
pnpm test:integration # Run integration tests
pnpm test:e2e # Run E2E tests
# Linting and Formatting
pnpm lint # Lint all packages
pnpm lint:fix # Fix linting issues
pnpm format # Format code
pnpm check-types # Type checking- Create Feature Branch
git checkout -b feature/new-feature- Add Components to UI Packages
# Add to core UI package
pnpm --filter ui-core add component-name
# Add to specific package
pnpm --filter ui-suite add component-name- Update Applications
# Use new components in applications
pnpm --filter suite add @sendzen/ui-core@workspace:*# Install Vercel CLI
npm i -g vercel
# Deploy all applications
vercel --prod
# Deploy specific application
vercel --prod --cwd apps/suite# Build Docker images
docker-compose build
# Run with Docker Compose
docker-compose up -d# Build for production
pnpm build
# Start production server
pnpm start- Environment Variables: Secure handling of sensitive data
- API Keys: Proper API key management and rotation
- HTTPS: Enforce HTTPS in production
- CORS: Configured CORS policies
- Rate Limiting: Built-in rate limiting
- Input Validation: Comprehensive input validation
- Error Handling: Secure error messages
tests/
βββ unit/ # Unit tests
βββ integration/ # Integration tests
βββ e2e/ # End-to-end tests
βββ fixtures/ # Test fixtures
# Run all tests
pnpm test
# Run specific test types
pnpm test:unit
pnpm test:integration
pnpm test:e2e
# Run tests with coverage
pnpm test:coverage
# Run tests in watch mode
pnpm test:watch- Error Tracking: Automatic error reporting
- Performance Monitoring: Track application performance
- Usage Analytics: Monitor feature usage
- Health Checks: Application health monitoring
- Sentry: Error tracking and performance monitoring
- Google Analytics: Usage analytics
- Mixpanel: Event tracking
- LogRocket: Session replay and debugging
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes: Add new features or fix bugs
- Run tests:
pnpm test - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow TypeScript best practices
- Use conventional commit messages
- Add tests for new features
- Update documentation as needed
- Ensure all linting passes
- Follow the existing code style
Build Failures
- Check Node.js version (>= 20)
- Clear node_modules and reinstall
- Check TypeScript errors
API Connection Issues
- Verify API credentials
- Check network connectivity
- Validate API endpoints
Component Not Rendering
- Check import paths
- Verify component props
- Check browser console for errors
- Check the Issues page
- Review the Discussions section
- Join our community Discord server
- Read the FAQ
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Next.js
- UI components from shadcn/ui
- Icons from Lucide
- Powered by WhatsApp Business API
- Documentation: docs.sendzen.io
- Community: Discord
- Email: support@sendzen.io
- Website: sendzen.io
Made with β€οΈ by the SendZen team