<?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 Mihai-Razvan Tudorache on Medium]]></title>
        <description><![CDATA[Stories by Mihai-Razvan Tudorache on Medium]]></description>
        <link>https://medium.com/@mihairazvantudorache?source=rss-44906c067a65------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*k3mTXfTAMmH44-Ale5AWkQ.jpeg</url>
            <title>Stories by Mihai-Razvan Tudorache on Medium</title>
            <link>https://medium.com/@mihairazvantudorache?source=rss-44906c067a65------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 17:23:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mihairazvantudorache/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[RAPT Pill Fermentation Monitoring System on Raspberry Pi]]></title>
            <link>https://medium.com/@mihairazvantudorache/rapt-pill-fermentation-monitoring-system-on-raspberry-pi-9601a4adcd88?source=rss-44906c067a65------2</link>
            <guid isPermaLink="false">https://medium.com/p/9601a4adcd88</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[flask]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[home-brewing]]></category>
            <dc:creator><![CDATA[Mihai-Razvan Tudorache]]></dc:creator>
            <pubDate>Sat, 04 Apr 2026 12:36:55 GMT</pubDate>
            <atom:updated>2026-04-04T12:50:24.592Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eOmdEwI7pNhrRnZCTqbnlg.jpeg" /><figcaption>RAPT Pill + Raspberry Pi setup</figcaption></figure><p>Fermentation is one of those processes that looks simple… until it isn’t.</p><p>Most of the time, everything works fine. Gravity drops, temperature stays stable, and you end up with good beer. But when something goes wrong, it usually doesn’t happen suddenly. It drifts.</p><p>Slowly.</p><p>Most tools give you charts — gravity curves, temperature graphs, timelines. But they don’t really help you understand what’s happening.</p><p>So I built something for myself.</p><p>This project came naturally from combining a few things I enjoy:<br> <strong>software engineering, system design, and brewing</strong>.</p><p>The goal wasn’t to build a complex platform.</p><p>It was to create a <strong>small, local system that can interpret fermentation data and make it useful</strong>.</p><h3>The idea</h3><p>I’m using a RAPT Pill to measure:</p><ul><li><a href="https://en.wikipedia.org/wiki/Relative_density">specific gravity</a></li><li>temperature</li></ul><p>The data is available through its API.</p><p>Initially, my plan was simply to fetch the data and display it locally. But that approach felt limited, especially since their dashboard already offers something similar.</p><p>A single gravity reading doesn’t mean much on its own. What matters is:</p><ul><li>how fast it’s changing</li><li>how consistent that change is</li><li>whether it follows a normal fermentation pattern</li></ul><p>So the system evolved into something more interesting: not just collecting data, but <strong>analyzing fermentation behavior.</strong></p><h3>How the RAPT Pill works</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zd_uneWWAIadgbiJWowB9A.jpeg" /><figcaption>RAPT Pill in casing</figcaption></figure><p>The <a href="https://kegland.eu/products/yellow-rapt-pill-hydrometer-thermometer-wifi-bluetooth?srsltid=AfmBOoov6xoswSHNyybBmZydGBHGdJXI9vZribLiGF1dBQm2CvWGK2J5">RAPT Pill</a> is a floating <a href="https://en.wikipedia.org/wiki/Hydrometer">hydrometer</a> that estimates gravity based on tilt and temperature.</p><p>In practice, using it involves:</p><ul><li>calibrating it before fermentation</li><li>sealing it in its casing</li><li>placing it directly in the fermenter (after sanitizing it with Star San, of course)</li></ul><p>Once active, it continuously measures data and sends it over WiFi.</p><p>What you get is a <strong>time-series of fermentation readings</strong>, which becomes more valuable as fermentation progresses.</p><h3>System overview</h3><p>Everything runs on a Raspberry Pi located in my brewery.</p><p>The architecture is intentionally simple and local:</p><ul><li><strong>RAPT API</strong> → external data source</li><li><strong>Flask API (Raspberry Pi)</strong> → ingestion + processing</li><li><strong>SQLite database</strong> → local storage</li><li><strong>Angular frontend</strong> → visualization</li></ul><p>The Raspberry Pi acts as a self-contained system: it collects data, stores it, processes it, and exposes it to the UI.</p><h3>System architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*4unHv9ElknR88JYf26s4Lg.png" /><figcaption>System architecture diagram</figcaption></figure><h3>Data flow</h3><p>The system uses a polling-based approach.</p><p>Every <strong>1 hour</strong>:</p><ol><li>The Flask backend sends an HTTP request to the RAPT API</li><li>The latest fermentation readings are retrieved</li><li>Data is persisted in SQLite</li><li>A processing step computes derived metrics</li><li>The Angular frontend fetches and displays the results</li></ol><p>This interval is enough to capture meaningful changes without adding unnecessary complexity.</p><p>Fermentation is slow — the system doesn’t need to be real-time to be useful.</p><h3>Backend architecture (Flask)</h3><p>The backend is small, but structured around a clear pipeline.</p><h4>Ingestion</h4><ul><li>Fetches data from the RAPT API</li><li>Handles formatting and consistency</li></ul><h4>Storage</h4><ul><li>Uses <strong>SQLite</strong> for persistence</li><li>Stores readings as time-series data</li><li>Keeps historical context for analysis</li></ul><p>SQLite works well here because:</p><ul><li>no separate service is needed</li><li>it’s reliable for low-frequency writes</li><li>it keeps the system self-contained</li></ul><h4>Processing</h4><p>This is where the system becomes useful.</p><p>Instead of storing only raw values, the backend computes:</p><ul><li><strong>rate of gravity change (Δ</strong><a href="https://en.wikipedia.org/wiki/Relative_density"><strong>SG</strong></a><strong> / Δtime)</strong></li><li><strong>rolling averages</strong></li><li><strong>short-term vs long-term trends</strong></li></ul><p>This transforms raw data into <strong>signals</strong>.</p><h4>Exposure</h4><ul><li>Provides REST endpoints for the frontend</li><li>Serves both raw and computed values</li></ul><h3>Time-series approach</h3><p>Fermentation only makes sense when viewed over time.</p><p>A typical profile looks like:</p><ul><li>rapid gravity drop at the beginning</li><li>gradual slowdown</li><li>stabilization near final gravity</li></ul><p>The system operates on <strong>rolling windows of data</strong>, not individual readings.</p><p>This allows it to detect:</p><ul><li>changes in fermentation speed</li><li>consistency of behavior</li><li>transitions between phases</li></ul><h3>Detecting fermentation behavior</h3><h4>Fermentation slowdown</h4><p>The system analyzes the rate of gravity change over time.</p><p>If Δ<a href="https://en.wikipedia.org/wiki/Relative_density">SG</a> becomes very small over a sustained window, it indicates that fermentation activity is decreasing.</p><h4>Fermentation completion</h4><p>Fermentation is considered complete when:</p><ul><li>gravity change is negligible</li><li>values remain stable across multiple consecutive readings</li><li>the airlock stops bubbling <em>(arguably the most trusted measurement in homebrewing)</em></li></ul><p>This avoids reacting to short-term noise and gives a reliable signal that fermentation has finished.</p><h4>Basic anomaly detection</h4><p>Once trends are available, anomalies become easier to detect.</p><p>The system currently identifies:</p><ul><li>early plateau → possible stuck fermentation</li><li>irregular gravity changes → measurement or process issues</li><li>temperature deviations → environmental instability</li></ul><p>This is implemented using:</p><ul><li>thresholds</li><li>deviation from recent trends</li><li>consistency checks</li></ul><p>It’s simple, but effective.</p><h3>Frontend (Angular)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z_QW4liQ-fhv3S-pA1Folg.png" /><figcaption>Fermentation monitoring dashboard</figcaption></figure><p>In the chart above, you can see the fermentation progress of a Hefeweizen <em>(recently visited a bunch of breweries in Munich and Erding and couldn’t resist brewing one)</em>.</p><p>The frontend is also hosted on the Raspberry Pi.</p><p>It:</p><ul><li>visualizes time-series data</li><li>displays trends and derived metrics</li><li>highlights anomalies</li></ul><p>Charts are rendered using <a href="https://www.npmjs.com/package/echarts"><strong>ECharts</strong></a>, enabling smooth and flexible data visualization.</p><p>All logic remains in the backend, keeping responsibilities clear.</p><h3>Why this architecture works</h3><p>A few design decisions made this system reliable and easy to evolve:</p><ul><li><strong>Local-first approach</strong> → everything runs on the Raspberry Pi</li><li><strong>Polling over streaming</strong> → simple and sufficient (especially for fermentation)</li><li><strong>Derived metrics over raw values</strong> → more meaningful insights</li><li><strong>Clear separation of concerns</strong> → backend analyzes, frontend displays</li></ul><h3>What’s next: machine learning</h3><p>The current system uses rule-based detection.</p><p>That’s intentional — simple heuristics are easy to implement and reason about.</p><p>But they have limitations:</p><ul><li>thresholds are static</li><li>they don’t adapt to different fermentation profiles</li></ul><p>The next step is to introduce <strong>machine learning</strong>.</p><p>Instead of defining rules manually, the system could:</p><ul><li>learn typical fermentation behavior</li><li>detect anomalies automatically</li><li>adapt to different yeast strains and recipes</li></ul><h3>Toward automated fermentation control</h3><p>Beyond monitoring, the long-term goal is <strong>automation</strong>.</p><p>The idea is to connect this system to my fermentation chamber and control temperature dynamically based on live fermentation data <em>(hopefully the guys from </em><a href="https://www.inkbird.com/products/temperature-controller-itc-308"><em>Inkbird</em></a><em> will also expose an API and make this process much easier)</em>.</p><p>For example:</p><ul><li>increasing temperature for a <a href="https://forum.homebrewersassociation.org/t/diacetyl-rest/28377"><strong>diacetyl rest</strong></a></li><li>decreasing temperature for a <a href="https://www.northernbrewer.com/blogs/brewing-techniques/short-pour-cold-crashing?srsltid=AfmBOopxVb4MpCuvrhwvn5bNMhjtsVlecfbXejr2k-xZiZBsr3AJgn5t"><strong>cold crash</strong></a></li><li>adjusting profiles during active fermentation</li></ul><p>This becomes especially important for lagers, where <a href="https://en.wikipedia.org/wiki/Saccharomyces_pastorianus"><strong>Saccharomyces pastorianus</strong></a> requires precise temperature control throughout fermentation (many fermentation steps here).</p><p>At that point, the system evolves from observing fermentation to <strong>actively managing it.</strong></p><h3>Final thoughts</h3><p>This started as a personal project.</p><p>Just a way to combine:</p><ul><li>coding</li><li>engineering</li><li>brewing</li></ul><p>But it turned into something more useful than expected.</p><p>Not because of complexity — but because of a simple shift:</p><p>from <em>collecting data</em> → to <em>understanding behavior</em></p><p>It’s still a small system, running quietly on a Raspberry Pi in my brewery.</p><p>But now, instead of guessing what’s happening, I can actually<strong> reason about fermentation in real time</strong> — without wasting precious beer on gravity readings, haha.</p><p>And that makes a big difference.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9601a4adcd88" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dockerized Solid.js Micro-Frontends: Simplifying Scalable Web Applications]]></title>
            <link>https://medium.com/@mihairazvantudorache/dockerized-solid-js-micro-frontends-simplifying-scalable-web-applications-828e3234343b?source=rss-44906c067a65------2</link>
            <guid isPermaLink="false">https://medium.com/p/828e3234343b</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[micro-frontends]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[solidjs]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Mihai-Razvan Tudorache]]></dc:creator>
            <pubDate>Sat, 27 Apr 2024 13:03:23 GMT</pubDate>
            <atom:updated>2024-04-28T06:40:23.158Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iqFav0nkFUVpvP3QrHzcKg.png" /></figure><p>In the fast-paced world of web development, the quest for agility, scalability, and maintainability has led to the rise of micro-frontends. Unlike traditional monolithic architectures, micro-frontends advocate for breaking down frontend applications into smaller, independently deployable units, each responsible for a specific feature or functionality. This modular approach empowers teams to work autonomously, iterate faster, and scale with ease.</p><p>At its core, a micro-frontend is a self-contained frontend application that encapsulates a specific piece of functionality. Whether it’s a widget, a component, or an entire page, micro-frontends operate independently while seamlessly integrating with other micro-frontends to deliver a cohesive user experience. This decoupling enables teams to adopt different technologies, frameworks, or programming languages for each micro-frontend, based on the unique requirements of the feature being developed.</p><p>In this article, we will embark on a journey to discover the intricacies of constructing a micro-frontend architecture utilizing Solid.js. Our focus will be on breaking down the application into manageable units, each encapsulating specific functionality. Furthermore, we will delve into the realm of containerization, employing Docker to create individualized containers for each deployable unit. Through this exploration, we aim to equip developers with the knowledge and tools necessary to build scalable, modular frontend applications that seamlessly integrate into a cohesive user experience.</p><p>Firstly, why Solid.js? Solid.js has garnered significant attention and popularity in recent years for its innovative approach to building user interfaces. Unlike traditional frameworks, Solid.js embraces reactive programming principles, enabling developers to create highly performant and responsive applications. One of its standout features is its fine-grained reactivity system, which efficiently updates the DOM only when necessary, resulting in smoother user experiences and improved performance. Additionally, Solid.js boasts a minimalist API surface and a lightweight footprint, making it ideal for building fast and lightweight web applications. Its declarative syntax, inspired by React, simplifies the development process, while its emphasis on composition and reusability promotes code maintainability and scalability. These advantages position Solid.js as a compelling choice for developers seeking to build modern, efficient frontend applications.</p><h3>Architecture</h3><p>In our approach, three teams collaborate to deliver a cohesive frontend solution. Two teams develop independent features within remote applications, <strong>mfe1 </strong>and <strong>mfe2</strong>, while the third team creates the <strong>shell </strong>application. This <strong>shell </strong>application integrates the remote applications, ensuring a unified user experience. This modular architecture enables rapid iteration, autonomy for each team, and seamless feature integration.</p><p>The following diagram depicts the project’s ideal architecture:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rq-xwjP04_qkaK5qEWv7JQ.png" /><figcaption>System Diagram</figcaption></figure><p>Our focus will be on the creation and integration of the micro-frontend approach, rather than the actual pipeline. Ultimately, we will demonstrate how to build Docker images and run containers for each project, bringing our architectural vision to life.</p><h3>Creating the micro-frontends</h3><p>To kickstart the process, we’ll utilize the npx create-mf-app command to create our micro frontend applications. Running this command three times, once for each project, will initiate the setup. Upon execution, you’ll be prompted to configure the app by specifying the app name, project type (application), and port number (3001 for <strong>mfe1</strong>, 3002 for <strong>mfe2</strong>, and 3000 for the <strong>shell</strong>). Additionally, you’ll select Solid.js as the framework, choose JavaScript as the language, and opt for Webpack as the packer. This streamlined setup process ensures consistency across our micro frontend projects.</p><p>Following the creation of each project, we’ll navigate into their respective directories and execute npm install to install dependencies. Subsequently, we’ll run npm run start to launch each project locally.</p><p>Finally, let’s begin writing Solid.js code! Within the <strong>mfe1 </strong>project, clear out all the content from index.css except for the font-family declaration. Then, proceed to create a new component named Navbar.jsx:</p><pre>import &quot;./Navbar.css&quot;;<br><br>const Navbar = () =&gt; {<br>  return &lt;div class=&quot;navbar&quot;&gt;Navbar (MFE1)&lt;/div&gt;;<br>};<br><br>export default Navbar;</pre><p>Below is the corresponding Navbar.css file:</p><pre>.navbar {<br>    display: flex;<br>    justify-content: center;<br>    border: 2px dotted black;<br>    border-radius: 15px;<br>    padding: 20px;<br>    margin: 20px;<br>    background-color: lightpink;<br>}</pre><p>Lastly, import the component into App.jsx:</p><pre>import { render } from &quot;solid-js/web&quot;;<br>import Navbar from &quot;./components/Navbar&quot;;<br>import &quot;./index.css&quot;;<br><br>const App = () =&gt; (<br>  &lt;div class=&quot;container&quot;&gt;<br>    &lt;Navbar /&gt;<br>  &lt;/div&gt;<br>);<br>render(App, document.getElementById(&quot;app&quot;));</pre><p>This is what you should see <a href="http://localhost:3001/">http://localhost:3001/</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HQ3KgtTu8rfrDnP4M4YhTQ.png" /></figure><p>Similarly, we’ll create a Card.jsx for <strong>mfe2</strong>:</p><pre>import &quot;./Card.css&quot;;<br><br>const Card = () =&gt; {<br>  return &lt;div class=&quot;card&quot;&gt;Card (MFE2)&lt;/div&gt;;<br>};<br><br>export default Card;</pre><p>Card.css:</p><pre>.card {<br>    display: flex;<br>    justify-content: center;<br>    border: 2px dotted black;<br>    border-radius: 15px;<br>    padding: 50px;<br>    margin: 20px;<br>    background-color: lightgreen;<br>}</pre><p>And App.jsx should look like this:</p><pre>import { render } from &quot;solid-js/web&quot;;<br>import Card from &quot;./components/Card&quot;;<br>import &quot;./index.css&quot;;<br><br>const App = () =&gt; (<br>  &lt;div class=&quot;container&quot;&gt;<br>    &lt;Card /&gt;<br>  &lt;/div&gt;<br>);<br>render(App, document.getElementById(&quot;app&quot;));</pre><p>Now, you should be able to see our card at <a href="http://localhost:3002/">http://localhost:3002/</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ePymnLU0MOkTW5bdSUAAcQ.png" /></figure><p>Before proceeding to develop our <strong>shell</strong>, it’s crucial to ensure its ability to communicate with the micro-frontends <strong>mfe1 </strong>and <strong>mfe2</strong>. To achieve this integration, we’ll need to modify the plugins property of the webpack.config.js file for each of these micro-frontends. Below is the proposed update for <strong>mfe1</strong>:</p><pre>...<br>  plugins: [<br>    new ModuleFederationPlugin({<br>      name: &quot;mfe1&quot;,<br>      filename: &quot;remoteEntry.js&quot;,<br>      remotes: {},<br>      exposes: {<br>        &quot;./Navbar&quot;: &quot;./src/components/Navbar.jsx&quot;, // expose the navbaar component<br>      },<br>      shared: {<br>        ...deps,<br>        &quot;solid-js&quot;: {<br>          singleton: true,<br>          requiredVersion: deps[&quot;solid-js&quot;],<br>        },<br>      },<br>    }),<br>    new HtmlWebPackPlugin({<br>      template: &quot;./src/index.html&quot;,<br>    }),<br>    new Dotenv(),<br>  ],<br>...</pre><p>And <strong>mfe2</strong>:</p><pre>...<br>plugins: [<br>    new ModuleFederationPlugin({<br>      name: &quot;mfe2&quot;,<br>      filename: &quot;remoteEntry.js&quot;,<br>      remotes: {},<br>      exposes: {<br>        &quot;./Card&quot;: &quot;./src/components/Card.jsx&quot;, // expose the card component<br>      },<br>      shared: {<br>        ...deps,<br>        &quot;solid-js&quot;: {<br>          singleton: true,<br>          requiredVersion: deps[&quot;solid-js&quot;],<br>        },<br>      },<br>    }),<br>    new HtmlWebPackPlugin({<br>      template: &quot;./src/index.html&quot;,<br>    }),<br>    new Dotenv(),<br>  ],<br>...</pre><p>Below is the update for webpack.config.js file in our <strong>shell</strong>:</p><pre>...<br>plugins: [<br>    new ModuleFederationPlugin({<br>      name: &quot;shell&quot;,<br>      filename: &quot;remoteEntry.js&quot;,<br>      remotes: {<br>        mfe1: &quot;mfe1@http://localhost:3001/remoteEntry.js&quot;, // mfe1 navbar<br>        mfe2: &quot;mfe2@http://localhost:3002/remoteEntry.js&quot;, // mfe2 card<br>      },<br>      exposes: {},<br>      shared: {<br>        ...deps,<br>        &quot;solid-js&quot;: {<br>          singleton: true,<br>          requiredVersion: deps[&quot;solid-js&quot;],<br>        },<br>      },<br>    }),<br>    new HtmlWebPackPlugin({<br>      template: &quot;./src/index.html&quot;,<br>    }),<br>    new Dotenv(),<br>  ],<br>...</pre><p>Now, we can easily import the two remote components into our <strong>shell </strong>application’s App.jsx:</p><pre>import { render } from &quot;solid-js/web&quot;;<br>import Navbar from &quot;mfe1/Navbar&quot;;<br>import Card from &quot;mfe2/Card&quot;;<br>import &quot;./index.css&quot;;<br><br>const App = () =&gt; (<br>  &lt;div class=&quot;container&quot;&gt;<br>    &lt;div class=&quot;shell-header&quot;&gt;Shell&lt;/div&gt;<br>    &lt;Navbar /&gt;<br>    &lt;Card /&gt;<br>  &lt;/div&gt;<br>);<br>render(App, document.getElementById(&quot;app&quot;));</pre><p>This is the corresponding index.css file:</p><pre>* {<br>  box-sizing: border-box;<br>}<br><br>body {<br>  font-family: Arial, Helvetica, sans-serif;<br>  margin: 0;<br>  padding: 0;<br>}<br><br>.container {<br>  margin: 20px;<br>  border: 2px dotted black;<br>  border-radius: 15px;<br>  background-color: lightyellow;<br>}<br><br>.shell-header {<br>  display: flex;<br>  justify-content: center;<br>  margin: 20px;<br>}</pre><p>Now, the navbar from <strong>mfe1 </strong>and card from <strong>mfe2 </strong>should appear in our <strong>shell </strong>at <a href="http://localhost:3000/">http://localhost:3000/</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lsldlBTtqpYPLD1Wb9kgnw.png" /></figure><p>Voilà! We’ve successfully crafted a micro-frontend-based architecture. But how does it function under the hood? If you navigate to <a href="http://localhost:3001/remoteEntry.js">http://localhost:3001/remoteEntry.js</a>, you’ll encounter a chunk of code. This remoteEntry.js file acts as the entry point for remote modules dynamically loaded into the application. When you develop a micro-frontend app and host it on <a href="http://localhost:3001/">http://localhost:3001/</a>, for example, the remoteEntry.js file at that URL contains vital information about the modules available for consumption by other micro-frontends or applications. This mechanism seamlessly loads the two remote micro-frontends into our <strong>shell </strong>application at <a href="http://localhost:3000/">http://localhost:3000/</a>.</p><h3>Containerizing the micro-frontends</h3><p>Let’s take it one step further. As mentioned earlier, in real-world scenarios, different teams often manage projects independently, scaling and deploying them autonomously. When it comes to micro-frontends, containerization proves advantageous, and Docker<strong> </strong>plays a pivotal role in facilitating this process. Here are some key advantages of containerizing micro-frontends with Docker:</p><ul><li><strong>Isolation</strong>: Ensuring each micro-frontend operates independently, enhancing stability and reliability by preventing one micro-frontend’s issues from affecting others.</li><li><strong>Consistency</strong>: Packaging micro-frontends with dependencies to ensure uniform environments across various development stages and streamline deployment processes.</li><li><strong>Scalability</strong>: Facilitating easy scaling of micro-frontends to meet increased traffic or workload demands.</li><li><strong>Portability</strong>: Encapsulating micro-frontends and their dependencies for seamless deployment across diverse environments with minimal configuration changes.</li></ul><p>Let’s kick off by crafting a Dockerfile in the root directory of each <strong>mfe1</strong>, <strong>mfe2</strong>, and <strong>shell</strong>.</p><pre>FROM node:14<br><br>WORKDIR /app<br><br>COPY package*.json ./<br><br>RUN npm install<br><br>COPY . .<br><br>RUN npm run build<br><br>RUN npm install -g serve<br><br># mfe1 port<br>EXPOSE 3001<br><br>CMD [&quot;serve&quot;, &quot;-s&quot;, &quot;dist&quot;, &quot;-l&quot;, &quot;3001&quot;]</pre><p>This Dockerfile is tailored for <strong>mfe1</strong> micro-frontend. It establishes a Node.js environment, copies package.json and package-lock.json files to the /app directory, installs dependencies via npm, and then proceeds to copy and build the project. Additionally, it globally installs the serve package, exposes port 3001, and serves the built application on port 3001 using the serve command. Similar Dockerfile configurations will be created for <strong>mfe2 </strong>and <strong>shell</strong>, differing only in the specified ports (3002 for <strong>mfe2 </strong>and 3000 for the <strong>shell</strong>).</p><p>Let’s proceed with building the Docker images and running the containers for <strong>mfe1</strong>:</p><pre>docker build -t mfe1 .<br>docker run -p 3001:3001 --name mfe1 mfe1</pre><p>For <strong>mfe2</strong>:</p><pre>docker build -t mfe2 .<br>docker run -p 3002:3002 --name mfe2 mfe2</pre><p>And for the <strong>shell</strong>:</p><pre>docker build -t shell .<br>docker run -p 3000:3000 --name shell shell</pre><p>You can also run the containers using Docker Desktop:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1OFkYtAi9b-Rg123Th7IhA.png" /></figure><p>You should now be able to access each app in the browser, with each running inside its own Docker<strong> </strong>container. This setup serves as a basic foundation, with the primary focus on the micro-frontends themselves. However, this starting point provides a solid foundation to further enhance the architecture, such as orchestrating them using Kubernetes or deploying the containers to public cloud providers like Amazon Web Services, Microsoft Azure, Google Cloud Platform, and so on.</p><h3>Conclusion</h3><p>Throughout our exploration, we’ve delved into the dynamic realm of micro-frontends, uncovering their ability to empower teams in the development and deployment of web applications with agility and scalability. We’ve navigated the implementation of modular solutions using Solid.js and Docker, showcasing the transformative impact of this architectural approach. However, it’s important to note that my article offers just a glimpse into the vast realm of micro-frontends, with numerous uncharted territories waiting to be explored and implemented. There’s much more depth and potential beyond what’s been discussed here, encouraging further exploration and experimentation in this innovative paradigm.</p><p>Feel free to explore the complete source code available on my GitHub repository <a href="https://github.com/mihaibrewshare/solid-js-mfe-architecture">https://github.com/mihaibrewshare/solid-js-mfe-architecture</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=828e3234343b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>