Can anyone point to a resource or themselves give a detailed explanation on how to build a page builder? I am interested in solutions based on Javascript language as it is the language I am most comfortable with.
Tech Stack I think can be used - React for the front end, Node.js for server/backend, Handlebars for templating.
What is your end goal?
I've built a prototype site builder based on Contentful (a headless CMS) and generating GatsbyJS sites. It is open source but poorly documented.
I am a freelance front-end developer and I didn't want to bother with a backend while being able to create cheap websites for clients. The solution is clearly not perfect but it is serving its purpose decently.
I tried other approaches including one with a Prisma backend. I found it very difficult to stay agile while needing to maintain back and front + the editing interface and handling clients at the same time. I discontinued that service.
If you ask more specific questions I will gladly share my experience.
@M4rrc0 it looks great. Is there a deployed instance of it where I can see this in action?
Sure. The marketing site is built with it and all the colored links in the portfolio will lead you to clients' websites.
I can tell you how I built our page builder in Mavenseed (https://mavenseed.com). It's not a JS solution (not necessary IMO), but maybe it'll give you some ideas.
No React. No Vue. No Angular. Just Ruby on Rails and some jQuery.
Let's start with architecture.
A page has_one page template. The template is a polymorphic model so it can be used with any model.
The template has many templates widgets. It’s a join model referencing the template, and the Widget that’s being offered. In Mavenseed we have upwards of 20 different widgets to build pages with.
In each Widget it has a number of settings, stored as JSONB. These are simple settings and store small strings of data.
On the front-end we have jQuery, and a few jQuery UI libs, namely draggable and sortable. Also bringing in Touchpunch so that these events work on touch screen devices.
With the approach above all the data lies in the template, which you can then export as JSON, and import back to rebuild the page.
thanks for your time. Unfortunately, I am not comfortable with RoR. I would surely look into it in the future.