joehua87

joehua87

  • Is it a bad idea?
  • Is Elixir the correct tooling?
  • Technical constraints?
  • How to handle the plugins, themes ecosystem? (maybe mix install?)

Thank you for reading :smiley:

Showing Posts 11 to 20

lud

lud

In PHP the new code will be loaded in an isolated process instead of being system wide, and you will not be able to redefine a module/class that already exists. This is best to try to run malicious code.

Plus PHP is easier with “one click install” providers I guess. That being said, I find using Luerl for plugins could be very cool and safe, though maybe not very fast.

joehua87

joehua87 OP

Thank you for all your responses, it boosted my confidence.

I thought I will list some of the top Wordpress plugins & find-out how to implement it, likely the most of them should be implemented in core, including:

  • Content management: should be like (Drupal, or Strapi) content types; User can define Post, Service, Project, …, & attach field to them
  • Querying, filter data: Ecto Query is a beast
  • The admin dashboard: not many people will use the admin dashboard, so we will keep all the state (Ecto data) in the LiveView socket, so mutations will be very fast; this is a big win
  • Field types: user also can define any field type, this will be validated with json schema (can replace Wordpress ACF Advanced custom field)
  • Products/orders: should be like Spree / Solidus
  • Rich text editor: Slate.js is a wonderful tooling for this (Slate can be serialize into json object), I think it should be handle on client side to reduce comunication between client-server (we later can use LiveView to render rich text object created by Slate)
  • Page builder: A block builder, just a set of some prebuilt component that can be composed
  • Dynamic routes: can be easily customized with Phoenix
  • SEO stuff: should be in core (like Yoast SEO)
  • SEO audit: should be in a separate app in umbrella; can analyze the content using internal (database) or external (send request) query
  • The system will expose an GraphQL endpoint using Absinthe
  • Image compression
    • When user upload an image, we will execute a sharp cli (will be bundled by the app) to generate derived images (argument should be like w_1200, w_1200,h_800 ), if it slow, we can make them communicate via RabbitMQ
  • Theming?
    • In some of my previous project, they were built with Svelte, React, Vue that consume data from GraphQL endpoint and bundled to ESM project, or docker image; managed by version. I see it’s too complicated.
    • Allow user to edit css directly, like some Tailwind editor out there, can be compiled & generate to minimized css
    • LiveView & Surface is evolving, so I thought we can build components using Surface. My try will be create an app for each theme, and call mix install (same for other plugins that haven’t listed above), do we have something like mix uninstall to unload an app?
  • Data Migration

Am I missing something important here? :smiley:
Thank you for reading; :smiley:

lawik

lawik

Nerves Core Team

I’ve spent some time thinking about this and some time going down paths I abandoned.

I have an effort underway which I’ve shared some stuff about in my newsletter. Since I’m aware that a CMS is a massive effort I’m trying to start with foundational libraries and stacking those bricks up over time.

Even on just this forum I’ve seen this idea come up and fall down.

I think Elixir could do great at CMS things but the road to featureful enough is absurd.

Give it a shot if you like. I applaud any effort in that direction but be aware that it is a lot of work.

My view on “solving” the CMS problem is pretty particular and it involves tackling this particular painpoint, among others: Underjord | The WordPress merging problem

For me it begins with making content type creation strong. And going down that route you’ll find out that Ecto schemas really are very compile-time and if you don’t want arbitrary atom proliferation, from code-gen, as a risk that leads to other choices. Can of worms :slight_smile:

I can share more when and if it starts to make sense :slight_smile:

Werner

Werner

There is a CMS system in itself for many years: Zotonic

However, Zotonic is based on Erlang, which can be extended and customized with your own modules and templates. The template-system is based on erlydtl.

My interest is rather Ecommerce, also for this Elixir would be actually well suited, there are also some companies that use it exactly for this, but just proprietary:

https://www.stitched.co.uk
https://www.therealreal.com/

For an open source ecommerce system you would need the possibility to develop plugins, especially to program your own themes for the store.

In Zotonic, for example, you can extend the template’s in a simple way via the blocks as in Django or PHP-Twig.

Zotonic Template’s

Twig-Template’s for Shopware

From time to time I try to figure out how to do this in Phoenix, but unfortunately I haven’t made any progress. Especially if there are other solutions instead of blocks? In such a store system, however, there can be hundreds of blocks, which are very fine-granular (as you can see in the shopware example).

I would be grateful for ideas regarding extensible templates in a nice way.

jescity

jescity

OMG I would so help you do this!! But I have to come back when I’m more awake. I’m going on awake idk, something crazy like 24+ hrs now. Yea so, goin to bed soon. But I love this thread. I’ll be back!! WOOT WOOT I’m already excited to do this!!!

julienmarie

julienmarie

I agree. The 3 complicated issues in building a decent CMS are:

  • Customizable content data schema without slowing down the whole system. Meaning on the fly migrations, etc…
  • Not saving configuration in database. Only data. Everything config related should be version controlled. Then the question is how to manage keys in a secure way ?
  • Finally, the plugin issue. Only solution I found is plugins should be separately deployed apps in the same cluster, subscribing and replying to events.
binarytemple

binarytemple

When you say, Wordpress, what do you mean, a content management system with WYSIWYG editing, image storage, and installable themes?

julienmarie

julienmarie

I would say those 3 are features that are not core to a CMS. Some CMS are headless, hence don’t need themes. If by WYSIWYG you mean drag and drop page builder, there were CMS before this exists. Images is just a type of content usually called Assets. Most CMS include a Digital Asset Management module, but, again, it’s an added feature.

I would venture the minimum set of features of a CMS would be:

  • creation and editing of content
  • a way to organize of content ( categories, tags, content types )
  • user management
  • content publishing ( publish, unpublish )
  • content storage ( db )

then, there need to be a way to distribute that content, depending on the platform. On the web, it would be linking a URL to a piece of content.

_jonas

_jonas

I’m intrigued by the title of the post since it’s something I’ve been thinking about a lot, I see the following problem, coming from the place of wanting to sometimes build websites for individuals and small to medium scale institutions:

Wordpress and similar PHP-backed headful (also rendering the website) CMS systems still offer an unmatched workflow for some reason:

  • You define a content schema in the UI
  • You write a theme in PHP
  • You’ll deploy everything including a database on one of the millions of PHP/wordpress specific hosts that exist for every country, with ease
  • You hand the hosting over to a client and they can edit the content in the CMS admin panel and update the website any time with ease, everything is pretty much seamless

Now web development has progressed over time, and there are much better options for building content-driven websites, I really like static site generators, Astro is a great one for example, I think the developer experience is kind of unmatched and on a technical level, generating HTML ahead of time and then just serving it makes a lot of sense compared to rendering every page on demand and hitting a database on every request when the content really only changes like once a month.

The problem is there is no CMS with a workflow as straightforward as what I mentioned above.
If it’s your own website, editing markdown files by hand may be an option, but you can’t expect non-technical users to be doing that, it barely works even with a wysiwyg editor.

There is the option of using a headless CMS, the cloud / Saas ones are usually quite expensive (see: Contentful), self hosting an Open Source one (Payload, Strapi, Directus) is feasible but comes with a maintenance burden – then you also need to rebuild the page on every change so you’d have to set that up usually on a secondary service that does the building and hosting like Cloudflare Pages or Netlify, which also means you probably also want to have a hosted git repo connected to that, from a third service like GitHub or GitLab, it just explodes in complexity, and how do I hand some amalgamation of services like that over to a client?

The git-backed static CMS (Like Netlify CMS, now Decap) options are okay, until you are dealing with sites that are heavy in media, then storing everything in a git repo is not feasible anymore and you have to add on services like a git LFS provider or S3, and you always need a minimal backend for authentication anyways.

My point is: I would love something that replaces Wordpress in simplicity for building completely custom content-backed websites for third parties that are not massive companies, I feel like there is nothing targeting that niche at the moment.

I’d prefer something that works with one of the existing excellent SSG solutions that there are, Astro is the one that comes to mind, the missing piece for me that I’ve seen no other CMS (except maybe Publii) do is actually doing the site builds on content change rather than giving you a webhook and pushing you towards setting that up with an additional third party service.

Inkognito

Inkognito

I think BeaconCMS by Dockyard is trying to solve this .
They are targeting the features you outlined which makes Word Press popular
including re-usable UI components and drag and drop UI page builder.

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 92995 915
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
GES233
I’m posting this in response to Jose’s recent tweet (Cr. link) : People are sleeping on Elixir for a coding harness: Hot-code swappi...
New
marciol
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
durvia
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes. We’re a small ...
New
nseaSeb
I’ve just put together a small POC exploring PDF inspection from Elixir/Phoenix: The idea is pretty simple: drag & drop a PDF in a...
New

Other Trending Topics Top

marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews