DidactMacros

DidactMacros

White-label Best Practices and Handling Contexts in White-label (Multi-tenanted) Application

I’m in the process of implementing a white-label application with the help of this guide (I’ve diverge somewhat with respect to handling of subdomain routing).

I want to implement some sort of nesting for contexts to separate the business logic in the same way that multi-tenancy isolates the data.

I’d appreciate some tips here. I plant to implement the business logic isolation after the multi-tenancy is implemented.

I have already implemented a router per-subdomain approach for routing, so each subdomain is going to have custom layouts, core-components, controllers, views, and components.

What rules am I breaking so far (with respect to best practices)?

How important are those rules for security, performance and extensibility?

How can I address potential security concerns?

What surprises may I encounter when nesting the contexts so as to organise and isolate distinguish business logic?

I’ve seen the mix phx.new apps/<app_name> approach here.

Does the approach I’m using offer limitations and obstacles overcome by the above approach? (btw I’m not requesting that one read the entire guide linked above, however, I would appreciate perusal of the section that shows use of mix phx.new within an existing project)

Please let me know if clarity is required.

First Post!

garrison

garrison

If you are implementing all of these things (and contexts) separately for each domain, can you explain which things are shared? My impression of “white-labeling” was that everything would be about the same, save for some (relatively) trivial branding changes.

Where Next?

Popular in Questions Top

nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
beno
I will often find my self writing things similar to: case some_value do nil -&gt; something() "" -&gt; something() _ -&gt; somethi...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call t...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement