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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>ultimately, because of how elixir modules don’t care about file location, elixir projects are extremely easy to re-organize. took me 2 hours to totally reorganize our project. So, just do whatever you like and if you realize later you want to do it another way, its super easy to change.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="191494" 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/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-191494" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="191494"
                     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 #12"></div>
  </section>
</div>
    <div class="postbit" id="191496" data-post-id="191496">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="atomkirk" data-post="7" data-topic="34827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/atomkirk/48/31422_2.png" class="avatar"> atomkirk:</div>
<blockquote>
<p>The main thing we learned was to organize your project around features, not functionality.</p>
</blockquote>
</aside>
<p>This is really interesting … I may like this way … From your project structure I see that you are not using contexts, right? What’s with modules implementing shared functionality for multiple features? It could be a huge mess with a really big number of schemas, isn’t it?</p>
<p>However …</p>
<aside class="quote no-group" data-username="atomkirk" data-post="7" data-topic="34827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/atomkirk/48/31422_2.png" class="avatar"> atomkirk:</div>
<blockquote>
<p>We tore a page from golang and we put the tests right by the modules they test.</p>
</blockquote>
</aside>
<p>I don’t like putting tests in same directory. All of the modules in <code>lib</code> would be unexpectedly used in some cases like:</p>
<ul>
<li>project documentation (<code>@moduledoc false</code> for all tests <img src="https://forum.elixirforum.com/uploads/default/original/2X/e/ec97a4d20dca83c1d59b0839e4f159c141fa11df.gif?v=15" title=":icon_question:" class="emoji emoji-custom" alt=":icon_question:" loading="lazy" width="20" height="20">)</li>
<li>API of <code>hex</code> library (if not then it means you have 2 standards: one for apps and one for libraries which does not makes sense for me)</li>
<li>releases (if I remember correctly)</li>
</ul>
<p>Also where is your <code>test/support</code> directory in such structure?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="191496" 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/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-191496" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="191496"
                     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 #13"></div>
  </section>
</div>
    <div class="postbit" id="191497" data-post-id="191497">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="cvh23" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cvh23/120/20475_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  cvh23
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yes, I know that. But I think its in general a good idea that name and path match <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="191497" 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/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-191497" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="191497"
                     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 #14"></div>
  </section>
</div>
    <div class="postbit" id="191498" data-post-id="191498">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="cvh23" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cvh23/120/20475_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  cvh23
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>What does your module naming look like?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="191498" 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/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-191498" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="191498"
                     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 #15"></div>
  </section>
</div>
    <div class="postbit" id="191501" data-post-id="191501">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Agreed, especially is large codebases</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="191501" 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/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-191501" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="191501"
                     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 #16"></div>
  </section>
</div>
    <div class="postbit" id="191503" data-post-id="191503">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>we renamed modules over time to match path, like <code>Project.Payment</code> (for project <code>payment/schema.ex</code>) or <code>Project.Payments.Controller</code> , but weren’t aggressive about it because it was really emotional more than practical. It FEELS good to have them match, but we rarely actually experienced a practical advantage. The only advantage I can think of is helping you find the file that contains the definition of a module when you are looking at the module being used. When I am looking for the file of a module, I just search for <code>defmodule ModuleName</code> and project search takes me right there. Or, more recently, most IDES with elixir language server have “go to definition”.</p>
<p>I agree though, if its not a big deal, its generally nice to have them match.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="191503" 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/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-191503" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="191503"
                     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 #17"></div>
  </section>
</div>
    <div class="postbit" id="191504" data-post-id="191504">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>we did start moving to contexts with phoenix 1.4 come out and put them in <code>payments/context.ex</code></p>
<p>so we had a <code>shared</code> directory that had child resources that had no clear home. so maybe <code>shared/cloud_files/schema.ex</code> (and others like <code>context.ex</code>). Cloud files being an abstraction of files stored on s3 or something. A lot of places in the app may use uploaded files.</p>
<p>So with tests, it works better than you may assume. None of those concerns you pointed out end up being a concern. I really think you should give it a shot and see.</p>
<p>we do still have a <code>test</code> directory that holds all the test support stuff (like <code>test/support</code> and fixtures, factories, etc)</p>
<p>If you only include your tests in lib and modify your mix.exs like this: <code>test_paths: ["test", "lib"],</code> because they are _test.exs files, they are ignored and not compiled into builds or releases.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="191504" 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/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-191504" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="191504"
                     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 #18"></div>
  </section>
</div>
    <div class="postbit" id="191515" data-post-id="191515">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="atomkirk" data-post="19" data-topic="34827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/atomkirk/48/31422_2.png" class="avatar"> atomkirk:</div>
<blockquote>
<p>so we had a <code>shared</code> directory that had child resources that had no clear home. so maybe <code>shared/cloud_files/schema.ex</code> (and others like <code>context.ex</code> ). Cloud files being an abstraction of files stored on s3 or something. A lot of places in the app may use uploaded files.</p>
</blockquote>
</aside>
<p>Ah, I see … When I was asking I had in mind splitting project into reasonable parts (each in its own directory). For example <code>lib/accounts/user/schema.ex</code>, <code>lib/accounts/role/schema.ex</code> etc. In really big projects there are dozens (if not more) of <code>ecto</code> schemas, so it would be a small pain to scroll them to find the right one.</p>
<aside class="quote no-group" data-username="atomkirk" data-post="19" data-topic="34827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/atomkirk/48/31422_2.png" class="avatar"> atomkirk:</div>
<blockquote>
<p>So with tests, it works better than you may assume. None of those concerns you pointed out end up being a concern. I really think you should give it a shot and see.</p>
</blockquote>
</aside>
<p>Following this article:</p><aside class="onebox allowlistedgeneric" data-onebox-src="https://hex.pm/docs/publish">
  <header class="source">
      <img src="https://hex.pm/images/hex-full-a8183c4f9adac71516516d107d402b18.svg?vsn=d" class="site-icon" alt="" width="136" height="120">

      <a href="https://hex.pm/docs/publish" target="_blank" rel="noopener nofollow">Hex</a>
  </header>

  <article class="onebox-body">
    <img width="160" height="160" src="https://hex.pm/images/favicon-160-3770bc59f1f8ba7656b4db5a1eacd8e3.png?vsn=d" class="thumbnail onebox-avatar" alt="">

<h3><a href="https://hex.pm/docs/publish" target="_blank" rel="noopener nofollow">Mix publish package</a></h3>

  <p>A package manager for the Erlang ecosystem</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>By default whole <code>lib</code> directory is send to <code>hex</code>. Do you have some pattern for <code>files</code> option to only include <code>.ex</code> files inside <code>lib</code> directory (asking as never saw it in practice)? I saw one pattern somewhere, but not sure if it works in this use case. I guess it was something like <code>"lib/**/*.ex"</code>, right?</p>
<aside class="quote no-group" data-username="atomkirk" data-post="19" data-topic="34827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/atomkirk/48/31422_2.png" class="avatar"> atomkirk:</div>
<blockquote>
<p>we do still have a <code>test</code> directory that holds all the test support stuff (like <code>test/support</code> and fixtures, factories, etc)</p>
</blockquote>
</aside>
<p>Oh, I expected that you would put <code>fixtures</code> and <code>factories</code> in <code>lib</code> directory as well. <img src="https://forum.elixirforum.com/images/emoji/apple/smiling_imp.png?v=15" title=":smiling_imp:" class="emoji" alt=":smiling_imp:" loading="lazy" width="20" height="20"></p>
<aside class="quote no-group" data-username="atomkirk" data-post="19" data-topic="34827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/atomkirk/48/31422_2.png" class="avatar"> atomkirk:</div>
<blockquote>
<p>If you only include your tests in lib and modify your mix.exs like this: <code>test_paths: ["test", "lib"],</code> because they are _test.exs files, they are ignored and not compiled into builds or releases.</p>
</blockquote>
</aside>
<p>Yes, I mean exactly this! As said I was not sure if they would be compiled or not. Now it makes more sense. Does <code>ex_doc</code> works in same way (i.e. only for <code>.ex</code> files)?</p>
<hr>
<p>The more I read about it the more I’m interested!</p>
<p>It would be really helpful if you would provide all generic changes you made (like modification of mentioned by you <code>test_paths</code>). While I may sometime give it a try and slowly look for solutions/workarounds (for now I don’t have that much time) newbies may be confused seeing errors, so it’s important to properly describe needed changes. Maybe a blog post, small template or at least a name of such structure concept (like searching for <code>Elixir Phoenix contexts</code> in Google).</p>
<p>Also i have one more question … Did you had any problem with code analysis tools like <code>credo</code>. <code>dialyzer</code> or <code>excoveralls</code>? If so how did you solved them?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="191515" data-batch-url="/posts/batch_likers">
                        1
                      </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/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-191515" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="191515"
                     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 #19"></div>
  </section>
</div>
    <div class="postbit" id="191518" data-post-id="191518">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Eiji" data-post="20" data-topic="34827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/48/36743_2.png" class="avatar"> Eiji:</div>
<blockquote>
<p>lib/accounts/user/schema.ex</p>
</blockquote>
</aside>
<p>yep, we did exactly this <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> I kept my example simple but we grouped mutliple resources into folder when it made sense. Your example was verbatum what we did <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> An accounts folder with users folders, auth folder etc.</p>
<aside class="quote no-group" data-username="Eiji" data-post="20" data-topic="34827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/48/36743_2.png" class="avatar"> Eiji:</div>
<blockquote>
<p>By default whole <code>lib</code> directory is send to <code>hex</code></p>
</blockquote>
</aside>
<p>I think you might have me here… I’m not sure how to make it work with hex. Your idea suggests there could be a way to make it work without too much trouble?</p>
<aside class="quote no-group" data-username="Eiji" data-post="20" data-topic="34827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/48/36743_2.png" class="avatar"> Eiji:</div>
<blockquote>
<p>It would be really helpful if you would provide all generic changes you made (like modification of mentioned by you <code>test_paths</code></p>
</blockquote>
</aside>
<p><code>test_paths</code> is literally the only change we made… other than that we just started putting _test.exs files next to the module they test and everything works exactly like it did before.</p>
<aside class="quote no-group" data-username="Eiji" data-post="20" data-topic="34827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/48/36743_2.png" class="avatar"> Eiji:</div>
<blockquote>
<p>Did you had any problem with code analysis tools like <code>credo</code> . <code>dialyzer</code> or <code>excoveralls</code> ? If so how did you solved them?</p>
</blockquote>
</aside>
<p>Nope, all of those tools work as expected without any special config/hacking.</p>
<p>I’ve worked on a lot of projects where tests are in a root <code>test</code> directory and without exception I’ve had headaches looking for the test that tests the code I’m looking at. It helps a lot when they maintain a proper directory structure that mirrors lib, but I hate maintaining that personally and no one does it perfectly. Often what I have to do is IO.inspect and then run the whole test suite to see what tests exercise the code in question.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="191518" data-batch-url="/posts/batch_likers">
                        1
                      </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/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-191518" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="191518"
                     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 #20"></div>
  </section>
</div>
    <div class="postbit" id="191534" data-post-id="191534">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="atomkirk" data-post="21" data-topic="34827">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/atomkirk/48/31422_2.png" class="avatar"> atomkirk:</div>
<blockquote>
<p>I think you might have me here… I’m not sure how to make it work with hex. Your idea suggests there could be a way to make it work without too much trouble?</p>
</blockquote>
</aside>
<p>Just tried it on newly generated project and unfortunately even with some tricks with <code>Path.expand/1</code> for generating a raw list of directories and files it would end up including <code>_test.exs</code> files anyway as when we pass <code>dir_name</code> to <code>files</code> option whole directory is included. The only workaround I can see for it is to only provide a list of files without directories, but never tried it.</p>
<p>I don’t like to have 2 standards for organizing code (one for app and one for lib), so I’m gonna still have tests in <code>test</code> directory. Also keeping <code>support</code> and all <code>test</code> specific files in <code>test</code> directory when all tests are in <code>lib</code> looks like a workaround for me. If there would be an easy way to merge <code>lib</code> and <code>test</code> directories I may consider give it a try again.</p>
<p>Anyway I believe that grouping everything (except tests) into features is still reasonable for me, so I would definitely consider it in my future projects.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="191534" data-batch-url="/posts/batch_likers">
                        1
                      </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/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-191534" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="191534"
                     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 #21"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/34827/load_more?page=3">Load more posts (4 remaining)</a>
</div></template></turbo-stream>