{"id":14987075,"url":"https://github.com/foyzulkarim/botsapp","last_synced_at":"2025-04-11T23:21:53.055Z","repository":{"id":80691242,"uuid":"492363951","full_name":"foyzulkarim/botsapp","owner":"foyzulkarim","description":"A bot builder on top of puppeteer's headless web browser mimicing your web.whatsapp.com functionalities.","archived":false,"fork":false,"pushed_at":"2022-05-26T04:30:04.000Z","size":6120,"stargazers_count":21,"open_issues_count":0,"forks_count":9,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-03-25T19:11:44.673Z","etag":null,"topics":["mern","mern-boilerplate","whatsapp","whatsapp-api","whatsapp-bot","whatsapp-chat","whatsapp-web"],"latest_commit_sha":null,"homepage":"https://wabot.bizbook365.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foyzulkarim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["foyzulkarim"],"patreon":"foyzulkarim","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://paypal.me/foyzul"]}},"created_at":"2022-05-15T01:51:45.000Z","updated_at":"2024-04-11T15:57:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"efeb90e8-bfd9-4479-9036-3c8c61741b63","html_url":"https://github.com/foyzulkarim/botsapp","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"03fe27819f9194de3432a99d567028584ec309a5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":"foyzulkarim/mernboilerplate-antd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foyzulkarim%2Fbotsapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foyzulkarim%2Fbotsapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foyzulkarim%2Fbotsapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foyzulkarim%2Fbotsapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foyzulkarim","download_url":"https://codeload.github.com/foyzulkarim/botsapp/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248493048,"owners_count":21113190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mern","mern-boilerplate","whatsapp","whatsapp-api","whatsapp-bot","whatsapp-chat","whatsapp-web"],"created_at":"2024-09-24T14:14:03.297Z","updated_at":"2025-04-11T23:21:53.036Z","avatar_url":"https://github.com/foyzulkarim.png","language":"JavaScript","readme":"# Welcome to the BizBook365 WhatsApp bot project\n\n### _A bot builder on top of puppeteer's headless web browser mimicing your web.whatsapp.com functionalities._\n\n## Demo \n[wabot.bizbook365.com](https://wabot.bizbook365.com)\n\n### Video explanation in Bangla\n[![Watch the video](./docs/images/bizbook365-wabot.png)](https://youtu.be/FSwREEdXD9Q)\n\n\n## Technology stack\n\nThis repository is built on top of Express.js, React.js, MongoDB and venom library, however in the implementation detail, we will find other supporting technologies as well.\n\n#### Client side\n\n- React - A JavaScript library for building user interfaces\n- Ant Design Pro - A design system for enterprise-level products. Create an efficient and enjoyable work experience\n- Testing Library - React Testing Library\n- Umi Request - HTTP client for the executing HTTP request from browser to server.\n\n#### Server side\n\n- Node.js - evented I/O for the backend\n- Express.js - Fast, unopinionated, minimalist web framework for Node.js\n- MongoDB - The application data platform for NoSQL databases\n- Mongoose - mongoose\n- Swagger - Swagger (Not done yet)\n- Jest - JavaScript testing framework\n- Super Test - Super test API testing framework\n- venom-bot - Venom is the most complete javascript library for Whatsapp\n\nDetails frameworks and packages can be found in the package.json files in server and client directory.\n\n## Running the application\n\n### Visual Studio Code\n\n#### Prerequisites\n\n- Node.js : To run npm packages\n- MongoDB : As a database for the application\n\n##### Steps\n\n- To run via vscode, we should run the server and client side projects separately, and also make sure mongodb is up and running.\n- Create a `.env` file inside of the `server` directory. Add the below entries or change accordingly. You can follow the `.env.sample` file to see the format.\n\n```\nDB_HOST=localhost\nDB_PORT=27017\nDB_NAME=appdb\nJWT_SECRET=secret\nJWT_EXPIRES_IN=100\nPORT=5000\nIS_MONGODB_CLOUD_URL=false\nMONGODB_CLOUD_URL=mongodb+srv:// \u003cUSER \u003e: \u003cPASSWORD \u003e@cluster0.abcd.mongodb.net/myFirstDatabase?retryWrites=true\nDEFAULT_PAGE_SIZE=10\nSENDGRID_API_KEY=123\nFRONTEND_URL=http://localhost:8000\nEMAIL_SENDER=info@bizbook365.com\nDEFAULT_EMAIL_RECEIVER=example.user@example.com\n```\n\n#### Server commands\nWe assume we run the MongoDB in the docker container.\n```sh\ncd server\nnpm i\nnpm run db:up\nnpm start\n```\n\n#### Client commands\n\n```sh\ncd client-pro\nnvm use --lts\nyarn\nyarn start\n```\n\n## Data seeding\n\nTo seed the database, we need to run the following commands in the server directory.\n\n```sh\nnpm run db:seed\nnpm run db:migrate\n```\n\nYou should be able to see the username and password in the `/server/setup/users.json` file. You can change these as you see fit.\n\n## Permission management ui \n\nI have introduced a permission management ui for the application. Sample image is given below.\n\n  ![Product List Page](./docs/images/permission-manage-ui.png)\n\n\n### Centralized log to `Sentry.io`\n\nWe can also send the logs to [sentry.io](https://sentry.io). To use this feature, we need to add the `dsn` entry into `client/src/env.config.js`.\nSetup snippet is like below in `index.js` file\n\n```javascript\nSentry.init({\n  dsn: Config.dsn,\n  integrations: [new Integrations.BrowserTracing()],\n  tracesSampleRate: 1.0,\n});\n```\n\n## ~~Test `server` API~~ (NOT DONE YET)\n\n~~To view the api, open your browser and visit `http://localhost:5000/api-docs`\nIdeally we should add all of the API endpoints into the swagger, but for the demo purpose, we only added Products API endpoint.  \nTo test the APIs, we can reuse the postman collection. Open `docs/rbac-mern-boilerplate.postman_collection.json` into [Postman](https://www.postman.com/) and you should see the endpoints with appropriate payloads.~~\n\n## Scripts\n\n| Project | Command           | Task                                                 |\n| ------- | ----------------- | ---------------------------------------------------- |\n| root    | `npm run build`   | Builds the containers                                |\n| root    | `npm run start`   | Start the projects and database in docker containers |\n|root|`docker exec -it appserver  /bin/sh` then `npm run db:seed`|Executes seed products inside container|\n| server  | `npm i`           | Install server side dependencies                     |\n| server  | `npm run db:up`   | Start the database in a docker container             |\n| server  | `npm run test`    | Execute tests using `jest`                           |\n| client  | `npm i`           | Install client side dependencies                     |\n| client  | `npm run start`   | Start the react app                                  |\n| client  | `npm run build`   | Build the react app in production mode               |\n| client  | `npm run test`    | Execute tests using `Testing Library`                |\n\n## Types of testing\n\nIn this repository, we have included both unit testing and integration testing. For now, the code coverage is very low, but we are working on it to make it more than 90% somewhere in the future\n\n### Client side\n\n- We incorporated only unit tests in client side, and mock all the externals dependencies like `localStorage` and `axios`.\n\nTo run the tests, we can run `npm run test` command.\n\n### Server side\n\n- Integration testing: We have integrated the `Jest` as the testing library, and we have added `supertest` and `mongodb-memory-server` packages to make the integration testing easier.\n- Unit testing: We have used `Jest` to test the service layers and mock the external dependencies like `MongoDB`.\n\nTo run the tests, we can run `npm run test` command.\n\n## License\n\nThis project is [MIT licensed](https://github.com/facebook/react/blob/main/LICENSE. However other open source projects used in this repository contains their own license.\n\n[//]: # \"These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax\"\n[node.js]: http://nodejs.org\n[express.js]: http://expressjs.com\n[docker]: https://www.docker.com\n[react]: https://reactjs.org/\n[mongodb]: https://www.mongodb.com/\n[ant design]: https://ant.design/\n[testing library]: https://testing-library.com/\n[styled components]: https://styled-components.com/\n[axios]: https://github.com/axios/axios\n[mongoose]: https://mongoosejs.com/\n[swagger]: https://swagger.io/\n[jest]: https://jestjs.io/\n[super test]: https://github.com/visionmedia/supertest\n\n\n## Contribution \nFor now, I am not taking any community contritutions in terms of code.  But if you have any suggestions or you found any bugs, please feel free to open an issue or a pull request.\n\nOn the other hand, if you want to know something, or want to start a discussion about this  project, please start a discussion in our GitHub's discussion board.\n","funding_links":["https://github.com/sponsors/foyzulkarim","https://patreon.com/foyzulkarim","https://paypal.me/foyzul"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoyzulkarim%2Fbotsapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoyzulkarim%2Fbotsapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoyzulkarim%2Fbotsapp/lists"}