I wrote a 20k LoC bacon app in 2014 and had the same issue with being able to understand all the pieces individually but having trouble comprehending the whole system.<p>I don&#x27;t have non-architecture answers for how to organize code since that&#x27;s pretty much the point of an architecture. Most of the application organization patterns around the React space are only ~200 lines of code and a description of how the pieces fit together. You don&#x27;t have to adopt the whole thing immediately but you don&#x27;t get the full benefits of a pattern until everything works the same way.<p>For my part, I got a job writing clojurescript full time and migrated the app to re-frame [1][2] this year in pieces over the course of a couple months and it&#x27;s the first frontend architecture that&#x27;s made me happy in over a decade of continuous searching. The js version is Redux but I think Redux is missing middleware as a concept.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;Day8&#x2F;re-frame&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Day8&#x2F;re-frame&#x2F;</a>
[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;binaryage&#x2F;pure-frame" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;binaryage&#x2F;pure-frame</a> &lt;- Fork with no global atom<p>What this provides is a complete event cycle of completely pure functions (the state swap happens in the framework) with all the data in an immutable map in a single atom. By namespacing my subscriptions and events I can see a problem, look at the component, and know immediately where my problem is within ~10 lines of code. It&#x27;s not perfect but it&#x27;s pretty good.<p>One thing that doesn&#x27;t get mentioned often enough when talking about Clojurescript is the potential for doing server-side rendering of the app without having to run node. [3]<p>[3] <a href="http:&#x2F;&#x2F;yogthos.net&#x2F;posts&#x2F;2015-11-24-Serverside-Reagent.html" rel="nofollow">http:&#x2F;&#x2F;yogthos.net&#x2F;posts&#x2F;2015-11-24-Serverside-Reagent.html</a>