Keep it simple. This service does one thing: send WhatsApp messages through ONE session.
- Single responsibility - One service, one purpose
- Simple over clever - Readable code beats smart code
- Explicit over implicit - Clear is better than concise
- No premature optimization - Solve real problems, not imaginary ones
- Be honest about limitations - We don't hide what we can't do
- No feature creep - Every feature must have a clear use case
- No complex abstractions - Keep it simple and direct
- Clear error messages - Help users understand what went wrong
- Well-documented code - JSDoc for all public functions
- Be honest about limitations - Clear about what we support vs don't
- Fork the repository
- Clone your fork:
git clone https://github.com/caiopizzol/whatsapp-web-api.git - Install dependencies:
npm install - Create a branch:
git checkout -b feature/your-feature
- Make your changes
- Run linting:
npm run lint - Run formatting:
npm run format - Test manually (automated tests coming soon)
- Commit with clear message
- Push and create PR
- We use ESLint and Prettier (automatic via git hooks)
- Use JSDoc comments for functions
- Keep functions small and focused
- Prefer explicit over implicit code
- Describe what your PR does - Clear title and description
- Reference any related issues - Link to issues being fixed
- Keep PRs focused - One feature/fix per PR
- Include examples - Show how to use new features
- Support for more whatsapp-web.js features (media, groups, etc)
- Better error handling
- Performance improvements
- Documentation improvements
- Bug fixes
- Security improvements
- Performance optimizations (with benchmarks)
- Documentation improvements
- Simple feature additions (with clear use case)
- Multi-session management - Use multiple instances instead
- Message queuing - Use RabbitMQ/Redis externally
- Rate limiting - Gateway responsibility
- Database integration - Keep it stateless
- Complex configuration - Environment variables only
- Framework dependencies - Stick to standard Node.js
- Features that significantly complicate the codebase
The underlying library supports many features we don't use yet:
- Media messages (images, documents, audio, video)
- Group messaging
- Reactions
- Status updates
- Contacts
- Location sharing
If you need these, feel free to add them! Just:
- Keep the HTTP API simple
- Add proper validation
- Update the README
- Include examples
If you're unsure about a design decision, ask yourself:
- Does this solve a real problem?
- Is this the simplest solution?
- Does this add complexity for edge cases?
- Can this be solved externally?
When in doubt, choose simple.
// Clear, explicit error handling
if (!phone || typeof phone !== 'string') {
throw new Error('Phone must be a non-empty string');
}// Clever but unclear
const isValid = phone?.length > 0 && typeof phone === 'string';
if (!isValid) throw new Error('Invalid phone');Currently manual testing. Future automated testing should be:
- Simple integration tests
- No complex mocking
- Real WhatsApp service tests (with test numbers)
- Always test with real resource monitoring (Puppeteer is heavy)
- Open an issue for questions
- Check existing issues first
- Be specific about your use case
- Include relevant code/config
Be respectful, be helpful, be constructive. We're all here to build something useful together.