# I'm curious if I can have a feature like Elixir/Phoenix umbrella project when using Ruby On Rails

**URL:** <https://forum.devtalk.com/t/im-curious-if-i-can-have-a-feature-like-elixir-phoenix-umbrella-project-when-using-ruby-on-rails/1335>\
**Category:** Backend Questions/Help\
**Tags:** elixir, ruby, rails, phoenix\
**Created:** [17 August 2020 04:18 UTC](https://forum.devtalk.com/t/im-curious-if-i-can-have-a-feature-like-elixir-phoenix-umbrella-project-when-using-ruby-on-rails/1335 "2020-08-17T04:18:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kurisu](https://forum.devtalk.com/user_avatar/forum.devtalk.com/kurisu/32/1106_2.png) [@Kurisu](https://forum.devtalk.com/u/Kurisu)\
**Post date:** [17 August 2020 04:18 UTC](https://forum.devtalk.com/t/im-curious-if-i-can-have-a-feature-like-elixir-phoenix-umbrella-project-when-using-ruby-on-rails/1335/1 "2020-08-17T04:18:42Z")

</div>

Following on an old discussion I started on Elixir Forum [here](https://elixirforum.com/t/would-you-mind-helping-me-choose-an-additional-web-framework-to-phoenix/27901), I finally made my mind to learn Ruby on Rails in addition to Elixir/Phoenix. The thread is visible only for Elixir Forum members.

One of the things that makes me going for that choice is that even if Ruby is not Elixir, the syntax seems a bit familiar to me at a quick glance. So I think my learning would be somehow fast.

But I really appreciate Elixir umbrella feature and after some googling I’m not finding anything similar for Ruby. So I would like to know if there is at least a way when working with Rails to have multiple web apps in the same project but into different folders (separated controllers, views, templates , assets) but still sharing for example some core “context modules”.

Thanks

---

<div class="post-metadata">

**Author:** ![AstonJ](https://forum.devtalk.com/user_avatar/forum.devtalk.com/astonj/32/7_2.png) [@AstonJ](https://forum.devtalk.com/u/AstonJ)\
**Post date:** [17 August 2020 13:35 UTC](https://forum.devtalk.com/t/im-curious-if-i-can-have-a-feature-like-elixir-phoenix-umbrella-project-when-using-ruby-on-rails/1335/2 "2020-08-17T13:35:51Z")

</div>

I don’t think there is anything exactly like Umbrellas, but there are some architectural styles in Rails land that might be of interest to you, like this one:

> # The Modular Monolith
> 
> Here’s how we do it.
> 
> - We don’t have an `app/` directory in our Rails project. All of our code is either in `gems/` or `engines/.`
> - Gems contain Ruby code that does not depend on Rails. We use ActiveSupport, but we do not use ActiveRecord or ActionPack. The gems are all stateless.
> - Engines contain Ruby code that does depend on Rails. Persistence happens at this layer through ActiveRecord. API and Web interfaces are exposed at this layer through ActionPack.

[https://medium.com/@dan\_manges/the-modular-monolith-rails-architecture-fb1023826fc4](https://medium.com/@dan_manges/the-modular-monolith-rails-architecture-fb1023826fc4)

---

<div class="post-metadata">

**Author:** ![Kurisu](https://forum.devtalk.com/user_avatar/forum.devtalk.com/kurisu/32/1106_2.png) [@Kurisu](https://forum.devtalk.com/u/Kurisu)\
**Post date:** [17 August 2020 15:28 UTC](https://forum.devtalk.com/t/im-curious-if-i-can-have-a-feature-like-elixir-phoenix-umbrella-project-when-using-ruby-on-rails/1335/3 "2020-08-17T15:28:28Z")

</div>

Thanks @AstonJ !  
At this moment it seems a bit complex for me but I felt the same with elixir Umbrella when started Elixir some time ago. I think once I will get more familiar with the basics I can go on the path suggested on the blog post. I just wanted to be sure there are such solutions before starting my new journey. ^^

---

<div class="post-metadata">

**Author:** ![AstonJ](https://forum.devtalk.com/user_avatar/forum.devtalk.com/astonj/32/7_2.png) [@AstonJ](https://forum.devtalk.com/u/AstonJ)\
**Post date:** [17 August 2020 16:39 UTC](https://forum.devtalk.com/t/im-curious-if-i-can-have-a-feature-like-elixir-phoenix-umbrella-project-when-using-ruby-on-rails/1335/4 "2020-08-17T16:39:11Z")

</div>

Is there any particular reason why you want to do it?

Something I do with almost all of my Rails apps (thanks to a tip from Yehuda Katz) is to create a `classes` folder in my `app` directory and this is where all my non-Rails functionality lives - you may find this is sufficient 😃

---

<div class="post-metadata">

**Author:** ![Kurisu](https://forum.devtalk.com/user_avatar/forum.devtalk.com/kurisu/32/1106_2.png) [@Kurisu](https://forum.devtalk.com/u/Kurisu)\
**Post date:** [17 August 2020 18:14 UTC](https://forum.devtalk.com/t/im-curious-if-i-can-have-a-feature-like-elixir-phoenix-umbrella-project-when-using-ruby-on-rails/1335/5 "2020-08-17T18:14:26Z")

</div>

> [@AstonJ](#):
>
> Is there any particular reason why you want to do it?

It’s just that I’m a bit obsessed with tidying up things. 😅  
I like to see a clear separation between a project modules according to their function. This way I can for example take a folder and know that everything related to the administration interface is there and reuse it in another project.

---

<div class="post-metadata">

**Author:** ![AstonJ](https://forum.devtalk.com/user_avatar/forum.devtalk.com/astonj/32/7_2.png) [@AstonJ](https://forum.devtalk.com/u/AstonJ)\
**Post date:** [17 August 2020 18:23 UTC](https://forum.devtalk.com/t/im-curious-if-i-can-have-a-feature-like-elixir-phoenix-umbrella-project-when-using-ruby-on-rails/1335/6 "2020-08-17T18:23:04Z")

</div>

A gem or engine sounds like what you want (if you want ‘everything’ related to it packaged in one place). Although not quite the same, namespacing may be worth a look:

> **[An alternative to organizing large Rails projects with Namespacing](https://johnmaddux.com/2019/11/19/an-alternative-to-organizing-large-rails-projects-with-namespacing/)**
>
> Do you have a Rails app that has gotten so big it is getting hard to know what is going on? When you have a new Rails app it is easy to tell what the app does by looking at the files in the models …

---

<div class="post-metadata">

**Author:** ![cpgo](https://forum.devtalk.com/user_avatar/forum.devtalk.com/cpgo/32/635_2.png) [@cpgo](https://forum.devtalk.com/u/cpgo)\
**Post date:** [10 September 2020 00:42 UTC](https://forum.devtalk.com/t/im-curious-if-i-can-have-a-feature-like-elixir-phoenix-umbrella-project-when-using-ruby-on-rails/1335/7 "2020-09-10T00:42:27Z")

</div>

I know this question is a bit old now but the [hanami framework](http://hanamirb.org/) architecture might be just what you want.  
As a bonus hanami nicely integrates with some [dry-rb.org](http://dry-rb.org) gems which in my opinion are some of the coolest things happening on ruby right now.

---

<div class="post-metadata">

**Author:** ![AstonJ](https://forum.devtalk.com/user_avatar/forum.devtalk.com/astonj/32/7_2.png) [@AstonJ](https://forum.devtalk.com/u/AstonJ)\
**Post date:** [10 September 2020 01:51 UTC](https://forum.devtalk.com/t/im-curious-if-i-can-have-a-feature-like-elixir-phoenix-umbrella-project-when-using-ruby-on-rails/1335/8 "2020-09-10T01:51:33Z")

</div>

Dry-rb looks super interesting Cassio! I’d like to see some books on modern Ruby development (maybe it’s something @PragmaticBookshelf might do!)

It was only recently that I discovered Ruby has Structs - I’m pretty sure none of my books mentioned them when I was learning Ruby.

I reckon we should start a thread about Dry-rb/Modern Ruby - I’m sure plenty of people will be interested in what’s happening in the Ruby world atm - including me! 🤓

---

<div class="post-metadata">

**Author:** ![Kurisu](https://forum.devtalk.com/user_avatar/forum.devtalk.com/kurisu/32/1106_2.png) [@Kurisu](https://forum.devtalk.com/u/Kurisu)\
**Post date:** [10 September 2020 07:49 UTC](https://forum.devtalk.com/t/im-curious-if-i-can-have-a-feature-like-elixir-phoenix-umbrella-project-when-using-ruby-on-rails/1335/9 "2020-09-10T07:49:52Z")

</div>

> [@cpgo](#):
>
> As a bonus hanami nicely integrates with some [dry-rb.org](http://dry-rb.org/) gems which in my opinion are some of the coolest things happening on ruby right now.

Thanks for the feedback. ^^

In the Elixir forum discussion, [someone had also suggested the Hanami framework](https://elixirforum.com/t/would-you-mind-helping-me-choose-an-additional-web-framework-to-phoenix/27901/26?u=kurisu) to me and after a quick overview, it seemed really tempting to me then.

My only concern is that I don’t want to roll my own implementation for things such as Authentication, Administration, files Uploads/Downloads management… All that things that are highly maintained and ready to be used in the most popular web frameworks. I have already to deal with such concern with Elixir/Phoenix which I love but unfortunately I had to change several times a library by another (or rolled my own) because the first is no longer maintained. That is also why I deciced in the first place to learn a second web framework that I can use for case I want to go really fast and fully rely on production ready libraries for much eveything.

So if I can use most of the rails gems or have their alternatives with Hanami, it would be really great. I really like the feeling I have from an overview of the framework. ^^

---

<div class="post-metadata">

**Author:** ![cpgo](https://forum.devtalk.com/user_avatar/forum.devtalk.com/cpgo/32/635_2.png) [@cpgo](https://forum.devtalk.com/u/cpgo)\
**Post date:** [10 September 2020 12:35 UTC](https://forum.devtalk.com/t/im-curious-if-i-can-have-a-feature-like-elixir-phoenix-umbrella-project-when-using-ruby-on-rails/1335/10 "2020-09-10T12:35:30Z")

</div>

Well, regarding file uploads you can use [shrine](https://github.com/shrinerb/shrine) which is really well desgined and have a thin wrapper for hanami ([https://github.com/katafrakt/hanami-shrine](https://github.com/katafrakt/hanami-shrine))

For authentication there is the awesome (as any thing by jeremy evans) [rodauth](https://github.com/jeremyevans/rodauth) .  
[This blog post](https://janko.io/rodauth-a-refreshing-authentication-solution-for-ruby/) shows a bit of its capabilities.

Unfortunately I cant really point you to any admin panel.

Rails is still awesome for a quick and dirty mvp, but I have been bitten so many times by devise, or autoloading issues, or active support black magic that I prefer to have a bit slower start using something “simpler” like hanami or even go straight to sinatra/roda/hanami-router
