<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="191628" data-post-id="191628">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="cheerfulstoic" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cheerfulstoic/120/3870_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  cheerfulstoic
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I wrote a post where I examined and discussed a few different Elixir project directory structures:</p>
<p><a href="http://blog.brian-underwood.codes/elixir/2020/07/17/structuring-an-elixir+phoenix-app/" class="onebox" target="_blank" rel="noopener nofollow ugc">http://blog.brian-underwood.codes/elixir/2020/07/17/structuring-an-elixir+phoenix-app/</a></p>
<p>The main thing I learned (as has been discussed here) is that Elixir is pretty flexible, so you should do what makes sense.  But it’s nice to see how different things are organized.</p>
<p>I’m definitely intrigued by <a class="mention" href="/u/atomkirk" rel="nofollow">@atomkirk</a>’s project structure, as well!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="191628" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/best-practice-for-directory-structure-of-a-larger-application/34827/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-191628" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="191628"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #22"></div>
  </section>
</div>
    <div class="postbit" id="206664" data-post-id="206664">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jsmestad" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jsmestad/120/14153_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jsmestad
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Your link appears broken, here is a working one <a href="https://blog.brian-underwood.codes/elixir/2020/07/17/structuring-an-elixir+phoenix-app" rel="noopener nofollow ugc">https://blog.brian-underwood.codes/elixir/2020/07/17/structuring-an-elixir+phoenix-app</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="206664" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/best-practice-for-directory-structure-of-a-larger-application/34827/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-206664" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="206664"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
    <div class="postbit" id="206689" data-post-id="206689">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="cheerfulstoic" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cheerfulstoic/120/3870_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  cheerfulstoic
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Oh, thank you!  I updated my blog recently and I though I had preserved links, but apparently not <img src="https://forum.elixirforum.com/images/emoji/apple/confounded_face.png?v=15" title=":confounded_face:" class="emoji" alt=":confounded_face:" loading="lazy" width="20" height="20">. I’ll have a look at this a bit later</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="206689" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/best-practice-for-directory-structure-of-a-larger-application/34827/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-206689" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="206689"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #24"></div>
  </section>
</div>
    <div class="postbit" id="240639" data-post-id="240639">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="jack" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  jack
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>The link is broken again, this one is working: <a href="https://blog.brian-underwood.codes/elixir/2020/07/11/structuring-an-elixir+phoenix-app" rel="noopener nofollow ugc">Structuring an Elixir+Phoenix app</a></p>
<p>About <a class="mention" href="/u/atomkirk" rel="nofollow">@atomkirk</a> structure, I’m gonna try this!<br>
My motivation is that I struggle as well to find tests.</p>
<p>I’m just not sure about the naming convention, I guess that I might keep the full name inside the structure.<br>
Instead of <code>lib/invoices/controller.ex</code> I might try <code>lib/invoices/invoices_controller.ex</code><br>
The reason for this is to help while using the alias…</p>
<p>If I’m going to call two controllers (for whatever reason, don’t judge me <img src="https://forum.elixirforum.com/images/emoji/apple/stuck_out_tongue_closed_eyes.png?v=15" title=":stuck_out_tongue_closed_eyes:" class="emoji" alt=":stuck_out_tongue_closed_eyes:" loading="lazy" width="20" height="20">), in an <code>alias Project.Invoices.Controller</code> and <code>alias Project.Payments.Controller</code>, it would conflict, unless I do only an <code>alias Project.Invoices</code> and call a longer <code>Invoices.Controller.function</code> in the code.</p>
<p>As I understand about MVC it’s all about the separation of concerns in the application layer, and not a folder structure, so I’m good about not having to call folders by MVC names as it doesn’t matter.</p>
<p>I see that Phoenix as a relatively new framework (and Elixir as a whole), ended up not being too much well stablished “good practices” or structures in this way.<br>
Some time ago I’ve asked here about LiveView, reading other people code I saw a lot of people not using controllers and views at all, as there are people that create a LiveView module, call the Model layer directly from it and use the <code>render/1</code> function instead of calling a view or creating a separate file for the html/view.<br>
Personally it looks a bit messy for me but I’m not really against it.</p>
<p>Again, LiveView is also pretty new and I guess it’s just normal to not have a well stablished “right way” to do it.<br>
(And of course a “right way” doesn’t have to exist)</p>
<p>I’m saying this to say that we could treat directory structure like this as well. Even though the default directory structure just works, we could benefit on exploring other ways of doing that.<br>
I personally can see how a project can benefit from such directory structure, and I agree that it helps and make more sense regarding a domain driven design mindset.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="240639" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/best-practice-for-directory-structure-of-a-larger-application/34827/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-240639" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="240639"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>