Confused about ERPNext Web Page Builder vs Frappe Build vs Frappe UI

Context: I want to create a new front-end website to display products (Item doctype) from ERPNext in custom way. So far I focused fully on backend and desk customization, so I would like to make correct architectural decision before moving to writing actual code.

Can I embed websites generated in Frappe Builder in ERPNext custom apps or do they need to be treated as standalone apps on the same site? I like the design philosophy of Frappe Builder, but complete lack of documentation (only Setting Up) does not help.

If the answer above is false, are components from Frappe UI (https://ui.frappe.io/story/docs-getting-started-story-js) reusable in ERPNext apps?

And how those solutions are related to native ERPNext Web Page Builder (Web Page Builder)?

Thanks in advance for clarification - I could not find a resource explaining interdependencies between those solutions.

2 Likes

Frappe Builder is the newer generation and replacement of the ā€œWeb Pageā€ and is useful to create static/dynamic web pages.

The upcoming Frappe Studio is the newer generation and replacement of ā€œPortal Pageā€ and is useful to create Vue web applications.

Both of the above offer interactive drag-and-drop builders (no-code / low-code). And as far as I know, they use Frappe UI as a component library.

However if you would like to build your own web application (React/Vue) for your custom frappe application you can utilize Frappe Doppio with or without Frappe UI (Check ā€˜The Commit Companyā€™ and ā€˜Build with Husseinā€™ on YouTube).

Regarding your scenario, if your purpose is to simply display your products then Frappe Builder is the perfect solution for you. (Check Build With Hussein 2-episode series on YouTube)

If your plan is to make ecommerce so users can shop and order your products, then your best option is to create your custom frontend (Vue/React) through Frappe Doppio (with or without Frappe UI). Alternatively, if you prefer low-code / no-code builders then you might want to wait until Frappe Studio is released (promised in 2025 but no eta yet)

Regarding the original web page builder that ships with Frappe Framework, I think it will be discontinued in favor of the new Frappe Builder. And a similar scenario awaits Portal Pages which will be replaced by Frappe Studio.

6 Likes

Thank you for taking the time to write this summary. Earlier, they seemed redundant to me at first and I always wondered what problems each of those tried to solve, but now things got much clearer.

If you could elaborate more on:

  1. Frappe UI vs Doppio
  2. Frappe Doppio Without Frappe UI: what benefits does it provide over a conventional React/Vue? Why not directly React/Vue?
  3. Frappe Doppio With Frappe UI: What underlying front-end technology is it? Can we customize/extend our app using the underlying technology or are we limited to what Frappe Doppio With Frappe UI provides?

I am not from a front-end background but I am trying to understand each approachā€™s consequences.

Frappe Doppio does the hard work for you in setting up a Vue/React environment that connects seamlessly with your Custom Frappe App backend through ā€˜frappe react sdkā€™ in case of react, or Frappe UI in case of Vue.

These kits provide you the essentials to connect to your frappe backend (Fetch and CRUD on docs and doctypes) as well as other essentials like managing socket connections, authentication, etcā€¦

You can definitely create a separately hosted frontend for your app and connect them through API calls.

To understand more and to answer your questions read these resources;

To learn more what Doppio does

To learn more about frappe react sdk (React)

To learn more about how Frappe UI integrates with your backend and fetches resources
https://ui.frappe.io/story/docs-resources-list-resource-story-js

Resources If you prefer React;

Resources If you prefer Vue with Frappe UI

2 Likes

I appreciate your well-structured responses. Thanks again.

One more clarification and one related question, if you donā€™t mind.

  1. So frappe react sdk for React is what Frappe UI for Vue, right? Does the same job for each respective front-end technology, right? My question is: do you know if Frappe has a preference for one or the other? Since Frappe apps mainly use Vue, is frappe react sdk a non-sustainable choice?
  2. For custom Desk Pages (for logged-in users, via DocType: Page), and for Custom HTML Blocks, can we use Vue out of the box? I checked examples of Page and as far as I remember they were only Jinija which looked legacy or limited to me. And what about apps like Insights with their complete custom front?

I tried both of them in two different projects. While both options are poorly documented, I found Frappe UI easier to integrate with a frappe backend.

1a. Again, Frappe UI is a Vue component library (buttons, input fields, etcā€¦) however it uses frappe-js-sdk to integrate with your frappe backend.

1b. Almost all frappe applications have been / are being rebuilt with Frappe UI. (HRMS, Drive, Insights, Builder, Studio, CRM, Gameplan, Helpdesk) so I am pretty certain that Frappe UI will be supported on the long term.

1c. Regarding the React SDKā€™s long-term support, it depends on The Commit Company, the legends behind Raven.

  1. I donā€™t think you can, unless you wanna go build-less through Vue/React-Babel CDN/ESM. (For component management, you can create a doctype with a code field, and a data field to store your file name then write an on_update server script method to automatically generate and insert the file into the ā€˜Fileā€™ doctype (After deleting any existing similar file name). Your ā€œPageā€ or ā€œWebpageā€ will now serve as your index.html that will import all the external components)

Example


<script type="module">

import React from 'https://esm.sh/react'

// import your component files that were made through our custom code management doctype
   
import App from '/files/frontend/App.js '

</script>

Inside app you can do imports for your other components.

Notes on using the above method

  • You will need to version/timestamp your imports to bust cache
  • You have direct access to frappe js which is very nice
  • Remember to enable version history tracking for your code files management doctype
1 Like

Just adding to @Yamen_Zakhourā€™s excellent answers.

The Frappe core team has invested heavily in Vue, and Frappe UI is the ā€œofficialā€ modern front end solution. The shift is definitely towards site-hosted single-page apps (like Drive, Insights, etc.), with Builder and Studio intended to fill a user-friendly complementary role. Desk seems likely to remain the ā€œone UI to rule them allā€.

One huge advantage to Vue is that it can be added to a site incrementally. You can go big with a build step to make any application you imagine with modern tools, but you can also embed Vue easily into any existing webpage. I use Vue extensively on the Desk and have been really happy with the results. I donā€™t do much with Page doctypes, but Iā€™ve built template-driven dashboards in Custom HTML Blocks and full interactive applications in singelton doctypes. (Iā€™m sure Pages would work too, though Iā€™m not sure Iā€™d invest much time or energy in those at this point.)

2 Likes

I can give more context on Frappe React SDK.

Frappe React SDK and FrappeUI wouldnā€™t be comparable IMO.
Frappe React SDK is meant to only be a library to help you fetch/update data in Frappe and manage realtime connections. Under the hood it uses SWR. Itā€™s got first class support for Typescript and we use it with frappe-types (another Frappe app created by us for developers). However, Frappe React SDK does not contain any UI components - so itā€™s only React based utilities for fetching data and managing global state of that data.

FrappeUI does a lot more than just data fetching and updates. It also contains UI components - and you can see it being used in all new Frappe apps. The UI consistency between all Frappe apps is because of FrappeUI - it handles both data fetching/updates as well as provide you with building blocks to build the user interface.

As far as long term stability goes, I would argue both are equally well maintained. Since the React SDK is just for data fetching, we donā€™t need to update it a lot as compared to a UI library. We use React SDK on Raven and Commit, along with another large product weā€™re working on. Frappe UI will obviously be maintained since itā€™s being used in so many Frappe products.

Which one should you use ā†’ Whatever youā€™re most comfortable with.

If you build a desk page with React, you should not (and maybe cannot?) use Frappe React SDK since you have all the data fetching utilities from Frappe itself.

3 Likes

Thanks, @Yamen_Zakhour, @peterg, and @nikkothari22 for enriching the discussion, and thanks OP @testrid for initiating it.

I have no further questions but if anyone has additional insights that might benefit other readers, please go ahead and share :pray:

1 Like