<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Emilia Sonder</title>
    <description>The latest articles on Forem by Emilia Sonder (@isemilia).</description>
    <link>https://forem.com/isemilia</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2406166%2Fb2596b27-eb94-4b5a-9e42-cae9fbaafd30.jpg</url>
      <title>Forem: Emilia Sonder</title>
      <link>https://forem.com/isemilia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/isemilia"/>
    <language>en</language>
    <item>
      <title>Component-Focused Architecture: A Better Way to Organize Your Front-End Projects</title>
      <dc:creator>Emilia Sonder</dc:creator>
      <pubDate>Sun, 27 Apr 2025 12:50:17 +0000</pubDate>
      <link>https://forem.com/isemilia/a-better-way-to-organize-your-front-end-projects-component-focused-architecture-cfa-42hb</link>
      <guid>https://forem.com/isemilia/a-better-way-to-organize-your-front-end-projects-component-focused-architecture-cfa-42hb</guid>
      <description>&lt;p&gt;Component-Focused Architecture is a structure that’s designed to keep your front-end projects scalable, readable, and easy to work with.&lt;/p&gt;

&lt;p&gt;After years of working as a front-end developer, I’ve realized that following the most popular architecture approach isn’t necessarily the right choice. Every project is different, so forcing them all into the same mold is doomed to fail. What might seem clean at first will quickly turn into a codebase that’s hard to navigate. &lt;/p&gt;

&lt;p&gt;Most existing approaches focus on abstraction and emphasizing logic, forgetting that front-end is primarily about the UI. While separating logic from views is good practice, prioritizing logic too much often leads to a mess. &lt;/p&gt;

&lt;p&gt;Through trial and error, I eventually developed my own approach to structuring my projects. The goal is to separate logic from components, prioritize UI, and enforce consistent patterns to simplify future refactors. &lt;/p&gt;

&lt;h2&gt;
  
  
  Who is this for?
&lt;/h2&gt;

&lt;p&gt;Given my focus on React and Next.js, my article is mainly aimed at other developers working with these frameworks—whether you’re just starting out or have years of experience under your belt. It’s useful for both solo developers and team projects, offering insights that could revolutionize the way you structure your code. Even if front end is not your main focus, you might still find this article valuable for understanding how UI architectures fit into the bigger picture. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why I made this
&lt;/h2&gt;

&lt;p&gt;Structures like FSD or MVVM often scatter a single component's functionality across multiple layers. Something as simple as updating a UI element might require jumping between several files and folders just to understand what’s going on. While it might not seem like a big deal when you’re working on a project alone, it becomes especially painful in a team setting. &lt;/p&gt;

&lt;p&gt;Such abstractions lead to teams spending more time debating what goes where instead of actually coding. Each developer ends up with their own interpretation of the structure, and before you know it, the codebase turns into a mess that no one wants to touch. That’s how you get a legacy project that everyone hopes won’t collapse before they have to rewrite the whole thing.&lt;/p&gt;

&lt;p&gt;My goal is to improve the overall developer experience by offering a fresh perspective on structuring front-end projects. I also enforce consistent patterns for components and utilities to simplify potential refactors and make development more intuitive—so you can focus on building, and not just organizing. &lt;/p&gt;

&lt;h2&gt;
  
  
  Key features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Clarity&lt;/strong&gt;. A structure that grows with your project, allowing it to remain clean and easy to navigate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Separation of concerns&lt;/strong&gt;. While logic is important, the UI is always prioritized. Logic-heavy components are kept separate from presentational components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consistency&lt;/strong&gt;. A top-down hierarchy with clear responsibilities. Layers can only import from those below them, never sideways or upwards.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No global barrel files&lt;/strong&gt;. Avoiding global index files helps you maintain predictable imports, prevent circular imports, and ensure faster build times.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scoped folders&lt;/strong&gt;. Each component or utility lives in its own folder, with all related styles, types, logic and other dependencies grouped together.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How it’s organized
&lt;/h2&gt;

&lt;p&gt;Here’s a quick overview of the main layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;app/&lt;/code&gt;&lt;/strong&gt; — Your app’s entry point (usage may vary depending on your framework)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;pages/&lt;/code&gt;&lt;/strong&gt; — Optional. Full page components, page-specific logic, or file-based routing with the Pages Router in older Next.js versions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;features/&lt;/code&gt;&lt;/strong&gt; — Logic-heavy components (actions, widgets, fetchers) that manage business workflows and API interactions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;ui/&lt;/code&gt;&lt;/strong&gt; — Reusable presentational units, split into components and elements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;shared/&lt;/code&gt;&lt;/strong&gt; — Global utilities like hooks, functions, types and API slices.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I designed this structure around a top-down dependency flow, scoped folders, no global barrel files and consistent kebab-case naming. It’s meant to keep code predictable, easy to scale, and pleasant to work with. &lt;/p&gt;

&lt;p&gt;If you want to dive deeper and see how you can adapt CFA to your own projects, &lt;a href="https://github.com/Component-Focused-Architecture-CFA" rel="noopener noreferrer"&gt;the full documentation is available on my GitHub.&lt;/a&gt; &lt;/p&gt;




&lt;p&gt;That’s it for now! I’m sure this approach will make your development process more efficient, and I’m always open to feedback. If you have any questions or suggestions, feel free to reach out. &lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>frontend</category>
      <category>nextjs</category>
      <category>react</category>
    </item>
    <item>
      <title>Rethinking Front-End Architecture</title>
      <dc:creator>Emilia Sonder</dc:creator>
      <pubDate>Mon, 21 Apr 2025 15:23:19 +0000</pubDate>
      <link>https://forem.com/isemilia/rethinking-front-end-architecture-gjj</link>
      <guid>https://forem.com/isemilia/rethinking-front-end-architecture-gjj</guid>
      <description>&lt;p&gt;I've always liked thinking about structure — not just in code, but in how we work with it. When a codebase is well-organized, everything feels smoother: development, collaboration, onboarding, maintenance. It's like walking into a well-organized library — everything has its place, and you instinctively know where to find what you need.&lt;/p&gt;

&lt;p&gt;Over time, I ended up building an architecture that just... made more sense for the way I like to work. It wasn't something I planned, it just came together through trial, error, and working on real projects. And not just solo ones — I've used this structure successfully in team settings too.&lt;/p&gt;

&lt;p&gt;I'm putting it into words now, mostly to document it for myself, but also because I think others might find it useful. I'll share more about the actual structure in future posts, but for now, this is just the starting point.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>architecture</category>
      <category>react</category>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
