<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged healthkit</title>
<link>https://coderlegion.com/tag/healthkit</link>
<description>Powered by Question2Answer</description>
<item>
<title>Structuring Large Laravel Projects Without Overengineering</title>
<link>https://coderlegion.com/11211/structuring-large-laravel-projects-without-overengineering</link>
<description>&lt;p&gt;In my experience , Laravel makes it incredibly easy to start a project. A few commands, some controllers, migrations, and you’re shipping features fast. The problem usually doesn’t appear in week one it shows up months later, when the codebase grows, the team expands, and simple changes start feeling risky.&lt;/p&gt;
&lt;p&gt;At that point, developers often swing to extremes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Either everything stays messy and tightly coupled&lt;/li&gt;
&lt;li&gt;Or the project becomes overengineered with layers, abstractions, and patterns no one fully understands&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The sweet spot lies in between.&lt;/p&gt;
&lt;p&gt;This article explores &lt;strong&gt;how to structure large Laravel projects without overengineering&lt;/strong&gt;, keeping your codebase scalable, readable, and friendly to future contributors.&lt;/p&gt;
&lt;h3 id=&quot;the-real-problem-with-default-laravel-structure-&quot;&gt;The Real Problem With “Default Laravel Structure”&lt;/h3&gt;
&lt;p&gt;Laravel’s default structure is intentionally simple and that’s a good thing. But in larger projects, issues start to emerge:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Controllers grow too large&lt;/li&gt;
&lt;li&gt;Business logic leaks everywhere&lt;/li&gt;
&lt;li&gt;Repeated patterns appear across features&lt;/li&gt;
&lt;li&gt;Debugging becomes harder than it should be&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The instinctive reaction is to introduce complex architectures too early. Unfortunately, that often creates more problems than it solves.&lt;/p&gt;
&lt;p&gt;The goal isn’t to make Laravel “enterprise looking.”&lt;br&gt;
The goal is to make it &lt;strong&gt;maintainable&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;start-with-features-not-layers&quot;&gt;Start With Features, Not Layers&lt;/h3&gt;
&lt;p&gt;One of the most common mistakes in large Laravel projects is organizing code strictly by technical layers.&lt;/p&gt;
&lt;p&gt;Instead of thinking:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;“Where do I put this service?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ask:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;“What feature does this belong to?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;a-practical-feature-based-structure&quot;&gt;A Practical Feature Based Structure&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;app/
 ├── Features/
 │   ├── Orders/
 │   │   ├── Controllers/
 │   │   ├── Actions/
 │   │   ├── Requests/
 │   │   └── Policies/
 │   ├── Payments/
 │   └── Users/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This keeps related logic close together and makes onboarding easier. When someone works on “Payments,” everything they need is in one place.&lt;/p&gt;
&lt;h3 id=&quot;keep-controllers-thin-but-don-t-panic-about-it-&quot;&gt;Keep Controllers Thin (But Don’t Panic About It)&lt;/h3&gt;
&lt;p&gt;Controllers shouldn’t contain complex business logic but that doesn’t mean every line needs a separate class.&lt;/p&gt;
&lt;p&gt;A good rule of thumb:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Controllers handle HTTP concerns&lt;/li&gt;
&lt;li&gt;Business logic lives elsewhere&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Instead of massive controllers, extract logic into:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Action classes&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Service classes (when justified)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Domain specific helpers&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;public function store(StoreOrderRequest $request)
{
    return CreateOrder::run($request &amp;gt;validated());
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Simple, readable, and testable without unnecessary abstraction.&lt;/p&gt;
&lt;h3 id=&quot;use-services-only-when-logic-is-reused-or-complex&quot;&gt;Use Services Only When Logic Is Reused or Complex&lt;/h3&gt;
&lt;p&gt;Service classes are useful but only when they solve a real problem.&lt;/p&gt;
&lt;p&gt;Create a service when:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Logic is reused across multiple features&lt;/li&gt;
&lt;li&gt;The operation is complex or multi step&lt;/li&gt;
&lt;li&gt;You need clear separation for testing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Avoid services that just wrap a single model call. That’s not architecture it’s ceremony.&lt;/p&gt;
&lt;h3 id=&quot;let-models-do-some-work-within-reason-&quot;&gt;Let Models Do Some Work (Within Reason)&lt;/h3&gt;
&lt;p&gt;Laravel models are powerful, and it’s okay to use them.&lt;/p&gt;
&lt;p&gt;Helpful patterns:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Query scopes for reusable queries&lt;/li&gt;
&lt;li&gt;Model methods for domain specific behavior&lt;/li&gt;
&lt;li&gt;Accessors and mutators for data shaping&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Avoid turning models into “god objects,” but don’t fear using them either. Balance matters more than purity.&lt;/p&gt;
&lt;h3 id=&quot;avoid-premature-design-patterns&quot;&gt;Avoid Premature Design Patterns&lt;/h3&gt;
&lt;p&gt;Patterns like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Repositories&lt;/li&gt;
&lt;li&gt;CQRS&lt;/li&gt;
&lt;li&gt;Event sourcing&lt;/li&gt;
&lt;li&gt;Hexagonal architecture&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;are not bad but they are &lt;strong&gt;expensive&lt;/strong&gt; in complexity.&lt;/p&gt;
&lt;p&gt;If your team doesn’t feel the pain these patterns solve, adding them early will slow development and confuse contributors.&lt;/p&gt;
&lt;p&gt;Start simple. Introduce patterns &lt;strong&gt;only when a real problem appears&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&quot;configuration-and-boundaries-matter-more-than-classes&quot;&gt;Configuration and Boundaries Matter More Than Classes&lt;/h3&gt;
&lt;p&gt;Large Laravel projects stay healthy when boundaries are clear.&lt;/p&gt;
&lt;p&gt;Focus on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Consistent naming conventions&lt;/li&gt;
&lt;li&gt;Clear folder responsibilities&lt;/li&gt;
&lt;li&gt;Well defined APIs between features&lt;/li&gt;
&lt;li&gt;Shared code living in obvious locations&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Good structure is about &lt;strong&gt;clarity&lt;/strong&gt;, not class count.&lt;/p&gt;
&lt;h3 id=&quot;tests-are-part-of-the-structure&quot;&gt;Tests Are Part of the Structure&lt;/h3&gt;
&lt;p&gt;A well structured project is easy to test.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Feature tests validate behavior&lt;/li&gt;
&lt;li&gt;Unit tests protect core logic&lt;/li&gt;
&lt;li&gt;Clear boundaries make mocking easier&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If testing feels painful, it’s often a sign the structure needs refinement not more abstractions.&lt;/p&gt;
&lt;h3 id=&quot;signs-you-re-overengineering&quot;&gt;Signs You’re Overengineering&lt;/h3&gt;
&lt;p&gt;If any of these sound familiar, it may be time to simplify:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Every request touches 6+ layers&lt;/li&gt;
&lt;li&gt;New developers struggle to find code&lt;/li&gt;
&lt;li&gt;Refactoring feels dangerous&lt;/li&gt;
&lt;li&gt;The architecture needs a diagram to explain&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Good architecture fades into the background. It supports development it doesn’t dominate it.&lt;/p&gt;
&lt;h3 id=&quot;final-thoughts-structure-should-serve-the-team&quot;&gt;Final Thoughts: Structure Should Serve the Team&lt;/h3&gt;
&lt;p&gt;Structuring large Laravel projects isn’t about following trends or copying architectures from conference talks. It’s about building systems that &lt;strong&gt;real developers can understand, maintain, and evolve&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Start simple. Organize by features. Add structure only when it earns its place.&lt;/p&gt;
&lt;p&gt;If this article resonated with you, share it with a teammate who’s fighting an overcomplicated codebase. And if you enjoy practical Laravel content focused on real world tradeoffs, there’s plenty more worth exploring.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/11211/structuring-large-laravel-projects-without-overengineering</guid>
<pubDate>Sat, 07 Feb 2026 10:58:01 +0000</pubDate>
</item>
<item>
<title>Expirel -  Expiry and Habit Tracker</title>
<link>https://coderlegion.com/11043/expirel-expiry-and-habit-tracker</link>
<description>&lt;p&gt;Expirel is a habit and expiry reminder tool built to solve a simple but real problem: we forget important things at the wrong time.&lt;/p&gt;
&lt;p&gt;Most habit trackers notify you after you miss a habit. Expirel works differently—it reminds you before your habit, task, or deadline expires, so you can act in time.&lt;/p&gt;
&lt;p&gt;You can use Expirel to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Build daily habits without pressure&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get email and WhatsApp reminders before habits expire&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Track expiring things like subscriptions, deadlines, or important &lt;br&gt;
dates&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Expirel is designed for busy people who want consistency without guilt. It’s not about motivation or streaks—it’s about better timing.&lt;/p&gt;
&lt;p&gt; Try it here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://expirel.com&quot;&gt;https://expirel.com&lt;/a&gt;&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/11043/expirel-expiry-and-habit-tracker</guid>
<pubDate>Wed, 04 Feb 2026 07:54:49 +0000</pubDate>
</item>
</channel>
</rss>