Thank you for your interest in contributing to meta-cloud-api! This document provides guidelines and instructions for contributing to this project.
By participating in this project, you are expected to uphold our Code of Conduct:
- Be respectful and inclusive
- Be patient and welcoming
- Be thoughtful
- Be collaborative
- Gracefully accept constructive criticism
-
Fork and clone the repository
git clone https://github.com/froggy1014/meta-cloud-api.git cd meta-cloud-api -
Install dependencies
npm install # or yarn # or pnpm install
-
Set up environment variables
Copy the
.env.examplefile to.envand fill in the required values:cp .env.example .env
-
Build the project
npm run build # or yarn build # or pnpm build
The project is organized as follows:
packages/meta-cloud-api/
├── dist/ # Compiled output
├── examples/ # Example projects
├── src/ # Source code
│ ├── api/ # API modules organized by domain
│ ├── types/ # TypeScript type definitions
│ ├── utils/ # Utility functions
│ ├── webhook/ # Webhook handling
│ ├── index.ts # Main entry point
│ └── whatsapp.ts # Main WhatsApp client
├── tests/ # Test files
└── ...
main- Main development branch- Feature branches should be created from
mainand named descriptively:feature/new-feature-namefix/bug-descriptiondocs/what-was-documented
We follow Conventional Commits for commit messages:
feat:- A new featurefix:- A bug fixdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code changes that neither fix bugs nor add featurestest:- Adding or modifying testschore:- Changes to build process or auxiliary tools
Examples:
feat: add support for template components
fix: correct HTTP method for marking messages as read
docs: update README with webhook examples
- Create a new branch from
main - Make your changes
- Run tests:
npm test - Update documentation if needed
- Submit a pull request
- Ensure the PR description clearly describes the problem and solution
- Include the relevant issue number if applicable
- Request a review from maintainers
- Use TypeScript for all new code
- Maintain strong typing (avoid
anywhen possible) - Follow the existing code style in the project
- Use interfaces for object shapes
- Properly document public APIs with JSDoc comments
- Add tests for all new features and bug fixes
- Ensure all tests pass before submitting a PR
- Aim for high test coverage for critical paths
- Update the README and documentation for any user-facing changes
- Include JSDoc comments for all public APIs
- Document complex algorithms or design decisions with inline comments
- Update example projects if needed
Please use GitHub Issues to report bugs or request features:
- Search for existing issues before creating a new one
- Provide detailed reproduction steps for bugs
- Include relevant information:
- Package version
- Node.js version
- Environment details
- Error messages and stack traces
For feature requests:
- Clearly describe the problem you're trying to solve
- Suggest a solution if you have one in mind
- Indicate if you're willing to help implement it
- GitHub Issues: For bug reports and feature discussions
- Pull Requests: For code review discussions
Thank you for contributing to meta-cloud-api!