<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Heghine Dev on Medium]]></title>
        <description><![CDATA[Stories by Heghine Dev on Medium]]></description>
        <link>https://medium.com/@heghine.dev357?source=rss-b988a40df30b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_2NhJsN4MF6g0x-Oe0Nodg.png</url>
            <title>Stories by Heghine Dev on Medium</title>
            <link>https://medium.com/@heghine.dev357?source=rss-b988a40df30b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 07:13:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@heghine.dev357/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[My Portfolio Development Roadmap for Freelance Web Development]]></title>
            <link>https://medium.com/@heghine.dev357/my-portfolio-development-roadmap-for-freelance-web-development-6c6eb0559588?source=rss-b988a40df30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c6eb0559588</guid>
            <category><![CDATA[developer-experience]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[pet-project]]></category>
            <dc:creator><![CDATA[Heghine Dev]]></dc:creator>
            <pubDate>Thu, 14 May 2026 20:27:49 GMT</pubDate>
            <atom:updated>2026-05-14T20:27:49.665Z</atom:updated>
            <content:encoded><![CDATA[<h3>Source:</h3><blockquote>GitHub: <a href="https://github.com/ZeroaNinea">https://github.com/ZeroaNinea</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uV2KEwepnFlWFIoYa6q30w.png" /><figcaption>Real Estate Agency — Pet Project</figcaption></figure><p>One of the most important lessons I’ve learned is that potential clients want to see real examples of your work.</p><p>Knowing many technologies is valuable because it allows you to apply to a wider range of projects and work with different technical stacks.</p><p>At the same time, technologies alone are not enough.</p><p>Most clients are not developers. They usually do not understand the technical details of software development and are primarily interested in whether you can solve their business problem.</p><p>That is why portfolio projects are so important.</p><p>A strong portfolio provides concrete evidence that you can build real products such as business websites, SaaS applications, e-commerce stores, and complex web applications.</p><p>In practice, both factors matter:</p><ul><li>Technical knowledge helps you qualify for more opportunities.</li><li>Portfolio projects demonstrate that you can deliver real results.</li></ul><p>My goal is to build projects that showcase both technical breadth and practical business value.</p><h3>Projects I Have Already Built</h3><p>I already have built several projects for my portfolio, you can see them in my profile README.md on GitHub.</p><ul><li>Animated draggable modal component in React with a rainbow button;</li><li>Reusable Command Palette component with color customization component in Angular;</li><li>Real-Time Chat Application similar to Discord (Angular + Angular Material + Node.js + Redis + Socket.io);</li><li>Site Portfolio (Angular + Angular Material + custom SVG animations + Three.js);</li><li>Real Estate Agency website in Vue.js (currently using mocked data, with a backend planned).</li></ul><p>But they are still not enough. I have accomplished only the half of my initial plan. I still need more reusable components and full-fledged projects.</p><h4>Modal Window in React</h4><p>It is a draggable modal window in React. I used Tailwind and Vite as additional technologies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s4P1LcHBDWgdK_i7cQ6yMg.png" /><figcaption>Modal Window in React — Reusable Component</figcaption></figure><p><strong>Rainbow Button</strong></p><p>When the user opens the page they first see a button with a rainbow gradient that infinitely moves to the left. The button increases its scale on hover, and plays a ripple effect when clicked.</p><p>I have created a separate component for the ripple button, so it’s reusable. The button is completely customizable, and it was intended to use it with Tailwind.</p><p><strong>Modal Window</strong></p><p>After the click the application opens the modal window. The user can drag it using the icon with arrows, and close it by clicking on the cross icon or on the background overlay.</p><p>The modal window appears and disappears with animations, and on subsequent clicks on the button, the window appears in the same place where it was the previous time.</p><h4>Command Palette Component in Angular</h4><p>It is command palette component where the user can choose custom commands that it should execute. There is also a color palette customization component in this project that allows the user to control the colors of the website. I did not use Angular Material for this project, so all components here are implemented customly with SCSS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2-ambki4FDXlVTB0y5Ma4w.png" /><figcaption>Command Palette Component — Angular</figcaption></figure><p>The demonstration starts with a page with:</p><ul><li>“Open Command Palette” button;</li><li>“View on GitHub” button;</li><li>A short text with usage guide;</li><li>And a Color Theme Setup component that allows the user to manipulate with all the colors on the website reactively.</li></ul><p><strong>“Open Command Palette” Button</strong></p><p>When the user clicks on this button, it plays a ripple effect, and opens the CommandPalette component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wx1-0Oyd02q4jZzXPftHZQ.png" /><figcaption>Command Palette Component — Opened</figcaption></figure><p>The user can select commands with Up and Down Arrow keys, and execute them with the Enter key.</p><p>All commands are custom functions that user should have to create earlier. When the user inputs something, it filters the commands.</p><p>The user can close it my clicking on the overlay or entering a command.</p><p><strong>“View on GitHub” Button</strong></p><p>When the user hovers on the “View on GitHub” button, it changes its background-color and becomes lighter.</p><p>When the user clicks on the “View on GitHub” button, the application plays a ripple effects, and redirects them to the source code of this project on GitHub.</p><p><strong>Color Setup</strong></p><p>Here the user can input a color in hex format or pick the colors with the browser color picker.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xWzB7TXi8R1uuAmVpEkQug.png" /><figcaption>Color Setup</figcaption></figure><h4>Real-Time Chat Application</h4><p>I have built this project in Angular and Node.js. I used Angular Material for the frontend. I store sessions in a Redis database, and provide real-time interactions in Socket.io.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cpc5uWgcL2-b_qPjzf5iQw.png" /><figcaption>Real-Time Chat Application — Staff-Room</figcaption></figure><p>Currently the backend of this project does not work because of problems with my MongoDB clusters. But I am still working on it. Recently I added a dark mode.</p><p>I also have issues that Tenor stopped being supported by Google, so I should switch to GIPHY.</p><p>This project allows users:</p><ul><li>to create accounts, and manipulate with their account data;</li><li>to create chat rooms and channels;</li><li>to add friends and create private chat rooms with their friends;</li><li>to pick emojis;</li><li>to pick GIFs and add or remove them from favorites;</li><li>to create custom roles for public chat rooms with different permissions.</li></ul><h4>Site Portfolio</h4><p>I have build this website in Angular and Angular Material. I used CSS animations, custom SVG animations and Three.js for visual effects in this project.</p><p>This project contains five sections that have individual color palettes. They have fade in and fade out effects controlled by single animation service called in the AppComponent.</p><p>There is also an animated sticky header at the top of the screen.</p><p><strong>Home: Orange Light</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*06EReGGf6RRqv-ZcOVWm5g.png" /><figcaption>Home Section — Portfolio Site</figcaption></figure><p>This section has animated triangles on the background of three colors: blue, green and pink.</p><p>There is a “Hi, I’m Heghine.” text as a title, and “Full-stack web developer.” text as a subtitle. The subtitle animates with fade in bottom effect when the page reloads.</p><p>There is a down arrow icon at the bottom of the HeroComponent. If the user clicks on it, it smoothly scrolls down to the “About” section.</p><p><strong>About: Blue Dark</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KUWi9A53HUO3in4rk6jejQ.png" /><figcaption>About Section — Portfolio Site</figcaption></figure><p>Each paragraph of the about section and the entire section animates with a fade in right animation, when the user scrolls to the component.</p><p>There is a “Building interactive apps with style” text with typewriter effect there. The effect activates with an intersection observer too.</p><p>There are six orbiting parallelepipeds with pulsing blue shadow effect on the left side of the component. When the user hovers on them, they move further apart and the background shadow turns pink. There is also a button with a car icon that appears at the center of parallelepipeds only when the user hovers on them.</p><p>If the user clicks on the car button, the application scrolls down to the car section that appears only on click. That section displays a 3D model of BMW M3 GTS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_92eMmkd1nK8_MwdV-_sLQ.png" /><figcaption>BMW M3 GTS — About Section</figcaption></figure><p>The user can close the car section by clicking on the car button again.</p><p><strong>Tech Stack: Green Light</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*puSuZcgP_PzERNZpUJmmtg.png" /><figcaption>Tech Stack Section — Portfolio Site</figcaption></figure><p>The “Tech Stack” section has animated cyber lines effect on its background. It is divided by tabs. There are six of them:</p><ul><li>Fronted,</li><li>Backend,</li><li>Full-stack,</li><li>Real-time</li><li>DevOps,</li><li>and Testing &amp; Quality.</li></ul><p>Each tab contains related major technologies that I know. Each technology icon is placed inside a technology element. Each technology element is a Drag &amp; Drop Angular Material component. The user can drag and drop them, only in a framework of one tab.</p><p>If the use clicks on a technology element it expands, and shows a shot explanation of that specific technology. The user can close it by clicking on the same button again, or on different a different button. If the user clicks on a different button, the new one opens, and the old one closes.</p><p>The tab buttons are located at the left part of the component under the title. There is also a cross icon button at the left side of the title.</p><p>If the user clicks on the cross icon button, it changes its icon from cross to three vertical dots, and closes tab buttons. The user can open them again by clicking on the three vertical dots icon button again.</p><p><strong>Projects: Pink Dark</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tYBqi26ntcNlHF8OrmR47w.png" /><figcaption>Projects Section — Portfolio Site</figcaption></figure><p>Currently there are only two projects in this section, but I plan to add my other projects here soon.</p><ul><li>Real-Time Chat App;</li><li>UI Elements.</li></ul><p>I have built custom unique card elements to for the projects.</p><p>Each card contains, a title, two 3D cube elements rotating in the same place, a pulsing background shadow effect, and a drifting plane element with a screenshot of that project.</p><p>When the user hovers on a card, the cubes increase their scale, a pink like appears at the bottom of the title, and the background shadow becomes pink.</p><p>When the user clicks on a card, the application plays a ripple effect, and redirects them to the project.</p><p><strong>Contacts: Yellow Light</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*elfv2x6Gh-xLt3JTIVkr1A.png" /><figcaption>Contact Section — Portfolio Site</figcaption></figure><p>The “Contacts” section also should be updated. It only has two circular ripple buttons:</p><ul><li>GitHub;</li><li>Gmail.</li></ul><p>I already have a lot of contacts, and I want to add them too.</p><h4>Real Estate Agency Website</h4><p>This is a real estate agency project in Vue.js and Bootstrap. It’s intended to have an admin panel with CURD functionality for properties. But currently I am mocking the data.</p><p>Currently, it only has two pages — “Home” and “Listings”.</p><p>The home page has following components:</p><ul><li>Header,</li><li>Hero,</li><li>Featured Properties,</li><li>Why Choose Us,</li><li>What Our Clients Say,</li><li>Footer.</li></ul><p>The header is a burger sticky header similar to the one in my portfolio site.</p><p>I got the photos from this website: <a href="https://static.photos/">https://static.photos/</a></p><p>I have also created two directives v-reveal and v-ripple.</p><p><strong>Hero</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uV2KEwepnFlWFIoYa6q30w.png" /><figcaption>Hero Section — Real Estate Agency</figcaption></figure><p>The “Hero” section contains a title: “Find Your Dream Home”; a subtitle: “Browse properties in your area”; a search form; and a background with property image and an overlay animated with a transparent black gradient.</p><p><strong>Featured Properties</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7P9cxxbRYFbLaHXNOaG3Nw.png" /><figcaption>Featured Properties Section — Real Estate Agency</figcaption></figure><p>This section has custom cards, when the user hovers on them they zoom their image. All buttons on this website have a ripple effect.</p><p>The “View All Properties” redirects to the “Listings” page, but the “View Details” button does not redirect anywhere yet. However, I will start creating a page for a single property soon.</p><p>Each card is animated with v-reveal directive. When the user scrolls to one of them it appears with a fade in effect.</p><p><strong>Why Choose Us &amp; What Our Clients Say</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*25rajpHjFAH7IIWvoyDdyg.png" /><figcaption>Why Choose Us Section — Real Estate Agency</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yEmbFc2C10b0slktwxgCRA.png" /><figcaption>What Our Clients Say Section — Real Estate Agency</figcaption></figure><p>Both of these sections contain elements that move up cast a shadow on hover.</p><p><strong>Footer</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P5eLxv7OXYoxQCRZnp_4Tg.png" /><figcaption>Footer Section — Real Estate Agency</figcaption></figure><p>The footer has a title and subtitle: “Find Your Perfect Home Today” and “Browse our listings or get in touch with our team for personalized help.” And it has two ripple buttons: “Brows Properties” and “Contact Us.” And a blue to purple gradient on the background.</p><p>And the second “Listings” page contains the following content:</p><ul><li>Header,</li><li>Hero,</li><li>Filter,</li><li>Listings,</li><li>Pagination,</li><li>Footer.</li></ul><p>The header and the footer are the same as in the “Home” page.</p><p><strong>Header, Hero and Filters</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yce72tSU_LziOkK557pHhQ.png" /><figcaption>Header, Hero and Filters of the Second Page — Real Estate Agency</figcaption></figure><p>The filters work reactively and the “Hero” has the same animation as the “Hero” section on the “Home” page.</p><p><strong>Listings &amp; Pagination</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yco24-inkXa7gno6iMbMFA.png" /><figcaption>Listings and Pagination Sections — Real Estate Agency</figcaption></figure><p>These are the same cards as in the FeaturedProperties component.</p><h3>My Portfolio Goals</h3><p>My goal is to build a portfolio that demonstrates my ability to create different types of websites and web applications that businesses commonly need.</p><p>I want potential clients to see concrete examples of my work and quickly understand that I can build solutions for wide range of use cases.</p><p>The main types of projects I want to include in my portfolio are:</p><ul><li>Business websites — such as estate agency website with listings, filtering, and search functionality.</li><li>Landing pages — modern marketing pages destined to present products and services clearly and effectively.</li><li>SaaS applications — full-stack software products with authentication, dashboards, and scalable backend architecture.</li><li>E-commerce websites — online stories built either with custom technologies or platforms such as Shopify.</li></ul><p>In addition to complete applications, I also enjoy creating reusable UI components and more technically complex projects, such as real-time applications.</p><p>By building projects in these categories, I aim to demonstrate both technical versatility and the ability to solve practical business problems.</p><p>My long-term goal is to work directly with clients as a freelance web developer and eventually create my own software products.</p><h3>Long-Term Vision</h3><p>My immediate goal is to start working directly with clients as a freelance web developer.</p><p>I want to build websites and web applications that help businesses solve real problems while continuing to expand my technical skills and professional experience.</p><p>In the long term, I plan to use the knowledge and experience I gain from client work to create my own software products.</p><p>For me, portfolio projects are more than practice exercises. They are steps toward financial independence, professional growth, and the ability to build software that provides real value to others.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c6eb0559588" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Command Palette Component in Angular (Part 2)]]></title>
            <link>https://medium.com/@heghine.dev357/creating-a-command-palette-component-in-angular-part-2-708e32fd4d06?source=rss-b988a40df30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/708e32fd4d06</guid>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Heghine Dev]]></dc:creator>
            <pubDate>Sun, 26 Apr 2026 22:20:32 GMT</pubDate>
            <atom:updated>2026-04-26T22:38:49.548Z</atom:updated>
            <content:encoded><![CDATA[<h4>Command Palette</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LIPC-ZLsPfO3Em7Cm-8piw.png" /><figcaption>Command Palette Project</figcaption></figure><h3>Sources:</h3><blockquote>GitHub: <a href="https://github.com/ZeroaNinea/Command-Palette-Angular">https://github.com/ZeroaNinea/Command-Palette-Angular</a><br>GitHub Pages: <a href="https://zeroaninea.github.io/Command-Palette-Angular/">https://zeroaninea.github.io/Command-Palette-Angular/</a></blockquote><p>In this part, I implement the actual CommandPalette component and connect it to the dynamic theming system from Part 1. The result is a reusable, keyboard-driven UI component that can execute custom commands.</p><h3>Command Model and Examples</h3><p>Each command is an object that combines metadata (label, keywords) with behavior (handler). This allows the palette to remain generic while executing arbitrary logic.</p><p>There is a simple list of commands in the app.ts file: two alerts and commands that change the colors of palettes.</p><p>I’m planning to create more UI elements in the future, and I will add them as commands in the CommandPalette.</p><pre>  commands: Command[] = [<br>    // id: string;<br>    // label: string;<br>    // keywords?: string[];<br>    // shortcut?: string;<br>    // payload?: unknown;<br>    // handler?: (payload?: unknown) =&gt; void;<br>    {<br>      id: &#39;alert-1&#39;,<br>      label: &#39;Alert 1&#39;,<br>      keywords: [&#39;alert&#39;, &#39;1&#39;],<br>      shortcut: &#39;a1&#39;,<br>      handler: () =&gt; alert(&#39;Alert 1&#39;),<br>    },<br>    {<br>      id: &#39;alert-2&#39;,<br>      label: &#39;Alert 2&#39;,<br>      keywords: [&#39;alert&#39;, &#39;2&#39;],<br>      shortcut: &#39;a2&#39;,<br>      handler: () =&gt; alert(&#39;Alert 2&#39;),<br>    },<br>    {<br>      id: &#39;primary-red&#39;,<br>      label: &#39;Set Primary to Red&#39;,<br>      handler: () =&gt; this.primary.set(&#39;#ff4d4f&#39;),<br>    },<br>    {<br>      id: &#39;primary-blue&#39;,<br>      label: &#39;Set Primary to Blue&#39;,<br>      handler: () =&gt; this.primary.set(&#39;#4FC3F7&#39;),<br>    },<br>    {<br>      id: &#39;reset&#39;,<br>      label: &#39;Reset Colors&#39;,<br>      handler: () =&gt; {<br>        this.primary.set(&#39;#4FC3F7&#39;);<br>        this.secondary.set(&#39;#2196F3&#39;);<br>        this.tertiary.set(&#39;#086CBC&#39;);<br>      },<br>    },<br>  ];</pre><h3>Importing the CommandPalette Component</h3><p>The commands’ list is passed to the CommandPalette component as the commands array.</p><pre>  &lt;app-command-palette<br>    [style.--cp-bg]=&quot;neutralPalette().bg&quot;<br>    [style.--cp-surface]=&quot;neutralPalette().surface&quot;<br>    [style.--cp-border]=&quot;neutralVariantPalette().border&quot;<br>    [style.--cp-text]=&quot;neutralVariantPalette()[&#39;100&#39;]&quot;<br>    [style.--cp-accent]=&quot;primaryPalette().accent&quot;<br>    [style.--cp-hover]=&quot;neutralPalette().hover&quot;<br>    [isOpen]=&quot;isOpen()&quot;<br>    [commands]=&quot;commands&quot;<br>    (isOpenChange)=&quot;isOpen.set($event)&quot;<br>    (commandSelected)=&quot;onCommand($event)&quot;<br>  &gt;&lt;/app-command-palette&gt;</pre><p>The CommandPalette component also emits isOpenChange and commandSelected events. Accordingly:</p><ul><li>The isOpenChange event is fired when the user changes the state of the CommandPalette component from shown to hidden, and back. The isOpenChange event is used to notify the parent when the palette should close (e.g., after selecting a command or clicking outside).</li><li>And the commandSelected event works when the user selects a command. It emits an entire element of the command from the commands array, and passes the required .payload to the command handler if it exists.</li></ul><pre>  onCommand(cmd: Command) {<br>    this.commandSelected.emit(cmd);<br>    cmd.handler?.(cmd.payload);<br>    this.isOpenChange.emit(false);<br>  }<br><br>  close() {<br>    this.isOpenChange.emit(false);<br>  }</pre><h3>Command Filtering and Keyboard Navigation</h3><p>Not all commands are visible at the same time. If the user inputs something into the command palette, it filters visible commands. There are two properties that used for command filtering inside the CommandPalette component that participate in the filtering logic: query and filtered.</p><pre>  @Input() commands: Command[] = [];<br>  @Input() isOpen: boolean = false;<br><br>  @Output() commandSelected = new EventEmitter&lt;Command&gt;();<br>  @Output() isOpenChange = new EventEmitter&lt;boolean&gt;();<br><br>  @ViewChild(&#39;searchInput&#39;) input!: ElementRef&lt;HTMLInputElement&gt;;<br><br>  query = &#39;&#39;;<br>  filtered: Command[] = [];<br>  activeIndex = 0;</pre><ul><li>query: contains the value that user inputs into the component input.</li><li>filtered: it’s the array of filtered commands.</li></ul><p>The visibleCommands getter returns the filtered array if the user did not input queries. Otherwise, it will return the commands array received from the parent component.</p><pre>  get visibleCommands(): Command[] {<br>    if (!this.query) return this.commands;<br>    return this.filtered;<br>  }</pre><p>The filter filters commands by their label and keyboards.</p><pre>  filter() {<br>    const q = this.query.toLowerCase();<br><br>    this.filtered = this.commands.filter(<br>      (cmd) =&gt;<br>        cmd.label.toLowerCase().includes(q) ||<br>        cmd.keywords?.some((k) =&gt; k.toLowerCase().includes(q)),<br>    );<br><br>    this.activeIndex = 0;<br>  }</pre><p>The filter method is bound to the input event, and it triggers only when the user inputs something.</p><pre>@if (isOpen) {<br>  &lt;div (click)=&quot;close()&quot; class=&quot;overlay&quot;&gt;<br>    &lt;div (click)=&quot;$event.stopPropagation()&quot; class=&quot;palette&quot;&gt;<br>      &lt;input<br>        #searchInput<br>        class=&quot;search&quot;<br>        placeholder=&quot;Type a command...&quot;<br>        [(ngModel)]=&quot;query&quot;<br>        (input)=&quot;filter()&quot;<br>        (keydown)=&quot;onKeydown($event)&quot;<br>      /&gt;<br>      &lt;div class=&quot;list&quot;&gt;<br>        @for (command of visibleCommands; track $index; let i = $index) {<br>          &lt;div class=&quot;item&quot; [class.active]=&quot;i === activeIndex&quot; (click)=&quot;onCommand(command)&quot;&gt;<br>            {{ command.label }}<br>          &lt;/div&gt;<br>        }<br>      &lt;/div&gt;<br>    &lt;/div&gt;<br>  &lt;/div&gt;<br>}</pre><p>There is also an onKeydown method that is bound to the keydown event. It works when the user focuses on the input and uses any key. But its logic only uses the ArrowDown, ArrowUp, Enter and Escape keys.</p><pre>  onKeydown(e: KeyboardEvent) {<br>    const list = this.visibleCommands;<br><br>    if (!list.length) return;<br><br>    if (e.key === &#39;ArrowDown&#39;) {<br>      e.preventDefault();<br>      this.activeIndex = (this.activeIndex + 1) % list.length;<br>    }<br><br>    if (e.key === &#39;ArrowUp&#39;) {<br>      e.preventDefault();<br>      this.activeIndex = (this.activeIndex - 1 + list.length) % list.length;<br>    }<br><br>    if (e.key === &#39;Enter&#39;) {<br>      e.preventDefault();<br>      this.onCommand(list[this.activeIndex]);<br>    }<br><br>    if (e.key === &#39;Escape&#39;) {<br>      this.close();<br>    }<br><br>    setTimeout(() =&gt; {<br>      const el = document.querySelector(&#39;.item.active&#39;);<br>      el?.scrollIntoView({ block: &#39;nearest&#39; });<br>    });<br>  }</pre><p>The class .active is assigned to the element that has the same index in the visibleCommands array as the value of the activeIndex method.</p><p>When the user presses the ArrowDown or ArrowUp keys, the code decrements and increments the activeIndex, but it cannot be less than 0 and more than the length of the visibleCommands array.</p><p>The Enter key executes the function and closes the CommandPalette component. And the Escape key just closes it.</p><p>Then after iterating the conditional operations the application scrolls to the new active element.</p><h3>ngOnChanges</h3><p>The ngOnChanges lifecycle hook is used to react to changes in input properties. In this case, it listens for changes to the isOpen input.</p><p>When the command palette is opened, its internal state is reset:</p><ul><li>the search query is cleared,</li><li>the filtered commands list is reset,</li><li>the active index is set to the first item.</li></ul><p>This ensures that every time the palette opens, it starts in a clean and predictable state instead of preserving the previous search.</p><h3>ngAfterViewChecked</h3><p>The ngAfterViewChecked lifecycle hook runs after Angular updates the component’s view.</p><p>It is used here to automatically focus the input field when the command palette is opened.</p><p>This allows the user to start typing immediately without needing to click on the input manually.</p><h3>Afterword</h3><p>In this part, I implemented the core logic of the command palette: command definition, filtering, and keyboard navigation. The component is fully functional and can execute custom commands while remaining reusable and independent from specific business logic.</p><p>One of the key ideas behind this implementation is treating commands as objects that combine metadata (label, keywords, shortcut) with behavior (handler). This allows the component to stay generic while supporting a wide range of use cases.</p><p>The command palette is also integrated with the dynamic theming system created in the previous part, which makes it easy to adapt its appearance without changing the component itself.</p><p>There are still many possible improvements:</p><ul><li>grouping commands by category,</li><li>adding icons,</li><li>highlighting matched search text,</li><li>improving accessibility and keyboard support.</li></ul><p>I plan to continue expanding this project and use the command palette as a central interaction system for future UI components.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=708e32fd4d06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Command Palette Component in Angular (Part 1)]]></title>
            <link>https://medium.com/@heghine.dev357/creating-a-command-palette-component-in-angular-part-1-466a8f2dd7f5?source=rss-b988a40df30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/466a8f2dd7f5</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[ui-ux-design]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Heghine Dev]]></dc:creator>
            <pubDate>Tue, 21 Apr 2026 21:53:58 GMT</pubDate>
            <atom:updated>2026-04-21T21:53:58.918Z</atom:updated>
            <content:encoded><![CDATA[<h4>Dynamic Palette Generation</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*YeDcJE9pkUZ8ruYJvJCmCw.png" /><figcaption>Reactive Palette Generation Component</figcaption></figure><h3><strong>Sources:</strong></h3><blockquote>GitHub: <a href="https://github.com/ZeroaNinea/Command-Palette-Angular">https://github.com/ZeroaNinea/Command-Palette-Angular</a><br>GitHub Pages: <a href="https://zeroaninea.github.io/Command-Palette-Angular/">https://zeroaninea.github.io/Command-Palette-Angular/</a></blockquote><p>This is the first part of a series where I build a reusable and customizable command palette in Angular.</p><p>Since the component needs to support different themes, I started by creating a dynamic color palette generator. It takes a set of base colors and produces consistent palettes for primary, secondary, tertiary, neutral, and error roles.</p><h3>Palette Generation</h3><p>I’ve created a palette generation utility in the project’s src/app/shared/utils/palette.util.ts directory. It uses the chroma-js library, and exports a single function createPalette that takes one parameter the base color of a string type, then it returns an object of Palette type.</p><p>The function generates a scale of 10 colors (from 50 to 900), similar to common design systems. These are then mapped to semantic roles like background, surface, text, and accent.</p><p>Here is the example of the code:</p><pre>import chroma from &#39;chroma-js&#39;;<br>import { Palette } from &#39;../../../types/palette.alias&#39;;<br><br>export function createPalette(base: string): Palette {<br>  const scale = chroma<br>    .scale([chroma(base).brighten(3), base, chroma(base).darken(3)])<br>    .mode(&#39;lab&#39;)<br>    .colors(10);<br><br>  return {<br>    50: scale[0],<br>    100: scale[1],<br>    200: scale[2],<br>    300: scale[3],<br>    400: scale[4],<br>    500: scale[5],<br>    600: scale[6],<br>    700: scale[7],<br>    800: scale[8],<br>    900: scale[9],<br><br>    // Semantic roles.<br>    bg: scale[0],<br>    surface: scale[8],<br>    surfaceAlt: scale[7],<br>    border: scale[6],<br>    text: chroma.contrast(scale[0], &#39;#fff&#39;) &gt; 4.5 ? &#39;#fff&#39; : &#39;#000&#39;,<br>    textMuted: scale[3],<br>    accent: scale[4],<br>    accentHover: scale[3],<br>    accentActive: scale[2],<br><br>    // State colors.<br>    hover: chroma(base).brighten(0.5).hex(),<br>    active: chroma(base).darken(0.5).hex(),<br>    focus: chroma(base).saturate(1).hex(),<br><br>    // Base<br>    base: base,<br>  };<br>}</pre><h3>Updating the Palettes Reactively</h3><p>And then in the, in the root of the project, in the app.ts file. I passed six base colors to the createPalette function as default values. I used signals and the computed function to reactively update the palettes later, when the user inputs new colors.</p><p>Here’s how palettes are computed reactively using Angular signals:</p><pre>import { Component, computed, signal } from &#39;@angular/core&#39;;<br>import { RouterOutlet } from &#39;@angular/router&#39;;<br><br>import { createPalette } from &#39;./shared/utils/palette.util&#39;;<br><br>import { Palette } from &#39;../types/palette.alias&#39;;<br><br>import { CommandPalette } from &#39;./command-palette/command-palette&#39;;<br>import { ColorInput } from &#39;./color-input/color-input&#39;;<br><br>@Component({<br>  selector: &#39;app-root&#39;,<br>  imports: [RouterOutlet, CommandPalette, ColorInput],<br>  templateUrl: &#39;./app.html&#39;,<br>  styleUrl: &#39;./app.scss&#39;,<br>})<br>export class App {<br>  protected readonly title = signal(&#39;Command-Palette-Angular&#39;);<br><br>  primary = signal(&#39;#4FC3F7&#39;);<br>  secondary = signal(&#39;#2196F3&#39;);<br>  tertiary = signal(&#39;#086CBC&#39;);<br>  neutral = signal(&#39;#929CA6&#39;);<br>  neutralVariant = signal(&#39;#6E8E9D&#39;);<br>  error = signal(&#39;#E01B24&#39;);<br><br>  primaryPalette = computed&lt;Palette&gt;(() =&gt; createPalette(this.primary()));<br>  secondaryPalette = computed&lt;Palette&gt;(() =&gt; createPalette(this.secondary()));<br>  tertiaryPalette = computed&lt;Palette&gt;(() =&gt; createPalette(this.tertiary()));<br>  neutralPalette = computed&lt;Palette&gt;(() =&gt; createPalette(this.neutral()));<br>  neutralVariantPalette = computed&lt;Palette&gt;(() =&gt; createPalette(this.neutralVariant()));<br>  errorPalette = computed&lt;Palette&gt;(() =&gt; createPalette(this.error()));<br>}</pre><p>After that I added the ColorInput component that reactively updates the chosen colors and emits them back to the root of the project.</p><p>The ColorInput component contains four elements positioned absolutely, label, .text-overlay, .ripple and .color-picker-overlay:</p><ul><li>label: it’s the label of the input element it raises up when user hovers or focuses on the input.</li><li>.text-overlay: overlays the text of the input when it is lowered, and disappears on focus or hover, when the label raises up.</li><li>.ripple: provides a ripple effect.</li><li>.color-picker-overlay: overlays the color picker input, but it has a pointer-events: none, it’s only used for changing the color of the input on hover.</li></ul><p>It also has two inputs .color-text and .color-picker.</p><ul><li>The .color-text is needed to input colors as a text.</li><li>And the .color-picker uses the default browser color picker to input colors with a visual interface.</li></ul><p>They are both working and there is no big difference which of them to use. They are both emitting the chosen color back to the App component.</p><pre>&lt;div class=&quot;input-container&quot;&gt;<br>  &lt;label&gt;{{ label }}&lt;/label&gt;<br>  &lt;div class=&quot;text-overlay&quot;&gt;&lt;/div&gt;<br><br>  &lt;div class=&quot;input&quot;&gt;<br>    &lt;input<br>      type=&quot;text&quot;<br>      [value]=&quot;value&quot;<br>      (input)=&quot;onInput($any($event.target).value)&quot;<br>      class=&quot;color-text&quot;<br>    /&gt;<br><br>    &lt;div class=&quot;color-picker-wrapper&quot; (click)=&quot;createRipple($event)&quot;&gt;<br>      &lt;input<br>        type=&quot;color&quot;<br>        [value]=&quot;value&quot;<br>        (input)=&quot;onInput($any($event.target).value)&quot;<br>        class=&quot;color-picker&quot;<br>      /&gt;<br>      &lt;span class=&quot;ripple&quot;&gt;&lt;/span&gt;<br>      &lt;div<br>        [style.background]=&quot;<br>          &#39;color-mix(in oklab, var(--cp-base) 0%, &#39; + getColorPickerOverlayColor() + &#39; 20%)&#39;<br>        &quot;<br>        class=&quot;color-picker-overlay&quot;<br>      &gt;&lt;/div&gt;<br>    &lt;/div&gt;<br>  &lt;/div&gt;<br>&lt;/div&gt;</pre><p>The most interesting part is that the .color-picker-overlay’s color is calculated dynamically based on contrast. If the base color is dark, a lighter overlay is used, and vice versa. This ensures the hover effect remains visible regardless of the selected color.. It takes the base color, that is actually the value of the input element, and checks how light or dark it is. If it’s light then it will make the overlay darker, and if it’s dark the overlay will become lighter.</p><p>The .ts file of the ColorInput component looks like this:</p><pre>import { Component, EventEmitter, Input, Output } from &#39;@angular/core&#39;;<br><br>import chroma from &#39;chroma-js&#39;;<br><br>@Component({<br>  selector: &#39;app-color-input&#39;,<br>  imports: [],<br>  templateUrl: &#39;./color-input.html&#39;,<br>  styleUrl: &#39;./color-input.scss&#39;,<br>})<br>export class ColorInput {<br>  @Input() label = &#39;&#39;;<br>  @Input() value = &#39;#4FC3F7&#39;;<br>  @Output() valueChange = new EventEmitter&lt;string&gt;();<br><br>  getColorPickerOverlayColor() {<br>    return chroma.contrast(this.value, &#39;#fff&#39;) &gt; 4.5 ? &#39;#fff&#39; : &#39;#000&#39;;<br>  }<br><br>  onInput(value: string) {<br>    this.valueChange.emit(value);<br>  }<br><br>  createRipple(event: MouseEvent) {<br>    const wrapper = event.currentTarget as HTMLElement;<br>    const ripple = wrapper.querySelector(&#39;.ripple&#39;) as HTMLElement;<br><br>    const rect = wrapper.getBoundingClientRect();<br><br>    const size = Math.max(rect.width, rect.height);<br>    const x = event.clientX - rect.left - size / 2;<br>    const y = event.clientY - rect.top - size / 2;<br><br>    ripple.style.width = ripple.style.height = `${size}px`;<br>    ripple.style.left = `${x}px`;<br>    ripple.style.top = `${y}px`;<br><br>    ripple.classList.remove(&#39;active&#39;);<br>    void ripple.offsetWidth;<br>    ripple.classList.add(&#39;active&#39;);<br>  }<br>}</pre><p>And finally, I call the ColorInput component in the App component’s template six times, and pass them the CSS variables, the base color and accept the emitted new color.</p><pre>        &lt;app-color-input<br>          label=&quot;Primary&quot;<br>          [value]=&quot;primary()&quot;<br>          (valueChange)=&quot;primary.set($event)&quot;<br>          [style.--cp-bg]=&quot;neutralPalette().bg&quot;<br>          [style.--cp-text]=&quot;primaryPalette().text&quot;<br>          [style.--cp-accent]=&quot;primaryPalette().accent&quot;<br>          [style.--cp-border]=&quot;primaryPalette().border&quot;<br>          [style.--cp-surface]=&quot;primaryPalette().surface&quot;<br>          [style.--cp-base]=&quot;primaryPalette().base&quot;<br>          [style.--cp-input-border]=&quot;primaryPalette()[&#39;300&#39;]&quot;<br>          [style.--cp-input-label]=&quot;primaryPalette()[&#39;900&#39;]&quot;<br>          [style.--cp-label-muted]=&quot;neutralPalette()[&#39;600&#39;]&quot;<br>          [style.--cp-input-text]=&quot;neutralVariantPalette()[&#39;900&#39;]&quot;<br>          [style.--cp-input-ripple]=&quot;primaryPalette()[&#39;100&#39;]&quot;<br>        &gt;&lt;/app-color-input&gt;</pre><h3>Afterword</h3><p>In the next part, I’ll build the actual command palette (similar to VS Code’s Ctrl + Shift + P), using this theming system. The goal is to make it fully customizable and reusable. It will allow users to create their own custom commands. They should name them and pass functions that they want to execute when the command it entered.</p><p>That component will be completely customizable. That’s why I needed to create a color theme setup component first.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=466a8f2dd7f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Applied to Dozens of Freelance Developer Jobs on LinkedIn — Here’s what Happened]]></title>
            <link>https://medium.com/@heghine.dev357/i-applied-to-dozens-of-freelance-developer-jobs-on-linkedin-heres-what-happened-5c2f26672831?source=rss-b988a40df30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c2f26672831</guid>
            <category><![CDATA[linkedin]]></category>
            <category><![CDATA[developer-experience]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Heghine Dev]]></dc:creator>
            <pubDate>Mon, 06 Apr 2026 17:59:56 GMT</pubDate>
            <atom:updated>2026-04-08T06:05:38.166Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PjDdihmh5ysL6m16sH-eCA.png" /><figcaption>Sadj Image Like This: :(</figcaption></figure><p>This week, my LikedIn profile appeared 877 times.</p><p>I spent the last few days actively applying to freelance developer posts — sending messages, writing emails, and reaching out to people looking for React, Angular, and full-stack developers.</p><p>For a long time, I didn’t think deeply about the process of getting a job. I thought that building projects and learning new technologies would somehow help me start working as a freelancer.</p><p>It wasn’t.</p><p>So instead of continuing to learn endlessly, I decided to do something different: I started treating LinkedIn like a real opportunity source — and began applying consistently.</p><p>What happened next was surprisingly different from what I expected.</p><h3>What I Actually Did</h3><p>Instead of just scrolling or learning passively, I started taking action:</p><ul><li>Applied to multiple freelance posts every day;</li><li>Sent emails and LikedIn DMs;</li><li>Shared my work (my Real-Time Chat App and portfolio);</li><li>Shared conversations with potential clients.</li></ul><p>I don’t want to feel “ready.” I just started.</p><h3>What I Learned</h3><h4>1. Most People Don’t Reply</h4><p>This was the first thing I noticed. You can send multiple messages, and get no response at all. At first. it feels like rejection. But it’s not.</p><p>It just how things work:</p><ul><li>People are busy;</li><li>Posts get flooded with messages;</li><li>Many applications are ignored.</li></ul><p>This is normal.</p><h4>2. Timing Matters More Than I Expected</h4><p>Applying early makes a big difference.</p><p>Posts that are:</p><ul><li>Recently published;</li><li>Have fewer comments.</li></ul><p>Are much more likely to get a response.</p><p>If you apply late, you’re just one of many.</p><h4>3. Messaging Matters</h4><p>At first, I wrote very genetic messages. They didn’t work well. What I worked better was being clear and direct:</p><ul><li>What I can build;</li><li>What I’ve already built;</li><li>How I can help with their project.</li></ul><p>People don’t want long introductions. They want to understand quickly if you’re useful.</p><h4>4. A Broad Tech Stack Helps — But Not in the Way I Expected</h4><p>One unexpected advantage I had was knowing multiple frameworks. Since I’ve worked with:</p><ul><li>Angular;</li><li>React;</li><li>React Native;</li><li>Next.js;</li><li>Vue.js;</li><li>Nest.js;</li><li>Node.js.</li></ul><p>I didn’t have to skip many posts.</p><p>I could apply to wide range of opportunities:</p><ul><li>Frontend;</li><li>Full-stack;</li><li>Sometimes even backend-focused roles.</li></ul><p>But this doesn’t mean you need to learn everything. What actually matters is:</p><blockquote>Being able to build real things.</blockquote><p>The tech stack just gives you more entry points.</p><h3>Real Conversations Started to Happen</h3><p>After some time, I started getting responses.</p><p>Not many — but enough to notice a pattern.</p><ul><li>I had a conversation about a JAMStack role and went through an interview.</li><li>I connected with other developers.</li><li>Some people told me they might reach out in the future.</li></ul><p>Nothing immediate came out of it, but it felt like I was no longer just sending messages into nothing.</p><p>Eventually, I started having actual conversations with potential clients.</p><p>In one of them, I was asked:</p><blockquote><em>“What are your charges for an app?”</em></blockquote><p>It wasn’t surprising — just a bit unexpected how quickly the conversation moved to pricing.</p><p>I tried to understand the project first and asked about the scope.</p><p>But they asked again.</p><p>So I gave a simple range:</p><ul><li>basic MVP: around $300–800</li></ul><p>They said they would get back to me. And maybe they will, maybe they won’t. But that wasn’t the important part.</p><p>The important part was that the process had changed:</p><blockquote><em>From applying to having real discussions.</em></blockquote><h3>Advice If You’re Starting</h3><ul><li>Don’t wait until you feel ready;</li><li>Apply even if you don’t match every requirement;</li><li>Build at least one real project;</li><li>Keep sending messages, even if most don’t reply.</li></ul><p>Consistency matters more than perfection.</p><h3>Afterword</h3><p>I’m currently building and sharing my work publicly, including a Real-Time Chat Application and other ongoing projects.</p><p>I’m also open to freelance opportunities.</p><ul><li>GitHub: <a href="https://github.com/ZeroaNinea/">https://github.com/ZeroaNinea/</a></li><li>Portfolio: <a href="https://heghine-app.netlify.app/">https://heghine-app.netlify.app</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c2f26672831" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What It’s Like to Build a Real-Time Chat App From Scratch (And What I’d Do Differently)]]></title>
            <link>https://medium.com/@heghine.dev357/what-its-like-to-build-a-real-time-chat-app-from-scratch-and-what-i-d-do-differently-89d00bf02bd9?source=rss-b988a40df30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/89d00bf02bd9</guid>
            <category><![CDATA[developer-experience]]></category>
            <category><![CDATA[socketio]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[angular]]></category>
            <dc:creator><![CDATA[Heghine Dev]]></dc:creator>
            <pubDate>Mon, 30 Mar 2026 05:39:26 GMT</pubDate>
            <atom:updated>2026-03-30T05:53:45.544Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*glHa0PD6JZRw0Vs5zaOZRQ.png" /><figcaption>General Channel — Catgirl, Puppygirl &amp; Cat User</figcaption></figure><h3>Source</h3><blockquote>GitHub: <a href="https://github.com/ZeroaNinea/Real-Time-Chat-App">https://github.com/ZeroaNinea/Real-Time-Chat-App</a></blockquote><h3>Why I Built It</h3><p>I started this project as a simple pet project to help me get a job. I built a real-time chat application from scratch, solving problems step by step and turning it into something that actually worked.</p><p>But after finishing it, I didn’t immediately start applying.</p><p>Instead, I thought:</p><blockquote>I need to learn more first.</blockquote><p>So I spent next seven months learning frameworks, like React, Vue, Next.js, and Nest.js.</p><p>Only later did I realize something important:</p><blockquote>I could have already started looking for a job.</blockquote><p>After that, I spent two more months on LikedIn and writing posts, but still didn’t get results. This officially proves that I have a silly brain. Or maybe no brain at all, but I’m still happy because I’m silly. :3</p><p>That’s when it became clear:</p><ul><li>Building projects is important.</li><li>Learning is important.</li><li>But knowing how to present yourself and reach people matters just as much.</li></ul><h3>The Biggest Challenge: WebSockets and Structure</h3><p>One of the hardest parts of the project was working with WebSockets using Socket.io.</p><p>At the time:</p><ul><li>I didn’t fully understand how it worked.</li><li>I couldn’t properly connect users to rooms.</li><li>All my Socket.io logic was in a one huge file.</li></ul><p>It quickly became difficult to manage.</p><p>The real issue wasn’t just bugs — it was structure.</p><p>After refactoring:</p><ul><li>I split the logic into smaller parts.</li><li>Separated responsibilities.</li><li>Made the system easier to understand.</li></ul><p>That was a turning point.</p><h3>Mistakes I Made</h3><p>A major mistake was not clearly separating real-time and non-real-time logic.</p><p>I relied havily on WebSockets early on, which led to:</p><ul><li>Mixing different types of functionality.</li><li>Unclear architecture.</li></ul><p>If I were to rebuild it, I would:</p><ul><li>Use REST APIs for standard operations.</li><li>Use WebSockets only where real-time updates are necessary.</li><li>Define clear boundaries from the beginning.</li></ul><h3>What I’d Improve</h3><p>There’s still a lot I want to improve:</p><h4>Features</h4><ul><li>File uploads (images, videos, text files).</li><li>Highlighting the current channel.</li><li>Customizable themes (including dark mode variants).</li><li>Movable UI elements.</li></ul><h4>UX</h4><ul><li>Better message display and layout.</li></ul><h4>Architecture</h4><ul><li>End-to-End encryption.</li><li>A separate service for encryption key rotation.</li></ul><h3>What I Learned</h3><p>The biggest lesson wasn’t technical.</p><p>It was this:</p><p>Building something real is necessary — but it’s not enough on its own.</p><p>You also need to:</p><ul><li>Show your work.</li><li>Communicate clearly.</li><li>Reach the right people.</li></ul><p>Otherwise, even a solid project can go unnoticed.</p><h3>Afterword</h3><p>This project became more than just a chat app.</p><p>It taught me:</p><ul><li>How to build real systems.</li><li>How to deal with complexity.</li><li>And how important visibility is.</li></ul><p>If you’re learning development, don’t just build — make sure people can actually see what you’ve built.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89d00bf02bd9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build a Modern Stack with Vite, Tailwind, i18next, and TanStack Router]]></title>
            <link>https://medium.com/@heghine.dev357/build-a-modern-stack-with-vite-tailwind-i18next-and-tanstack-router-cba0f6822e83?source=rss-b988a40df30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/cba0f6822e83</guid>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[vitejs]]></category>
            <category><![CDATA[i18next]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[tan-stack-router]]></category>
            <dc:creator><![CDATA[Heghine Dev]]></dc:creator>
            <pubDate>Fri, 20 Mar 2026 13:51:07 GMT</pubDate>
            <atom:updated>2026-03-20T13:51:07.463Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Source:</strong> <a href="https://github.com/ZeroaNinea/React-Vite-i18next--tanstack-react-router-Tailwind-Example">https://github.com/ZeroaNinea/React-Vite-i18next--tanstack-react-router-Tailwind-Example</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9ptWZGQJ7sWruWwRI8kVQg.png" /><figcaption>The Tutorial Project in Rixēspēk</figcaption></figure><p>Setting up a modern React project can quickly turn into dependency chaos — especially when combining routing, styling, and internationalization.</p><p>In this guide, you’ll build a clean, production-ready setup using:</p><ul><li>⚛️ React</li><li>⚡ Vite</li><li>🎨 Tailwind CSS</li><li>🌍 i18next</li><li>🧭 TanStack Router</li></ul><h3>⚠️ Warning (Version Compatibility)</h3><blockquote>Depending on your Vite version, some dependencies may not install cleanly.</blockquote><p>If you run into issues:</p><pre>npm i --force</pre><p>Or consider using a slightly older version of Vite.</p><h3>🚀 Step 1 — Create the Project</h3><pre>npm create vite@latest React-Vite-i18next-@tanstack/react-router-Tailwind-Example -- --template react-ts</pre><p>This sets up a <strong>React + TypeScript</strong> project powered by <strong>Vite</strong>.</p><h3>🎨 Step 2 — Install Tailwind CSS</h3><p>Install Tailwind and its Vite plugin:</p><pre>npm i tailwindcss @tailwindcss/vite</pre><p>If installation fails:</p><pre>npm i --force @tailwindcss/vite</pre><h4>Configure Vite</h4><pre>import { defineConfig } from &#39;vite&#39;;<br>import react from &#39;@vitejs/plugin-react&#39;;<br>import tailwindcss from &#39;@tailwindcss/vite&#39;;<br><br>export default defineConfig({<br>  plugins: [react(), tailwindcss()],<br>});</pre><h4>Import Tailwind</h4><pre>@import &#39;tailwindcss&#39;;</pre><h3>🧭 Step 3 — Install TanStack Router</h3><pre>npm i @tanstack/react-router @tanstack/router-devtools</pre><h3>🔌 Step 4 — Integrate the Router</h3><p>Create:</p><pre>src/router.css</pre><p>Then connect it in main.tsx:</p><pre>import { StrictMode } from &#39;react&#39;;<br>import { createRoot } from &#39;react-dom/client&#39;;<br><br>import &#39;./index.css&#39;;<br>import { AppRouter } from &#39;./router.tsx&#39;;<br><br>createRoot(document.getElementById(&#39;root&#39;)!).render(<br>  &lt;StrictMode&gt;<br>    &lt;AppRouter /&gt;<br>  &lt;/StrictMode&gt;,<br>);</pre><h3>🌍 Step 5 — Add Internationalization (i18next)</h3><p>Install:</p><pre>npm i i18next react-i18next</pre><h4>Setup i18n</h4><p>Create:</p><pre>src/utils/i18n/index.ts</pre><p>Add your translation JSON files there.</p><p>Then import it once in your app:</p><pre>import &#39;./utils/i18n&#39;;</pre><p>Finally, integrate it inside your components (e.g. App.tsx).</p><h3>Why this Stack?</h3><p>This combination is surprisingly powerful:</p><ul><li><strong>Vite:</strong> Instant dev server, fast builds.</li><li><strong>Tailwind:</strong> No context switching for styling.</li><li><strong>TanStack Router:</strong> Type-safe, modern routing.</li><li><strong>i18next:</strong> Scalable internationalization.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cba0f6822e83" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fixing Common Initial Errors in a Nest.js Project]]></title>
            <link>https://medium.com/@heghine.dev357/fixing-common-initial-errors-in-a-nest-js-project-d9683c31e04c?source=rss-b988a40df30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9683c31e04c</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[eslint]]></category>
            <category><![CDATA[nestjs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Heghine Dev]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 14:42:57 GMT</pubDate>
            <atom:updated>2026-03-15T14:42:57.957Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*vVamjziQXZCvEnzpW5M6bw.png" /><figcaption>tsconfig.json</figcaption></figure><h3>Repository</h3><p>The full example project demonstrating these fixes is available here:</p><p><a href="https://github.com/ZeroaNinea/Fixing-Initial-Errors-Nest.js">GitHub - ZeroaNinea/Fixing-Initial-Errors-Nest.js: This repository shows how to create a Nest.js project properly.</a></p><p>When creating a new Nest.js project, everything compiles and runs, but some configuration files contain outdated or suboptimal settings.</p><p>While setting up a project, I noticed several small issues related to TypeScript, ESLint, and test configuration. This article explains how to fix them so the project start with a clean and future-proof configuration.</p><h3>Fixing tsconfig.json</h3><h4><strong>Replace </strong><strong>baseUrl with </strong><strong>rootDir</strong></h4><p>The baseUrl property is deprecated and scheduled to be removed in TypeScript 7.0. Instead, it is better to explicitly define the project root directory.</p><p>Replace:</p><pre>{<br>  &quot;compilerOptions&quot;: {<br>    &quot;baseUrl&quot;: &quot;./&quot;<br>  }<br>}</pre><p>With:</p><pre>{<br>  &quot;compilerOptions&quot;: {<br>    &quot;rootDir&quot;: &quot;./src&quot;<br>  }<br>}</pre><p>This ensures TypeScript clearly understands where the source files are located.</p><h4>Add Jest Types</h4><p>If you use Jest for testing, Visual Studio Code may not recognize Jest globals like describe or it.</p><p>You can fix this by adding the types field:</p><pre>{<br>  &quot;compilerOptions&quot;: {<br>    &quot;types&quot;: [&quot;node&quot;, &quot;jest&quot;]<br>  }<br>}</pre><p>This allows the editor and TypeScript to properly recognize test files.</p><h3>Fixing eslint.config.mjs</h3><p>The configuration helper tseslint.config is deprecated.</p><p>Instead, use defineConfig from ESLint.</p><p>Replace:</p><pre>tseslint.config(...)</pre><p>With:</p><pre>import { defineConfig } from &quot;eslint/config&quot;;<br><br>export default defineConfig(...);</pre><p>This aligns the configuration with the current ESLint API.</p><h3>Improving main.ts</h3><p>In the default project template, the bootstrap function is called synchronously:</p><pre>bootstrap();</pre><p>However, since bootstrap is asynchronous, it is safer to handle it with then and catch.</p><pre>bootstrap()<br>  .then(() =&gt;<br>    console.log(`🚀 Server started on port ${process.env.PORT ?? 3000}`),<br>  )<br>  .catch((err) =&gt; console.error(err));</pre><p>This ensures startup errors are properly logged.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9683c31e04c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing Secure JWT Key Rotation in NestJS (RS256, Multi-Key Strategy)]]></title>
            <link>https://medium.com/@heghine.dev357/implementing-secure-jwt-key-rotation-in-nestjs-rs256-multi-key-strategy-3d40fc44817f?source=rss-b988a40df30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d40fc44817f</guid>
            <category><![CDATA[nestjs]]></category>
            <category><![CDATA[rs256]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[key-rotation]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Heghine Dev]]></dc:creator>
            <pubDate>Thu, 05 Mar 2026 13:26:53 GMT</pubDate>
            <atom:updated>2026-03-05T13:26:53.438Z</atom:updated>
            <content:encoded><![CDATA[<p>JWT authentication is widely used in modern backend applications because it is stateless, scalable, and simple to implement. However, many implementations rely on a single long-lived secret or private key for signing tokens.</p><p>This creates several risks:</p><ul><li>If the signing key is compromised, all issued tokens become vulnerable.</li><li>There is no controlled expiration of cryptographic trust beyond the JWT exp claim.</li><li>Rotating keys often requires manually invalidating all active sessions.</li><li>Many systems never rotate keys at all.</li></ul><p>In symmetric (HS256) setups, the same secret is used for both signing and verification. In asymmetric (RS256) setups, the private keys signs tokens and the public key verifies them. While asymmetric cryptography improves separation of concerns, it does not automatically solve the key lifecycle problem.</p><p>The real issue is not just token expiration.</p><p>The real issue is <strong>cryptographic trust duration</strong>.</p><p>How long should a key remain trusted?</p><p>How do we rotate keys without breaking active sessions?</p><p>How do we limit long-term exposure while maintaining background compatibility?</p><p>A production-grade authentication system must answer these questions.</p><h3>Design Goals</h3><p>The objective was to build a JWT authentication system in Nest.js that:</p><ol><li>Uses asymmetric cryptography (RS256).</li><li>Rotates signing keys automatically.</li><li>Preserves verification for recently issued tokens.</li><li>Enforces a controlled cryptographic validity window.</li><li>Cleans up old keys deterministically.</li></ol><p>Instead of relying solely on JWT expiration (exp), the system introduces an additional layer of lifecycle control at the key level.</p><p>The design follows a few core principles:</p><h4>Deterministic Rotation</h4><p>Keys rotate per day using a time-based strategy. Each keys is identified by an ISO date string (e.g., 2026-02-24), which allows natural chronological storing.</p><h4>Backward Compatibility</h4><p>Previously issued tokens remain valid as long as their corresponding public keys are retained.</p><h4>Controlled Retention</h4><p>Only the three most recent keys are kept. This creates an implicit ~3-day cryptographic validity window, independent of JWT expiration.</p><h4>Automatic Cleanup</h4><p>Older keys are automatically removed from both the filesystem and the key registry, preventing indefinite trust accumulation.</p><p>The result is a system that balances:</p><ul><li>security,</li><li>simplicity,</li><li>operational predictability.</li></ul><h3>Architecture Overview</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mQYVVmGg8C-gfInl1Hvwhg.png" /><figcaption>JWT diagram</figcaption></figure><p>At a high level, the system separates three concerns:</p><ol><li>Signing tokens;</li><li>Verifying tokens;</li><li>Managing key lifecycle.</li></ol><p>Instead of relying on a single long-lived key, the system introduces a multy-key driven by deterministic identifiers (kid).</p><p>The authentication flow looks like this.</p><pre>Token -&gt; kid -&gt; Public Key Lookup -&gt; Signature Verification</pre><p>Let’s break down how this works.</p><h4>Key Storage Strategy</h4><p>All RSA key pairs are stored in a dedicated directory:</p><pre>dist/keys</pre><p>Each key pair contains of:</p><ul><li>&lt;kid&gt;.private.pem</li><li>&lt;kid&gt;.public.pem</li></ul><p>The kid (Key ID) is not random. It is derived from the current date:</p><pre>const newKid = now.toISOString().split(&#39;T&#39;)[0];</pre><p>Example:</p><pre>2026-02-23<br>2026-02-24</pre><p>This design choice is intentional.</p><p>ISO date strings sort lexicographically in chronological order. That means the newest key can always be determined simply by sorting the list of available kids.</p><p>No timestamps in databases, no additional metadata, no complex versioning system.</p><p>Just deterministic ordering.</p><h4>Signing with the Latest Key</h4><p>When a user logs in, the authentication service:</p><ol><li>Loads all available kids from key-map.json;</li><li>Sorts them;</li><li>Selects the newest one;</li><li>Loads the corresponding private key;</li><li>Signs the JWT using RS256.</li></ol><p>As a result, every newly issued token is always signed with the most recent private key.</p><p>The JWT header includes:</p><pre>{<br>  &quot;alg&quot;: &quot;RS256&quot;,<br>  &quot;kid&quot;: &quot;2026-02-24&quot;<br>}</pre><p>That kid becomes the bridge between the token and its signing key.</p><h4>Dynamic Verification Using kid</h4><p>When a protected route is accessed, the verification strategy:</p><ol><li>Extracts the kid from the JWT header;</li><li>Loads the corresponding public key file;</li><li>Verifies the signature.</li></ol><p>This enables multi-key verification.</p><p>If the public key still exists, the token is valid — even if it was signed with a previous key.</p><p>This is the critical property that makes seamless rotation possible.</p><p>Without kid, the system would not know which key to use for verification.</p><p>With kid, verification becomes deterministic and scalable.</p><h4>Key Lifecycle as a First-Class Concern</h4><p>The architecture treats key management as its own subsystem, not an afterthought.</p><p>A dedicated rotation service:</p><ul><li>Generates new RSA key pairs daily;</li><li>Registers new kids;</li><li>Retains only the three newest keys;</li><li>Automatically removes older keys.</li></ul><p>This transforms JWT from a simple stateless token system into a controlled cryptographic lifecycle model.</p><p>Token validity is no longer defined only by exp. It is also defined by whether its signing keys is still trusted.</p><p>This architecture keeps the system…</p><ul><li>deterministic,</li><li>predictable,</li><li>cryptographically controlled,</li><li>operationally simple.</li></ul><p>And most importantly — it makes key rotation a built-in behavior, not a manual emergency procedure.</p><h3>Key Rotation Logic</h3><p>The core of the system is deterministic, time-based key rotation mechanism. You can see the entire code of the key-rotation.service.ts file in the GitHub example:</p><ul><li>key-rotation.service.ts: <a href="https://github.com/ZeroaNinea/JWT-Nest.js-Key-Rotation-Example/blob/main/src/auth/key-rotation.service.ts">https://github.com/ZeroaNinea/JWT-Nest.js-Key-Rotation-Example/blob/main/src/auth/key-rotation.service.ts</a></li></ul><p>Instead of relying on environment variables or manual replacement of secrets, the application generates a new RSA key pair every 24 hours — but only when needed.</p><p>Let’s break down the logic.</p><h4>Time Based Rotation Decision</h4><p>Each key is identified with an ISO date string:</p><pre>2026-03-03</pre><p>This value becomes the kid (Key ID).</p><p>Because ISO dates sort lexicologically, we can determine the latest key simply by sorting the keys alphabetically.</p><p>The service:</p><ul><li>Reads the existing key-map.json;</li><li>Extracts all existing kids;</li><li>Sorts them;</li><li>Compares the latest date to the current date;</li><li>Rotates only if 24 hours have passed.</li></ul><pre>const existingKids = Object.keys(keyMap).sort();<br>const latestKid = existingKids.at(-1);<br><br>const rotationPeriodMs = 24 * 60 * 60 * 1000;<br><br>if (latestKid) {<br>  const lastDate = new Date(latestKid);<br>  const nextRotationDate = new Date(lastDate.getTime() + rotationPeriodMs);<br>  shouldRotate = new Date() &gt;= nextRotationDate;<br>}</pre><p>This avoids unnecessary regeneration and keeps rotation deterministic.</p><p>No cron state, no database flags, no race-prone counters.</p><p>The date itself becomes the source of truth.</p><h4>RSA Key Generation</h4><p>If rotation is required, the service generates a fresh 2048-bit RSA key pair using Node’s built-in crypto module.</p><pre>const { publicKey, privateKey } = crypto.generateKeyPairSync(&#39;rsa&#39;, {<br>  modulusLength: 2048,<br>  publicKeyEncoding: { type: &#39;spki&#39;, format: &#39;pem&#39; },<br>  privateKeyEncoding: { type: &#39;pkcs8&#39;, format: &#39;pem&#39; },<br>});</pre><p>The keys are stored as:</p><pre>YYYY-MM-DD.private.pem<br>YYYY-MM-DD.public.pem</pre><p>The public key is also added to key-map.json, which acts as a lightweight JWKS substitute for verification.</p><h4>Controlled Key Rotation (3-Key Window)</h4><p>The system intentionally retains only the <strong>three most recent keys</strong>.</p><pre>while (sorted.length &gt; 3) {<br>  const toDelete = sorted.shift();<br>  delete keyMap[toDelete];<br>  fs.unlinkSync(`${toDelete}.private.pem`);<br>  fs.unlinkSync(`${toDelete}.public.pem`);<br>}</pre><p>This creates a rolling 3-day cryptographic validity window.</p><p>Even if a JWT has not yet expired (exp claim still valid), it becomes unverifiable once its signing key is removed.</p><p>This design achieves:</p><ul><li>Automatic cryptographic expiration;</li><li>Reduced blast radius if a key leaks;</li><li>Predictable retention window;</li><li>Zero manual cleanup.</li></ul><h4>Why This Approach is Interesting?</h4><p>Most applications don’t generate keys automatically, they hardcode the secret, rotate it manually, but not often, or don’t even use rotation entirely.</p><p>Unlike them, this design instead makes rotation, automatic, deterministic, time-bound, self-cleaning.</p><p>And because kid is embedded in every JWT header, verification simply becomes:</p><ol><li>Extract kid;</li><li>Lookup public key;</li><li>Verify signature.</li></ol><p>No guessing. No fallback keys. No ambiguity.</p><h3>Token Validity Window</h3><p>Most JWT systems rely entirely on the exp claim to control token lifetime.</p><p>If a token says it it expires in 7 days, then it remains valid for 7 days.</p><p>Simple.</p><p>But this design introduces a second layer of expiration — one that operates at the cryptographic level.</p><p>There are now two independent expiration mechanisms:</p><ol><li>Application-level expiration (exp)</li><li>And cryptographic validity (key retention window).</li></ol><p>These two are not the same.</p><h4>Layer 1: Application-Level Expiration</h4><p>The exp claim defines how long the application is willing to trust a token.</p><p>Example:</p><pre>exp = now + 7 days</pre><p>After that timestamp, the token is rejected even if its signature is valid.</p><p>This is the standard JWT behavior.</p><h4>Layer 2: Cryptographic Validity</h4><p>In this system, only the three newest signing keys are retained.</p><p>Because rotation happens daily, that creates an implicit ~3-day cryptographic validity window.</p><p>That means:</p><ul><li><strong>A token signed today:</strong> valid;</li><li><strong>A token signed yesterday:</strong> valid;</li><li><strong>A token signed 2 days ago:</strong> valid;</li><li><strong>A token signed 4 days ago:</strong> unverifiable.</li></ul><p>Even if…</p><pre>exp = now + 7 days</pre><p>…the token may fail verification after 3 days — simply because its signing keys has been deleted.</p><h4>Why This Matters?</h4><p>This creates a hard upper bound on trust.</p><p>Maximum cryptographic lifetime:</p><pre>min(exp duration, key retention window)</pre><p>If a key is compromised, the exposure window is automatically limited.</p><ul><li>You do not need to automatically revoke tokens.</li><li>You do not need to rotate secrets in panic mode.</li></ul><p>The system continuously reduces its own attack surface.</p><p>This is fundamentally different from static-secret JWT systems, where trust duration is entirely tied to exp.</p><p>Here, trust is constrained at two levels:</p><ul><li>Logical (claims-based);</li><li>Cryptographic (key existence).</li></ul><p>That layered approach significantly reduces long-term risk while preserving background compatibility for recent tokens.</p><h4>Security Trade-Off</h4><p>This approach introduces a design choice:</p><ul><li><strong>Shorter retention window:</strong> smaller risk exposure;</li><li><strong>Longer retention window:</strong> better session stability.</li></ul><p>By keeping three keys, the system balances:</p><ul><li>Operational smoothness;</li><li>Predictable expiration;</li><li>Reduced compromise impact.</li></ul><p>And because retention is deterministic, the behavior remains transparent and easy to reason about.</p><h3>Production Considerations</h3><p>The implementation shown so far is intentionally simple.</p><p>But real systems are rarely single-process applications running on a developer laptop.</p><p>Let’s examine what changes in production.</p><h4>⚠️ Local Filesystem Warning</h4><p>In this example, keys are stored inside:</p><pre>dist/keys</pre><p>That works only for local development, Demons, single-instance deployments. However, in many modern environments:</p><ul><li>Containers are ephemeral;</li><li>Filesystems are wiped on redeploy;</li><li>Horizontal auto-scaling replaces instances dynamically.</li></ul><p>If a container restarts, all stored keys may disappear.</p><p>That would immediately invalidate all previously issued tokens.</p><p>For anything beyond experimentation, local filesystem storage is not sufficient.</p><h4>The Horizontal Scaling Problem</h4><p>Consider running multiple application instances behind a load balancer.</p><p>If each instance:</p><ul><li>Generates its own RSA keys;</li><li>Rotates independently;</li><li>Maintains its own retention window.</li></ul><p>Then the key sets will diverge.</p><p>A token signed by instance A may not be verifiable by instance B.</p><p>This breaks stateless authentication.</p><p>To solve this, you need one of the following:</p><ul><li>Shared storage (S3-compatible storage, NFS, object storage, etc.);</li><li>A centralized key management service;</li><li>A dedicated authentication server responsible for signing.</li></ul><p>The important principle is:</p><blockquote>Key material must be globally consistent across all instances.</blockquote><p>Rotation logic can remain deterministic — but the storage must be shared.</p><h4>KMS Upgrate Path</h4><p>In more mature systems, signing keys are not generated or stored directly by the application.</p><p>Instead, you can integrate with a cloud key management solution such as:</p><ul><li><a href="https://docs.aws.amazon.com/kms/latest/developerguide/overview.html">AWS KMS</a></li><li><a href="https://docs.cloud.google.com/kms/docs">Google Cloud KMS</a></li></ul><p>These services provide:</p><ul><li>Hardware-backend key protection (HSM);</li><li>Controlled access policies;</li><li>Audit logging;</li><li>Automatic rotation capabilities.</li></ul><p>In this model:</p><ul><li>The private key never leaves the KMS;</li><li>The application requests signing operations;</li><li>Public keys are exposed via a JWK endpoint.</li></ul><p>This elevates the system from “secure by design” to “secure by infrastructure.”</p><p>You don’t need this for small projects.</p><p>But it’s important to design with an upgrade path in mind.</p><h4>The Real Lesson</h4><p>Security architecture evolves in layers.</p><p>What works for a single Node.js instance does not automatically work for:</p><ul><li>Kubernetes clusters;</li><li>Multi-region deployments;</li><li>High-availability systems.</li></ul><p>The goal of this design is not to be production-perfect on day one. It’s to be:</p><ul><li>Deterministic;</li><li>Understandable;</li><li>Extensible.</li></ul><p>And most importantly — ready to evolve.</p><h3>Lessons Learned</h3><p>Building this system changed how I think about JWT authentication.</p><p>It’s easy to treat tokens as simple signed JSON objects with an expiration timestamp. But once you introduce key rotation, authentication becomes a lifecycle problem — not just a configuration choice.</p><p>Here are the architectural insights that stood out.</p><h4>Deterministic IDs Reduce State Complexity</h4><p>Using ISO date strings as kid values removed the need for:</p><ul><li>Version counters;</li><li>Extra metadata;</li><li>Database tracking.</li></ul><p>Sorting keys alphabetically becomes sorting them chronologically.</p><p>That small decision simplified the entire rotation model.</p><p>When identifiers encode meaning, systems become easier to reason about.</p><h4>Time-Based Rotation Simplifies the Mental Model</h4><p>Instead of event-driven rotation, manual rotation, or conditional triggers, the system follows a single rule:</p><p>Rotate once per day.</p><p>This predictability eliminates ambiguity.</p><p>There is no guessing when a key was created. There is no hidden state. The date is the state.</p><p>Security mechanisms should be easy to explain — not mysterious.</p><h4>Security Must Be Self-Cleaning</h4><p>One of the biggest risks in real systems is accumulation:</p><ul><li>Old secrets that never get deleted;</li><li>Deprecated keys that remain trusted;</li><li>Expanding attack surfaces over time.</li></ul><p>By enforcing a strict 3-key retention policy, the system automatically limits its own trust window.</p><p>Nothing lingers indefinitely.</p><p>Security that depends on manual cleanup eventually fails. Security that cleans itself is sustainable.</p><h4>Operational Simplicity Is a Feature</h4><p>There is no database. No background scheduler. No distributed lock. No complex orchestration.</p><p>Just deterministic logic and bounded retention.</p><p>That simplicity is intentional.</p><p>Because complexity is not neutral — it increases both operational cost and failure probability.</p><p>A secure system that is understandable is more valuable than a theoretically perfect system that nobody can maintain.</p><h3>Source</h3><ul><li>JWT-Nest.js-Key-Rotation-Example: <a href="https://github.com/ZeroaNinea/JWT-Nest.js-Key-Rotation-Example">https://github.com/ZeroaNinea/JWT-Nest.js-Key-Rotation-Example</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d40fc44817f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When NOT to Use Kubernetes]]></title>
            <link>https://medium.com/@heghine.dev357/when-not-to-use-kubernetes-64fa575c2db8?source=rss-b988a40df30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/64fa575c2db8</guid>
            <category><![CDATA[development-experience]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Heghine Dev]]></dc:creator>
            <pubDate>Fri, 27 Feb 2026 20:00:54 GMT</pubDate>
            <atom:updated>2026-02-27T20:00:54.613Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jcc_xxxzpRW4nUpv3lOtMw.png" /><figcaption>Kubernetes Dashboard</figcaption></figure><p>Kubernetes (K8s) is a container orchestration platform designed to automate deployment, scaling, and management of distributed systems.</p><p>It is powerful — but power introduces complexity. The best architecture is not most complex one. It is one that matches the current constraints of your system.</p><p>In this article, I’ll analyze when Kubernetes is the right architectural choice, and more importantly, when it is unnecessary overhead.</p><h3>When You Have One Small Service</h3><p>If your system consists of on backend service, one database, low or predictable traffic a small team (1–3 developers), Kubernetes is often unnecessary complexity.</p><p>Instead of solving real scaling or reliability constraints, it introduces:</p><ul><li>Operational overhead;</li><li>YAML configuration sprawl;</li><li>Debugging friction across pods and networking layers;</li><li>Dev/prod parity challenges;</li><li>Additional cognitive load for the team;</li></ul><p>A simple architecture such as Docker Compose, a single virtual machine, a managed PaaS is often more sufficient. Architecture should match scale.</p><p>Over-engineering early creates fragility, not resilience.</p><h3>When You Don’t have DevOps Maturity</h3><p>Kubernetes is not just a tool — it is an operational platform.</p><p>If your team lacks the necessary DevOps capability, adopting Kubernetes will increase chaos rather than reduce it.</p><p>K8s assumes the existence of:</p><ul><li>Monitoring;</li><li>Logging;</li><li>CI/CD discipline;</li><li>Infrastructure knowledge;</li><li>Incident response processes.</li></ul><p>Without these foundations, you don’t gain resilience. You gain distributed confusion. Kubernetes does not fix weak engineering culture.</p><p>It amplifies it.</p><h3>When You Don’t have Scaling Problems</h3><p>Premature microservices are often architecture cosplay.</p><p>Many SaaS products never reach massive traffic volumes, don’t require independent scaling of dozens of services, don’t benefit from service mesh complexity, don’t need distributed tracing across 20 network boundaries.</p><p>In these cases, Kubernetes solves a problem that doesn’t exist.</p><p>A well-structured monolith — especially a <strong>modular monolith </strong>— can scale surprisingly far while maintaining:</p><ul><li>Simpler debugging;</li><li>Lower operational overhead;</li><li>Faster development velocity;</li><li>Clearer ownership boundaries.</li></ul><p>Distributed systems introduce network latency, partial failure modes, and coordination complexity.</p><p>If you don’t have scaling pressure, you are voluntarily importing those problems.</p><p>Scale should justify distribution — not ego.</p><h3>When Time-to-Market Matters More than Scalability</h3><p>Early-stage startups rarely fail due to insufficient horizontal scaling.</p><p>They fail because there is no product-market fit, the value proposition unclear, the interaction cycle is too slow.</p><p>In the early phase, speed is a competitive advantage.</p><p>Every additional infrastructure layer increases:</p><ul><li>Deployment time;</li><li>Debugging surface area;</li><li>Operational burden;</li><li>Cognitive load.</li></ul><p>K8s optimizes for resilience at scale. Startups, however, optimize for learning velocity. Shipping fast and validating assumptions beats theoretical scalability that may never be needed.</p><p>You can always introduce complexity later, and you cannot recover lost time.</p><h3>When Cloud Providers Already Solve Your Problem</h3><p>Modern cloud platforms already abstract most scaling concerns. Managed services such as serverless runtimes, Platform-as-a-Service (PaaS) environments, managed container platforms. They provide:</p><ul><li>Automatic scaling;</li><li>Health management;</li><li>Load balancing;</li><li>Rolling deployments;</li><li>Infrastructure maintenance.</li></ul><p>All without requiring you to manage cluster nodes, networking layers, or control planes.</p><p>If your application fits comfortably within these abstractions, Kubernetes may simply be redundant infrastructure.</p><p>Operating a cluster introduces responsibility. If a managed platform already solves your operational requirements, adding K8s often increases complexity without increasing value.</p><p>Why manage nodes if you don’t need to?</p><h3>When Kubernetes Does Make Sense</h3><p>K8s becomes a strong choice when:</p><ul><li>You operate multiple independent services that require separate scaling;</li><li>You manage high or unpredictable traffic;</li><li>You need portability across cloud providers;</li><li>You have a mature DevOps culture;</li><li>You require advanced deployment strategies (blue/green, canary, progressive rollouts);</li><li>Infrastructure automation is already part of your engineering discipline.</li></ul><p>In these environments, Kubernetes provides declarative infrastructure, self-healing workloads; horizontal scalability; operational consistency across environments.</p><p>The key question is not whether Kubernetes is powerful. It is whether your system has earned that power.</p><p>The best architecture is not the most sophisticated one. It is the one that matches the real constraints of your product and team.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64fa575c2db8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I would architect a Production-Ready Web Application in 2026]]></title>
            <link>https://medium.com/@heghine.dev357/how-i-would-architect-a-production-ready-web-application-in-2026-762533fe98d4?source=rss-b988a40df30b------2</link>
            <guid isPermaLink="false">https://medium.com/p/762533fe98d4</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-app-development]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[framework]]></category>
            <dc:creator><![CDATA[Heghine Dev]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 18:35:47 GMT</pubDate>
            <atom:updated>2026-02-19T18:35:47.683Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="js-frameworks" src="https://cdn-images-1.medium.com/max/1024/1*sH_-oRX6yM8vq8rzMiVAZg.png" /><figcaption>JavaScript Frameworks</figcaption></figure><p>Choosing the right technology stack is one of the most important decisions when building a web application.</p><p>A booking system, internal dashboard, SaaS platform or content-driven website may all look similar from the outside — but require completely different architecture to stay reliable, scalable and cost-effective in production.</p><p>In this article, I’ll walk through how I would approach the architecture of a modern web application today depending on its goals, scale and type.</p><p>I work with Angular, React, Vue, Next.js, Node.js and Nest.js to build full-stack applications, internal tools and real-time systems — and the choice between these tools depends heavily on what the application is expected to do.</p><h3>Internal Dashboard &amp; Administrative Tools</h3><p>Internal dashboards and administrative tools are fundamentally different form public-facing websites.</p><p>They typically include:</p><ul><li>role-based access (admins, managers staff),</li><li>complex forms and editable tables,</li><li>reporting interfaces,</li><li>structured workflows,</li><li>and long-term maintainability requirements.</li></ul><p>Unlike marketing websites or landing pages, internal tools are expected to evolve over time as business processes change. This means the frontend architecture must remain predictable even as the application grows.</p><p>For these types of systems, I typically choose Angular and Nest.js.</p><h4>Frontend</h4><p>Angular provides a strongly structured development environment that helps prevent architectural drift in long-lived applications. This becomes especially important when dashboards:</p><ul><li>manage permissions,</li><li>aggregate data from multiple sources,</li><li>or include role-specific UI logic.</li></ul><p>Its built-in dependency injection system and reactive programming model (RxJS) make it easier to work with:</p><ul><li>real-time updates,</li><li>filtered data views,</li><li>interactive reports,</li><li>and user-specific interfaces.</li></ul><p>Additionally, Angular’s support for route guards and modular application structure simplifies implementation of role-based UI access without requiring external libraries.</p><p>This makes it well-structured for internal dashboards where stability and maintainability are more important than rapid UI experimentation.</p><h4>Backend</h4><p>Internal dashboards usually manage structured operational data such as:</p><ul><li>employee records,</li><li>financial reports,</li><li>customer interactions,</li><li>inventory tracking,</li><li>or workflow states.</li></ul><p>These systems often require:</p><ul><li>role-based access control,</li><li>auditability of changes,</li><li>controlled data editing,</li><li>and predictable permission logic across different user types.</li></ul><p>Unlike public websites, internal tools must enforce strict interaction rules between users and data.</p><p>For this reason, I typically choose Nest.js for backend architecture.</p><p>Nest.js encourages a modular server structure that allows business logic (such as permissions, workflows or reporting rules) to remain isolated from transport like HTTP or WebSockets.</p><p>In practice, this makes it easier to:</p><ul><li>add new roles,</li><li>extend reporting capabilities,</li><li>or integrate additional departments into system</li></ul><p>without rewriting existing functionality.</p><p>This becomes especially valuable when dashboards grow from simple data panels into fully interactive operational platforms over time.</p><p>Nest.js also integrates naturally with relational databases such as PostgreSQL, which are commonly used for structured internal data like:</p><ul><li>financial statements,</li><li>hierarchical company roles,</li><li>or inventory systems.</li></ul><p>This makes it a practical choice for long-term internal tools that are expected to evolve alongside for business using them.</p><blockquote>Typical Stack: Angular + Nest.js + PostgreSQL.</blockquote><h3>Public-Facing Web Applications</h3><p>Public-facing platforms such as:</p><ul><li>SaaS interfaces,</li><li>marketing-driven applications,</li><li>customer portals,</li><li>or interactive service websites.</li></ul><p>must balance performance, flexibility and rapid interaction.</p><p>Unlike internal tools, these systems are directly exposed to users and often evolve based on feedback, usage patterns, or changing product direction.</p><p>This typically means:</p><ul><li>UI structure may change frequently,</li><li>new interactive features are introduced over time,</li><li>and performance expectations remain high across different devices.</li></ul><p>For these types of applications, I usually prefer React-based frontend paired with a backend built using Node.js or Nest.js.</p><p>React’s flexible architecture allows product teams to experiment with new layers or user interactions without restructuring the entire application — which is especially important in early-stage or growth-focused platforms.</p><p>On the backend side, Node.js or Nest.js provides the ability to:</p><ul><li>integrate authentication,</li><li>manage user-generated data,</li><li>support transactional workflows,</li><li>and expose structured APIs to other services if needed.</li></ul><p>This combination works particularly well for platforms that:</p><ul><li>are expected to grow,</li><li>require continuous feature updates,</li><li>or support a dynamic user interface that changes over time.</li></ul><blockquote>Typical Stack: React + Node.js/Nest.js + PostgreSQL/MongoDB.</blockquote><h3>SEO-Heavy Platforms (Blogs, Marketplaces)</h3><p>Content-driven platforms such as:</p><ul><li>blogs,</li><li>documentation portals,</li><li>directories,</li><li>or online marketplaces</li></ul><p>often rely heavily on search engine visibility for user acquisition.</p><p>In these cases, how content is delivered becomes just as important as the content itself.</p><p>Traditional client-rendered applications may delay meaningful content from being indexed by search engines — especially when large portions of the page are generated dynamically in the browser.</p><p>For this reason, I typically recommended Next.js when building SEO-focused platforms.</p><p>Next.js allows content to be:</p><ul><li>rendered on the server,</li><li>statically generated at build time,</li><li>or updated incrementally without requiring a full redeployment.</li></ul><p>This makes it easier to maintain fast page load times, improve search engine discoverability, and scale content libraries without affecting overall performance.</p><p>It is especially useful for platforms that publish articles or listings regularly, depend on organic traffic, or must present structured content (such as product pages or documentation) in a predictable format.</p><p>Next.js also integrates well with headless CMS solutions, allowing non-technical teams to manage content independently from the application logic.</p><blockquote>Typical Stack: Next.js + Headless CMS + PostgreSQL or External APIs.</blockquote><h3>Hybrid MVPs</h3><p>Early-stage products often need to validate an idea before investing in a fully separated frontend and backend architecture.</p><p>In these situations, development speed and simplicity usually matter more than long-term infrastructure planning.</p><p>A hybrid architecture built with Next.js allows both:</p><ul><li>frontend UI,</li><li>and backend logic (API routes, authentication, basic data processing)</li></ul><p>to exist within the same project.</p><p>This makes it possible to reduce setup time, deploy faster, and iterate on features without maintaining multiple services from the start.</p><p>It is particularly useful for:</p><ul><li>startup MVPs,</li><li>internal prototypes,</li><li>early SaaS platforms,</li><li>or pilot tools used to test workflows before committing to a larger system.</li></ul><p>As product requirements grow, individual parts of the backend can later be extracted into dedicated services (for example, using Nest.js) without rewriting the entire application.</p><blockquote>Typical Stack: Next.js (Full-Stack) + PostgreSQL/MongoDB</blockquote><h3>Real-Time Collaborative Applications</h3><p>Applications that support:</p><ul><li>live messaging,</li><li>collaborative editing,</li><li>notifications,</li><li>shared dashboards,</li><li>or continuously updating data</li></ul><p>require a fundamentally different architecture from traditional request-response systems.</p><p>In these cases, the backend must maintain persistent communication channels with connected users — rather than responding only to individual HTTP requests.</p><p>This is typically implemented using WebSockets through a backend framework such as Nest.js, which allows event-driven updates, role-based access control, and scalable room-based communication logic.</p><p>On the frontend side, either Angular or React can be used to synchronize UI state with live backend updates, manage user interactions across shared environments, and ensure that multiple users can interact with the same system simultaneously without conflicts.</p><p>This type of architecture is commonly required for:</p><ul><li>chat platforms,</li><li>team collaboration tools,</li><li>operational dashboards with live metrics,</li><li>or platforms where users interact within shared spaces.</li></ul><blockquote>Typical Stack: Angular/React + Nest.js + WebSockets + PostgreSQL/MongoDB + Redis.</blockquote><h3>Afterword</h3><p>Choosing the right architecture early on can significantly reduce development costs, improve long-term maintainability, and prevent unnecessary refactoring as your product grows.</p><p>If you’re planning to build a web application and aren’t sure which technical approach would best fit your use case, feel free to reach out — I’m always happy to help clarify architectural decisions before development begins.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=762533fe98d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>