<?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: Luís Serrano</title>
    <description>The latest articles on Forem by Luís Serrano (@luis_sserrano).</description>
    <link>https://forem.com/luis_sserrano</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%2F89671%2Fa024c631-98f8-4ae5-a04d-c0602602244e.jpeg</url>
      <title>Forem: Luís Serrano</title>
      <link>https://forem.com/luis_sserrano</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/luis_sserrano"/>
    <language>en</language>
    <item>
      <title>Managing humans</title>
      <dc:creator>Luís Serrano</dc:creator>
      <pubDate>Mon, 20 Mar 2023 00:00:57 +0000</pubDate>
      <link>https://forem.com/luis_sserrano/managing-humans-1ihp</link>
      <guid>https://forem.com/luis_sserrano/managing-humans-1ihp</guid>
      <description>&lt;p&gt;I recently became a team lead at the company I work for, a role I had been aspiring for some time. It's ironic because as an engineer, I never imagined myself managing others. I always strove to be a 10x engineer and dedicated myself to that goal.&lt;br&gt;
Until it didn't make sense anymore.&lt;/p&gt;

&lt;p&gt;Life can be full of surprises, and I'm continually amazed at how my outlook on the future and my personal growth have evolved. While I still have a passion for tackling complex problems and immersing myself in finding solutions, I'm finding myself drawn more toward the idea of having a multiplier effect on my team's outcome, focusing on improving purpose, people, and processes.  &lt;/p&gt;

&lt;p&gt;I've always believed that people are the heart of any organization. Early in my career, I learned that the quality of your relationships with your colleagues can make or break your work experience. When you genuinely enjoy working with your teammates, everything becomes more manageable. You feel more motivated to start each day, you're more likely to speak up and contribute ideas, and you're more likely to solve problems collaboratively. Ultimately, you're more likely to have a fulfilling and enjoyable experience at work.&lt;/p&gt;

&lt;p&gt;I'm sure I'm not alone when I say that, as software engineers, we're often privileged to have the ability to switch jobs frequently. However, I've left previous teams not because of the work itself, but because I didn't share the same values as my colleagues. If I have the opportunity, I will not waste my life working with someone that doesn't share my values.&lt;/p&gt;

&lt;p&gt;The idea of becoming a manager came to me during a difficult time when I was feeling burnt out and depressed. I knew I needed a change, so I stepped out of my comfort zone and pursued a role where I could make a meaningful impact by helping people. For the first time in a long time, I felt excited about the future.&lt;br&gt;
Despite the challenges that come with any new role, I'm eager to learn and grow. I know that I have much to learn as a manager, but I'm motivated to do so, and caring about people makes 50% of the job easier.&lt;/p&gt;

&lt;h3&gt;
  
  
  What has been working for me?
&lt;/h3&gt;

&lt;p&gt;As a new manager, I've been experimenting with different approaches to support and manage my team. I've found that being proactive and organized can make a big difference.&lt;br&gt;
One thing that's been particularly effective is creating individual pages for each of my team members in Notion. &lt;br&gt;
Here, I document everything I know about them. From personal and professional interests to their performance and other relevant details.&lt;/p&gt;

&lt;p&gt;This approach is essential in ensuring that I don't forget anything when preparing for our 1-1 meetings or any other conversation. It's important to show your team members that you care about them, and remembering details from previous conversations is a great way to demonstrate this.&lt;/p&gt;

&lt;p&gt;To ensure that our 1-1 meetings are productive, I take a few minutes the day before to prepare an agenda with topics I want to discuss. Typically, I cover topics related to their growth, how I can better support them in their work, any blockers they are facing, feedback, and a general reflection on how things are going. These meetings are critical in defining expectations, having honest conversations, and building trust.&lt;/p&gt;

&lt;p&gt;After each 1-1 meeting, I take some time to jot down notes on what we discussed. This helps me to follow up on any topics in the future. Whether it's an ill parent, a sick pet, or a book they're interested in reading, I make sure to keep track of these details to show my team members that I'm invested in their lives both inside and outside of work.&lt;/p&gt;

&lt;p&gt;In addition to creating private pages for each team member, I’ve also created a shared Notion page with each report.&lt;br&gt;
I use this page to maintain a history of our 1-1 meetings and prepare for upcoming meetings. It's also a place where we can collectively track progress toward their career goals, identify areas for improvement, and create a growth plan.&lt;br&gt;
Another useful feature of this shared page is the Brag document, where they can highlight their accomplishments and celebrate successes.&lt;br&gt;
We've also included a book recommendation section, which encourages them to continue learning and growing. As part of our commitment to personal and professional development, we have a learning budget each team member can use to invest in their growth.&lt;/p&gt;

&lt;p&gt;To wrap things up, I'd like to share some book recommendations that have been keeping me busy lately.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The making of a manager&lt;/li&gt;
&lt;li&gt;Managing humans&lt;/li&gt;
&lt;li&gt;An Elegant Puzzle- Systems of Engineering Management&lt;/li&gt;
&lt;li&gt;The manager's path&lt;/li&gt;
&lt;li&gt;Radical Candor&lt;/li&gt;
&lt;li&gt;The unicorn project&lt;/li&gt;
&lt;li&gt;Overcoming the five dysfunctions of a team&lt;/li&gt;
&lt;li&gt;Become an effective software engineering manager&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is just the first of many posts where I'll be sharing my insights and learnings from my new role. My goal is to offer an honest perspective on what's worked for me so that you can apply it to your own situation if it aligns with your own point of view.&lt;/p&gt;

&lt;p&gt;✌️&lt;/p&gt;

</description>
      <category>teamlead</category>
      <category>management</category>
      <category>career</category>
      <category>books</category>
    </item>
    <item>
      <title>Configure ESLint, Prettier and path aliases with Next.js</title>
      <dc:creator>Luís Serrano</dc:creator>
      <pubDate>Tue, 11 Jan 2022 15:37:56 +0000</pubDate>
      <link>https://forem.com/luis_sserrano/configure-eslint-prettier-and-path-aliases-with-nextjs-37do</link>
      <guid>https://forem.com/luis_sserrano/configure-eslint-prettier-and-path-aliases-with-nextjs-37do</guid>
      <description>&lt;p&gt;If you don't like seeing &lt;code&gt;../../../../component/example.jsx&lt;/code&gt; on your codebase, you're not alone.&lt;/p&gt;

&lt;p&gt;This is a quick guide for you to start your Next.js project, with &lt;code&gt;ESLint&lt;/code&gt;, &lt;code&gt;Prettier&lt;/code&gt; and path aliases configured the right way! :)&lt;/p&gt;

&lt;p&gt;The easiest and quickest way to get started with Next.js is by using &lt;code&gt;create-next-app&lt;/code&gt;. This CLI tool developed by the Next.js team enables you to quickly start building a new Next.js application, with everything set up for you.&lt;/p&gt;

&lt;p&gt;You can start with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-next-app@latest
&lt;span class="c"&gt;# or&lt;/span&gt;
yarn create next-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;create-next-app&lt;/code&gt; will give you already &lt;code&gt;eslint&lt;/code&gt; and &lt;code&gt;eslint-config-next&lt;/code&gt;, but we need some additional packages to install. If you don't have these on your project, you will need to install them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuration and packages to install
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;eslint-import-resolver-alias&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;eslint-config-prettier&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prettier&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Configure &lt;code&gt;ESLint&lt;/code&gt; and path aliases
&lt;/h3&gt;

&lt;p&gt;We're going to configure &lt;code&gt;ESLint&lt;/code&gt; to allow us to have path aliases and warnings on our code editor when the path is wrong.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;prettier&lt;/code&gt; will help us as a code formatter and I honestly recommend everyone use it!&lt;/p&gt;

&lt;h3&gt;
  
  
  Create and configure &lt;code&gt;.eslint.json&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;We need to tell &lt;code&gt;eslint&lt;/code&gt; which plugins we want to use and which settings we want to configure for each plugin.&lt;/p&gt;

&lt;p&gt;In this case, we're extending &lt;code&gt;eslint&lt;/code&gt; with the &lt;code&gt;prettier&lt;/code&gt; and &lt;code&gt;import-resolver-alias&lt;/code&gt; libraries and also telling &lt;code&gt;import/resolver&lt;/code&gt; that for &lt;code&gt;.js&lt;/code&gt; and &lt;code&gt;.jsx&lt;/code&gt; extensions, we will map &lt;code&gt;@&lt;/code&gt; to &lt;code&gt;.&lt;/code&gt; root folder.&lt;/p&gt;

&lt;p&gt;By doing this, &lt;code&gt;eslint&lt;/code&gt; will &lt;strong&gt;not&lt;/strong&gt; warn us when using e.g: &lt;code&gt;@/src/component/example.jsx&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: the order of the &lt;code&gt;extends&lt;/code&gt; list matters.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"extends"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"plugin:import/errors"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"prettier"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"next"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"settings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"import/resolver"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"alias"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"extensions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;".js"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;".jsx"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"map"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"@"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"."&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create &lt;code&gt;jsconfig.json&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Let's add the alias we need, shall we? Here is where we're actually defining which aliases we want.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"compilerOptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"module"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"commonJS"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"target"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"es2017"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"jsx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"react"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"baseUrl"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"paths"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"@/*"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"./*"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an example, but you can add whatever you like. Left side of the tuple is your alias, on the right side is where the alias should map to. In this case, &lt;code&gt;@&lt;/code&gt; resolves to the root folder &lt;code&gt;.&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Create &lt;code&gt;next.config.js&lt;/code&gt; for webpack
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;path&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;webpack&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;plugins&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;plugins&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

    &lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;optimization&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;providedExports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;alias&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;__dirname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is for the production build. Since nextJS uses &lt;code&gt;webpack&lt;/code&gt; to build everything for production, we need to configure the resolver and tell &lt;code&gt;webpack&lt;/code&gt; how to read our imports.&lt;/p&gt;

&lt;p&gt;Hope this is useful, if you follow all steps you will get a working project with &lt;code&gt;ESLint&lt;/code&gt;, &lt;code&gt;Prettier&lt;/code&gt; and path aliases :)&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to structure your SASS code</title>
      <dc:creator>Luís Serrano</dc:creator>
      <pubDate>Thu, 01 Oct 2020 00:14:21 +0000</pubDate>
      <link>https://forem.com/luis_sserrano/how-to-structure-your-sass-code-56nj</link>
      <guid>https://forem.com/luis_sserrano/how-to-structure-your-sass-code-56nj</guid>
      <description>&lt;p&gt;By already worked on different companies, with different sizes and codebases, I've seen multiple codebase structures and helped created some of them from the ground up.&lt;/p&gt;

&lt;p&gt;Working with a small team (two or three devs) is one thing, working +10 is another and it's very important to define a good structure from the beginning to help us scale the team and keeping the same level of productivity and good code.&lt;/p&gt;

&lt;p&gt;From my experience and by following the pattern by Hugo Giraudel, the &lt;strong&gt;7-1 Pattern&lt;/strong&gt;, with a personal twist on almost all of the projects I've worked, I've found the right structure that until today, it's working fine with all good practices in place.&lt;/p&gt;

&lt;p&gt;Of course today, you are probably using &lt;code&gt;styled-components&lt;/code&gt;/&lt;code&gt;Emotion&lt;/code&gt; on your &lt;code&gt;React&lt;/code&gt; or &lt;code&gt;Vue&lt;/code&gt; project but there are a lot of projects that only needs &lt;code&gt;CSS&lt;/code&gt; or &lt;code&gt;SASS&lt;/code&gt;. Let's proceed...&lt;/p&gt;

&lt;p&gt;I think &lt;code&gt;SASS&lt;/code&gt;, specially the &lt;strong&gt;.scss&lt;/strong&gt; file extension, gives important features that don't exist yet in &lt;strong&gt;CSS&lt;/strong&gt;, like nesting selectors, mixins, functions, variables (although css has now custom properties but they have differences), that increases our productivity.&lt;/p&gt;

&lt;p&gt;Using the &lt;strong&gt;7-1 pattern&lt;/strong&gt; as a baseline, you have all your sass partials in 7 different folders and a single file at root level that imports all folders. This is used to later compile everything to a single CSS stylesheet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;base&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="nt"&gt;components&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="nt"&gt;layout&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="nt"&gt;pages&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="nt"&gt;themes&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="nt"&gt;abstracts&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="nt"&gt;vendors&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="nt"&gt;main&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This has been our go-to architecture, since then we're following &lt;strong&gt;&lt;em&gt;almost&lt;/em&gt;&lt;/strong&gt; all recommendations.&lt;br&gt;
There are some nuances in this pattern that over time made us refactor and create our own architecture to fit small to big projects.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;em&gt;main.scss&lt;/em&gt; with all the imports
&lt;/h2&gt;

&lt;p&gt;We didn't like the idea of having a file importing every sass file on the project. To create pages that only import the CSS that it needs, this approach doesn't help.&lt;/p&gt;

&lt;p&gt;Example: you have a simple sign-in page, should this page import all the CSS of your website? Off course not, right?&lt;/p&gt;
&lt;h3&gt;
  
  
  Our &lt;strong&gt;solution:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;There are only two folders that we need to import on any page, the &lt;code&gt;abstracts&lt;/code&gt; and the &lt;code&gt;base&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;For these folders, we've created a &lt;code&gt;_global.scss&lt;/code&gt; file where we're importing all files inside.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;abstracts&lt;/span&gt;
    &lt;span class="nt"&gt;_functions&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_variables&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_mixins&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_global&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;base&lt;/span&gt;
    &lt;span class="nt"&gt;_general&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_fonts&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_global&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On each &lt;code&gt;_global&lt;/code&gt; we're importing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// abstracts/_global.scss&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'variables'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'functions'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'mixins'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// base/_global.scss&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'../abstracts/global'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'general'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'fonts'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since we need all files of the abstracts folder on any scss file to be able to use the mixins, variables or functions, we can save some time and import the &lt;code&gt;_global.scss&lt;/code&gt; of the abstracts folder in the &lt;code&gt;_global.scss&lt;/code&gt; of the base folder. Without doing this, we had to import the abstracts &lt;code&gt;_global.scss&lt;/code&gt; on every page .&lt;/p&gt;

&lt;p&gt;To create a specific CSS file for each page and importing only what it needs, you can use webpack or parcel to generate multi entries and outputs. You can find more info on how to use webpack with &lt;code&gt;SASS&lt;/code&gt; &lt;a href="https://webpack.js.org/concepts/entry-points/#multi-page-application"&gt;here&lt;/a&gt;.&lt;br&gt;
With the solution above, we can create a &lt;code&gt;sign-in.scss&lt;/code&gt; file in the &lt;code&gt;page&lt;/code&gt; folder that will import all the defaults and specific components to be rendered on the page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// sign-in.scss&lt;/span&gt;
&lt;span class="c1"&gt;// scss/ is an alias&lt;/span&gt;

&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/base/global'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/layout/header'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/layout/form'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/components/buttons'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/components/auth'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/components/loaders'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Using less folders
&lt;/h2&gt;

&lt;p&gt;We've started following the folder structure that the 7-1 pattern suggests, but on all projects that we've worked with, none of them had to use all the folders.&lt;/p&gt;

&lt;p&gt;I believe this suggestion below works for most cases, for small and big projects. &lt;br&gt;
As it happens with small or big projects, you need to start defining your default Sass code like colors, font-sizes, resets, etc and then pages and components. &lt;/p&gt;

&lt;p&gt;Here, there's no difference between a small and big project, only the number of files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;abstracts&lt;/span&gt;
    &lt;span class="nt"&gt;_functions&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_global&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_mixins&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_variables&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;base&lt;/span&gt;
    &lt;span class="nt"&gt;_fonts&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_general&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_global&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_typography&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;components&lt;/span&gt;
    &lt;span class="nt"&gt;_header&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_form&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_buttons&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;vendor&lt;/span&gt;
    &lt;span class="nt"&gt;_bootstrap&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;_normalize&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nt"&gt;pages&lt;/span&gt;
    &lt;span class="nt"&gt;auth&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nt"&gt;homepage&lt;/span&gt;&lt;span class="nc"&gt;.scss&lt;/span&gt;
    &lt;span class="nc"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Abstracts
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;/abstracts&lt;/code&gt; folder contains all the sass helpers you can create to help you out on your project. This is all about sass tools, variables, mixins, functions, placeholders, etc.&lt;/p&gt;

&lt;p&gt;We're using the &lt;code&gt;_global.scss&lt;/code&gt; to import all files so we don't bloat another file with these imports.&lt;/p&gt;

&lt;h3&gt;
  
  
  Base
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;/base&lt;/code&gt; folder contains all the boilerplate of the project. It's where we set the default styles, import custom fonts, set the default style for the headings, paragraphs, hyperlinks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Components
&lt;/h3&gt;

&lt;p&gt;Following the thought process when using a Javascript framework like React, everything is a component. These are independent, reusable pieces of the UI and you can think of components like a navbar, a header or a button.&lt;/p&gt;

&lt;p&gt;That's why instead of using a layout folder for elements like a Footer or an Header, we create pages that are composed by components.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vendor
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;/vendor&lt;/code&gt; folder contains all the third party files that the application needs. It can be a reset css file, bootstrap, anything you could think of.&lt;/p&gt;

&lt;p&gt;If these files should be included in any page of the website, we import in &lt;code&gt;/base/general.scss&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pages
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;/pages&lt;/code&gt; folder should contain the specific styles for each page with the filename being the name of the page. In our use case, we use &lt;code&gt;webpack&lt;/code&gt; to create specific CSS files for each page and import all the default styles and the components that I need for each page. You can find more information how we do this &lt;a href="https://webpack.js.org/concepts/entry-points/#multi-page-application"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This approach allow us to import only the code that the page needs and reduce the size of the file.&lt;/p&gt;

&lt;p&gt;An example could be something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// billing.scss&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/base/global'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/components/header'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/components/footer'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/components/form'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nc"&gt;.billing&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;640px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;pixelToRem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;90px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nt"&gt;-section&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;pixelToRem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;60px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;pixelToRem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;5px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're not using something like &lt;code&gt;webpack&lt;/code&gt; to bundle and convert your javascript and sass/less files and you have a &lt;code&gt;main.scss&lt;/code&gt; where you import everything, this approach allows you having a &lt;code&gt;_global.scss&lt;/code&gt; file per folder importing all the other files and import these globals to your main file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="c1"&gt;// main.scss&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/abstracts/global'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/base/global'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/components/global'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/pages/global'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s1"&gt;'scss/vendor/global'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope you find this article helpful.&lt;/p&gt;

&lt;p&gt;The 7-1 pattern helped us with the foundation and we tweaked a bit to fit our needs. This approach, where everything is a component and pages are composed by independent, reusable pieces help us creating smaller CSS files shipped to the user and have a more modular Sass structure to scale when the project and team grows.&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>css</category>
      <category>sass</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
