shahryarjb

shahryarjb

Hello folks,
Before explaining the main problems, I have to provide more info about my project. I have been working on an elixir and phoenix CMS, which Phoenix LiveView powers for more than ten months.
When I decided to develop MishkaCMS, I had a good experience with WordPress, especially Joomla. So I searched in elixir, and I did not find a CMS like them, even the better things.
After 11 months, I have been developing this project and preparing tools to create a good site and API; now, I am forced to make a space that gives the developers a custom installation.
Custom installation is essential for the CMS project because it helps developers make everything they want and add them to my CMS without any change in the core of the CMS project. It is compatible with elixir 1.13.

https://github.com/mishka-group/mishka-cms



Main problems

As I expected, it should be hard because elixir is a compiler language, so I can’t move some files like PHP to the places I want and tell CMS, which is forced to load my template instead of the default one.
To reduce the impact of these problems on my project, I decided to improve my code and make them more modular. So I created some LiveView components and macros, which are easy to understand for a new programmer or even front developers that they just need to call a simple line with their custom template.

For installation custom template

  1. I reduced all default templates to one or three LiveView components, which are easy for developers to edit or replace these components in their custom templates.

But is there no way to install a custom template and activate it when the CMS project is online?
They are forced to create a hex plug and put their template files in my CMS structure. They should create them based on my CMS.
It depends on stopping server and run mix deps.get and after installation, CMS manager should select a template installed and makes it default. Now I have to find a way to store template module name that I think the best place for storing it is on Mnesia or Genserver state.

Result – 1: In the ways I gave as an example, a manager can install a custom template when he stops his/her server.

Result – 1: We have to store the name of the custom template module in a Genserver or Mnesia state, and my CMS should check it, if there is a template available then loads the template file instead of default CMS template of not just loads as before.

Do you have a suggestion?



For installation custom extension

A custom extension has the same problem as a custom template, but it has more issues than I have no idea.
In fact, the extension is an independent project, then it has its router and router is located in a hex plug which as a CMS, I do not know how can load a custom extension router, and I don’t see how many extensions I have in my project.
I think I can check mix. exs file and check all deps installed and find each deps has _mishka, but I still need to call their router in the main router.

By the way, I created MishkaCms with DDD pattern and each project has an elixir folder.

Result – 1: again we have to stop the server and run mix deps.get and the router problem I said

Do you have a suggestion?


At the end

I have read about JIT, but I don’t know if it is available in elixir 1.13 or not, and it can help me not to stop server when I want to add new hex plug in mix.exs

Unfortunately, I still have not created English documents for my project; after fixing the problems above and implementing RTL/LTR feature.
I prepare the documents as soon as possible and introduce my project in a separate post.
My project could be an excellent choice to create a blog with Elixir and Phoenix. It has many API endpoints to make an application, and my work on the iOS app is an opportunity. It has been created by LiveView and your users will have a good experience to work with your blog.
It is my honor you join me in this project.

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
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
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
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
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

Latest on Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews