create-daraja-app
is a user-friendly command line interface tool designed to streamline the process of setting up a Daraja API with various frameworks with just a single command. By executing npx create-daraja-app
and following the subsequent instructions, developers can effortlessly initiate a new Daraja project.
To initiate a Daraja project, simply run the command npx create-daraja-app
and adhere to the prompts provided.
Note that (npx comes bundled with npm 5.2+ and higher, see instructions for older npm versions) and enables the execution of packages without the need for global installation.
The command generates a project scaffold with an organized structure and includes two essential endpoints:
/api/example/stk
Endpoint:
phone
and amount
within the request body./api/example/callback
Endpoint:
Below is a list of supported frameworks. Kindly contribute to add to the list.
This project is in early stage and actively welcomes contributions from the developer community to enhance its functionality and robustness. A dedicated CONTRIBUTING.md
file outlines guidelines and best practices for anyone interested in contributing to the create-daraja-app
project. Whether it's suggesting improvements, reporting issues, or submitting code contributions, community involvement is highly encouraged to foster collaboration.
Let's consolidate our efforts into one unified source (through a well-organized project, bootstrap, and readme) for generating MPesa Daraja APIs across various frameworks. This central resource encourages collaboration and contributions, eliminating the need for numerous scattered medium posts and guides.