Integrating ERPNext into a React PWA & React Native app

Hi Everyone,

New to the discussion board, and really glad to be on here.

I’m just getting to understand ERPNext on a deeper level, and have been trying to assess how best it might fit within our upcoming project so thought it best to ask directly on here.

We’re looking to build a JAMstack-based, Microservices platform which will include both an installable React PWA and React Native mobile apps.

Currently wondering what the best means of integrating ERPNext into our project - perhaps there is a relatively simple method to integrate via webhooks / REST api, or perhaps it will require some degree of refactoring in order to build such an integration…

In case it helps provide more context, we are mainly building with: MongoDB Realm, Fastify, React, NestJS, and Gatsby. We do however have Python developers within the team, so should be ok working with the Frappe Framework.

Looking forward to learning a bit more with regard to these points, as I certainly believe in the vision of this team and really respect the open source approach taken with this.

Thanks in advance.

1 Like
  • For service account like communication use apikey+apisecret of “service account” user
  • no need to touch frappe codebase unless it is Pull request
  • webhooks and rest api do most of the job
  • for user authorised communication use oauth2 code grant and implicit grant available in frappe
  • webhooks don’t fire for queries. They only fire for docevents. E.g. outstanding balance is updated by query, it won’t be broadcasted by webhooks
  • poll sync whatever necessary with service account
  • 2 way sync means shared mutable state. Don’t go there as a developer
  • use RxJS and FRP. It saves lot of memory and effort.
  • use docker to get frappe services running for webhook and api development
  • https://github.com/frappe/frappe_docker/wiki/Connect-to-localhost-services-from-containers-for-local-app-development
  • use existing whitelisted functions ReST API: List of whitelisted endpoints

NestJS+mongodb+angular/ionic app:
https://gitlab.com/castlecraft/excel-rma (agplv3, network distribution is copy)

App grants 4 freedoms that agplv3 protects. It is not a freebie.

This is not affordable for most single host, self hosted accounts.

Plug: castlecraft.in/erpnext

4 Likes