rtcs logo

Open-sourcing rtcs.dev

Robert Tabacaru

TL;DR

You can now browse the source code for this blog on github.

1. Reasoning

When I started this project close to a year ago, the goal was always to publish the code so that it may help others who are trying to build a personal brand.


This will also allow me to directly reference the source code in posts and it will motivate me to maintain the quality of it at the highest level.

1.1 Timing

I started this blog from a template, and while that helped me publish it fast and see if I enjoy technical writing, I held off on open-sourcing it because I did not feel that I could call it mine.


I kept some of the key elements I liked from the old implementation but made some improvements that reflect my way of working and my aesthetic.

2. Technical details

2.1 Stack


Main benefits:

2.2 Design system

One of the biggest pain points in the previous version was not having the main colors of the theme centralized and set according to the color preference (dark or light). This resulted in a lot of markup looking like this:

<p class="text-black dark:text-white">Hi!</p>

In the newer version, every color in the theme has both a light and a dark variant, and I don’t have to repeat myself as often.

@layer base {
  :root {
    --background: #ffffff;
    // ...other light theme colors
  }

  .dark {
    --background: #0a0a0a;
    // ...other dark theme colors
  }
}

And of course, the tailwind color theme is extended in order for me to be able to reference these colors easily:

export default {
  darkMode: ["class"],
  theme: {
    extend: {
      // ...
      colors: {
        // ....
        primary: {
          DEFAULT: "hsl(var(--primary))",
          foreground: "hsl(var(--primary-foreground))",
          "blog-foreground": "hsl(var(--primary-blog-foreground))",
        },
        secondary: {
          DEFAULT: "hsl(var(--secondary))",
          foreground: "hsl(var(--secondary-foreground))",
        },
      },
    },
  },
  // ...
};

As a starter, I used the boilerplate shadcn generates and just kept the tailwind configuration and the CSS variables.

3. Conclusion

I plan to continue improving the look & feel of the blog in the future, especially now that I have a sturdy foundation to build on.


Shout-outs: