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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Nice work with this!</p>
<p>A little idea for non-umbrella apps, what if the <code>web</code> folder was moved up one level to be placed directly into <code>lib</code> and renamed into <code>myapp_web</code>. That would bring it little bit closer to the folder structure of umbrella apps.</p>
<pre><code>lib
└── site
    ├── application.ex
    ├── blog
    │   ├── author.ex
    │   └── blog.ex
    ├── repo.ex
    └── web
        ├── channels
        │   └── user_socket.ex
        ├── controllers
        │   ├── author_controller.ex
        │   └── page_controller.ex


lib
├── site
│   ├── application.ex
│   ├── blog
│   │   ├── author.ex
│   │   └── blog.ex
│   └── repo.ex
└── site_web
    ├── channels
    │   └── user_socket.ex
    ├── controllers
    │   ├── author_controller.ex
    │   └── page_controller.ex
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26389" data-batch-url="/posts/batch_likers">
                        6
                      </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/phoenix-v1-3-0-rc-0-released/3947/74">Post #73</a>
	                </div>
	            </div>
              <div id="likers-container-26389" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26389"
                     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 #73"></div>
  </section>
</div>
    <div class="postbit" id="26390" data-post-id="26390">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks <a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a></p>
<p>I used the term models because I am still stuck in phoenix 1.2 land <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"><br>
Thanks for correcting me.</p>
<p>Would it make more sense to use something like “shared” or have some new context - like “communications” for things like address? Or maybe create separate “business_address”, “user_address” and “employee_address” in their respective domains but use macros to bring in the fields from an address module defined in some common location? Just trying to get a few ideas. I know there is no hard and fast rule, so if you have any rules of thumb it would be great to know. Otherwise, thanks again for everything you do.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26390" 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/phoenix-v1-3-0-rc-0-released/3947/75">Post #74</a>
	                </div>
	            </div>
              <div id="likers-container-26390" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26390"
                     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 #74"></div>
  </section>
</div>
    <div class="postbit" id="26421" data-post-id="26421">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/chrismccord" rel="nofollow">@chrismccord</a>, <a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a>, <a class="mention" href="/u/wojtekmach" rel="nofollow">@wojtekmach</a> and others many thanks for your great work guys, you’re awesome!<br>
Why did you decide to prefix schema and DB table names with context name in generators? Shouldn’t we separate a DB from application logic? If we ever change a context name or structure, we will have to rename all the tables related to this context. One schema probably can be related to multiple contexts. Multiple applications probably can use the same DB tables with different contexts in minds.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26421" data-batch-url="/posts/batch_likers">
                        4
                      </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/phoenix-v1-3-0-rc-0-released/3947/76">Post #75</a>
	                </div>
	            </div>
              <div id="likers-container-26421" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26421"
                     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 #75"></div>
  </section>
</div>
    <div class="postbit" id="26423" data-post-id="26423">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I had the same question: <a href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/49" class="inline-onebox" rel="nofollow">Phoenix v1.3.0-rc.0 released - #49 by minhajuddin</a></p>
<p>I decided to strip the context prefix from the database table name. To me, contexts are limited to the app and shouldn’t bleed into the database.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26423" data-batch-url="/posts/batch_likers">
                        4
                      </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/phoenix-v1-3-0-rc-0-released/3947/77">Post #76</a>
	                </div>
	            </div>
              <div id="likers-container-26423" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26423"
                     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 #76"></div>
  </section>
</div>
    <div class="postbit" id="26576" data-post-id="26576">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="wojtekmach" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wojtekmach/120/999_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  wojtekmach
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Hex Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Just a quick update, we’ve recently converted hex.pm to follow v1.3 project structure [1]. There’s still more to be done (using FallbackController, moving some functions around etc) but it should give you an idea how the new structure works in practice. Feedback &amp; PRs are welcome!</p>
<p>[1] <a href="https://github.com/hexpm/hexpm" class="inline-onebox" rel="noopener nofollow ugc">GitHub - hexpm/hexpm: API server and website for Hex · GitHub</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="26576" data-batch-url="/posts/batch_likers">
                        6
                      </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/phoenix-v1-3-0-rc-0-released/3947/78">Post #77</a>
	                </div>
	            </div>
              <div id="likers-container-26576" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26576"
                     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 #77"></div>
  </section>
</div>
    <div class="postbit" id="26584" data-post-id="26584">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="wojtekmach" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wojtekmach/120/999_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  wojtekmach
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Hex Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="albertarv" data-post="74" data-topic="3947">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/albertarv/48/3663_2.png" class="avatar"> albertarv:</div>
<blockquote>
<p>A little idea for non-umbrella apps, what if the web folder was moved up one level to be placed directly into lib and renamed into myapp_web. That would bring it little bit closer to the folder structure of umbrella apps.</p>
</blockquote>
</aside>
<p>Cool idea, I’m not sure if this particular approach was discussed before. It would indeed make it easier to convert a non-umbrella project to an umbrella one down the road<br>
(literally: <code>mv lib/myapp_web apps/myapp_web/lib/</code> +/- project boilerplate &amp; git commands)</p>
<p>edit: I posted this too hastily, it isn’t any more easy than <code>mv lib/myapp/web apps/myapp_web/lib/myapp_web</code> <img src="https://forum.elixirforum.com/images/emoji/apple/stuck_out_tongue.png?v=15" title=":stuck_out_tongue:" class="emoji" alt=":stuck_out_tongue:" loading="lazy" width="20" height="20"> but I still kinda like that it’s less nested.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26584" data-batch-url="/posts/batch_likers">
                        3
                      </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/phoenix-v1-3-0-rc-0-released/3947/79">Post #78</a>
	                </div>
	            </div>
              <div id="likers-container-26584" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26584"
                     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 #78"></div>
  </section>
</div>
    <div class="postbit" id="26659" data-post-id="26659">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Just wanted to drop my 2 cents for the directory structure.</p>
<p>I think, this depends on the perspective from which you’re discovering the project.</p>
<p>If you’re browsing through the directories (eg. in your editor’s navigation panel), then I guest it’s quite easy to understand that the <code>lib/accounts/accounts.ex</code> is the <em>main entry point</em> (because the file is named the same way as the directory).</p>
<p>On the other hand, if your starting point of exploration is the source code, eg. exception message like</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">** (UndefinedFunctionError) function Accounts.create_transaction/0 is undefined or private.
</code></pre>
<p>you might start looking for file <code>lib/accounts.ex</code>, which doesn’t exist.</p>
<p>I guess, for shallow directory structure (like the one presented here) this might not be too much of a problem, but is this something that will scale well if it gets more nested? (PS. I also accept, that this might be a smell that should make one think about refactoring, thou).</p>
<p>Bottom line is - both <code>Accounts.Foo</code> and <code>Accounts</code> modules are defined in <code>lib/accounts/</code> - in this context, module name builds quite valuable expectation, which unmet, might cause confusion.</p>
<p>I think, convention, is something that will help you in longer term. Not only for people maintaining projects, but also newcomers starting their journey with Elixir/Phoenix.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26659" data-batch-url="/posts/batch_likers">
                        3
                      </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/phoenix-v1-3-0-rc-0-released/3947/80">Post #79</a>
	                </div>
	            </div>
              <div id="likers-container-26659" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26659"
                     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 #79"></div>
  </section>
</div>
    <div class="postbit" id="26664" data-post-id="26664">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Hex-Core-Team" data-username="wojtekmach" data-post="78" data-topic="3947">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wojtekmach/48/999_2.png" class="avatar"> wojtekmach:</div>
<blockquote>
<p>Just a quick update, we’ve recently converted hex.pm to follow v1.3 project structure [1]. There’s still more to be done (using FallbackController, moving some functions around etc) but it should give you an idea how the new structure works in practice.</p>
</blockquote>
</aside>
<p><code>Web.Plugs</code> is still defined in <code>web/plugs.ex</code> (as it should be).</p>
<p>I don’t get where this change came from, really. It’s not as if it changes anything, but the namespaces and file structure had a one to one mapping before and now they suddenly don’t. For what reason, exactly?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26664" 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/phoenix-v1-3-0-rc-0-released/3947/81">Post #80</a>
	                </div>
	            </div>
              <div id="likers-container-26664" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26664"
                     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 #80"></div>
  </section>
</div>
    <div class="postbit" id="26666" data-post-id="26666">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="wojtekmach" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wojtekmach/120/999_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  wojtekmach
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Hex Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="gon782" data-post="81" data-topic="3947">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/eada6e/48.png" class="avatar"> gon782:</div>
<blockquote>
<p>Web.Plugs is still defined in web/plugs.ex (as it should be).</p>
</blockquote>
</aside>
<p>perhaps you somehow looked at outdated code, but we have <code>Hexpm.Web.Plugs</code> defined in <code>lib/hexpm/web/plugs.ex</code> [1] and so the module name perfectly matches the filename.</p>
<p>[1] <a href="https://github.com/hexpm/hexpm/blob/master/lib/hexpm/web/plugs.ex#L1" rel="noopener nofollow ugc">https://github.com/hexpm/hexpm/blob/master/lib/hexpm/web/plugs.ex#L1</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="26666" 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/phoenix-v1-3-0-rc-0-released/3947/82">Post #81</a>
	                </div>
	            </div>
              <div id="likers-container-26666" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26666"
                     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 #81"></div>
  </section>
</div>
    <div class="postbit" id="26718" data-post-id="26718">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/chrismccord" rel="nofollow">@chrismccord</a> What do you think <a href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/74" rel="nofollow">about this idea</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="26718" 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/phoenix-v1-3-0-rc-0-released/3947/83">Post #82</a>
	                </div>
	            </div>
              <div id="likers-container-26718" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26718"
                     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 #82"></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/3947/load_more?page=9">Load more posts (16 remaining)</a>
</div></template></turbo-stream>