<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Victor Ng'ang'a</title>
    <description>The latest articles on DEV Community by Victor Ng'ang'a (@vn-vision).</description>
    <link>https://dev.to/vn-vision</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3154272%2F10ddb5fa-645d-4be9-b9c4-00ac98fa3b9b.png</url>
      <title>DEV Community: Victor Ng'ang'a</title>
      <link>https://dev.to/vn-vision</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vn-vision"/>
    <language>en</language>
    <item>
      <title>Monoliths, Modular Monoliths, and Microservices: A Developer's Reflection</title>
      <dc:creator>Victor Ng'ang'a</dc:creator>
      <pubDate>Tue, 01 Jul 2025 07:20:51 +0000</pubDate>
      <link>https://dev.to/vn-vision/monoliths-modular-monoliths-and-microservices-a-developers-reflection-ino</link>
      <guid>https://dev.to/vn-vision/monoliths-modular-monoliths-and-microservices-a-developers-reflection-ino</guid>
      <description>&lt;h2&gt;
  
  
  Monoliths, Modular Monoliths, and Microservices: A Developer's Reflection
&lt;/h2&gt;

&lt;p&gt;After working on different projects: some small, others growing fast. I’ve been forced to ask myself:&lt;br&gt;&lt;br&gt;
&lt;strong&gt;“What’s the right architecture for where I am?”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Along that journey, I’ve had the chance to explore all three key approaches: &lt;strong&gt;Monoliths&lt;/strong&gt;, &lt;strong&gt;Modular Monoliths&lt;/strong&gt;, and &lt;strong&gt;Microservices&lt;/strong&gt;, especially in a Dockerized environment.&lt;/p&gt;

&lt;p&gt;Here’s what I’ve come to understand from actually building with them:&lt;/p&gt;




&lt;h2&gt;
  
  
  🧱 Monoliths –&amp;gt; Start Simple
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzmqfjd97xkpe5tysnhke.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzmqfjd97xkpe5tysnhke.png" alt="Monoliths" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A monolith is a single codebase where all your logic/APIs, services, UI; lives and is deployed together.&lt;/p&gt;

&lt;p&gt;For most early-stage apps, especially solo-built ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Easy to start, build, test, and deploy&lt;/li&gt;
&lt;li&gt;✅ Less overhead&lt;/li&gt;
&lt;li&gt;🚫 Doesn’t scale well with growing complexity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It works great for early MVPs where the focus is speed over long-term structure.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧩 Modular Monolith –&amp;gt; The Sweet Spot for Many
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F81lcu5abatzpkx98rcia.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F81lcu5abatzpkx98rcia.png" alt="Modular Monoliths" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;modular monolith&lt;/strong&gt; keeps everything in one repo and process but divides functionality into clear, separate &lt;strong&gt;modules&lt;/strong&gt; / &lt;strong&gt;apps&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Think: &lt;code&gt;purchases&lt;/code&gt;, &lt;code&gt;sales&lt;/code&gt;, &lt;code&gt;payments&lt;/code&gt; as independent Django apps within one project.&lt;/p&gt;

&lt;p&gt;Why it works well for me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modules are independently testable&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;payments&lt;/code&gt; fail, &lt;code&gt;sales&lt;/code&gt; still work&lt;/li&gt;
&lt;li&gt;It is easier to onboard new devs into a single repo&lt;/li&gt;
&lt;li&gt;And when scaling comes into the picture, &lt;strong&gt;extracting a module into a microservice is painless&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;This structure hit a sweet spot&lt;/strong&gt;: Clean enough to grow, simple enough to deploy.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔗 Microservices –&amp;gt; Powerful, but Heavy
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1wfxulty3ka88wmfs8ko.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1wfxulty3ka88wmfs8ko.png" alt="Micro-services" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Later, I interacted with projects built entirely as &lt;strong&gt;microservices&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each module had its own repo&lt;/li&gt;
&lt;li&gt;Each service had its own runtime&lt;/li&gt;
&lt;li&gt;Services talked over REST or messaging systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This enables:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🚀 Independent scaling&lt;/li&gt;
&lt;li&gt;👥 Team autonomy&lt;/li&gt;
&lt;li&gt;🔄 Service-specific deployments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But comes at a cost:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You now manage 5–10 services, not one&lt;/li&gt;
&lt;li&gt;Networking, monitoring, and syncing data get tricky&lt;/li&gt;
&lt;li&gt;CI/CD needs to be rock solid&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re a small team, microservices &lt;strong&gt;might feel like overkill&lt;/strong&gt; until you really need them.&lt;/p&gt;




&lt;h2&gt;
  
  
  🐳 Docker’s Role in All This
&lt;/h2&gt;

&lt;p&gt;Docker is a huge enabler across all three approaches.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Monoliths&lt;/strong&gt; → 1 image, 1 container&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modular Monolith&lt;/strong&gt; → 1 container, multiple logical modules&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Microservices&lt;/strong&gt; → Multiple containers, each service in its own environment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As I learned more, I discovered tools like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;docker-compose&lt;/code&gt; : to spin up dev environments with multiple services&lt;/li&gt;
&lt;li&gt;Kubernetes : to manage containerized apps in production&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For monoliths and modular monoliths, Docker makes deployment simple.&lt;br&gt;&lt;br&gt;
For microservices, Docker makes it possible at all.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Conclusion: My Advice?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Start with a monolith&lt;/strong&gt; when it’s just you or your MVP.&lt;/li&gt;
&lt;li&gt;🧩 &lt;strong&gt;Modular monolith&lt;/strong&gt; when you expect growth, it’s the most forgiving and flexible structure.&lt;/li&gt;
&lt;li&gt;🚀 &lt;strong&gt;Microservices&lt;/strong&gt; when your scale and team size demand it, but only when you’re ready for the operational cost.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Let me know what architecture your project is using and why you chose it.&lt;/p&gt;

&lt;p&gt;Would love to hear how others are approaching system design in real-world situations.&lt;/p&gt;

&lt;p&gt;-&lt;em&gt;vn-vision&lt;/em&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>devjourney</category>
      <category>docker</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>Catching bugs before they bite: Django Testing</title>
      <dc:creator>Victor Ng'ang'a</dc:creator>
      <pubDate>Tue, 10 Jun 2025 18:57:47 +0000</pubDate>
      <link>https://dev.to/vn-vision/catching-bugs-before-they-bite-django-testing-3mp</link>
      <guid>https://dev.to/vn-vision/catching-bugs-before-they-bite-django-testing-3mp</guid>
      <description>&lt;h2&gt;
  
  
  Week 5: Testing Everything—Unit, Integration, Functional &amp;amp; Beyond
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
I wrote and ran &lt;strong&gt;unit&lt;/strong&gt;, &lt;strong&gt;integration&lt;/strong&gt;, &lt;strong&gt;functional&lt;/strong&gt;, &lt;strong&gt;smoke&lt;/strong&gt;, and &lt;strong&gt;regression&lt;/strong&gt; tests for Vimist’s services and endpoints—uncovered atomicity and signal bugs that only appeared on a live server.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  1. Unit Tests for Core Services
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What I tested:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;process_sale&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;process_purchase&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Credit account adjustments
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Goal:&lt;/strong&gt; Verify business logic in isolation before touching the database or HTTP layer.&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Integration Tests Across Services
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Focus:&lt;/strong&gt; Ensure related functions play nicely together.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scenarios:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Sale → inventory decrement
&lt;/li&gt;
&lt;li&gt;Purchase → inventory increment
&lt;/li&gt;
&lt;li&gt;Credit sale limits &amp;amp; repayments
&lt;/li&gt;
&lt;li&gt;Mixed payment methods: Cash, M-Pesa, Credit&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Functional Flow Verification
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;End-to-end checks:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;User signup + alert notification
&lt;/li&gt;
&lt;li&gt;Making purchases &amp;amp; payments
&lt;/li&gt;
&lt;li&gt;Low-stock and overdue payment alerts
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. Manual “Live” Testing Catches What Code Can’t
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How:&lt;/strong&gt; Hit the real API server with Postman/cURL.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Findings:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Sales weren’t fully atomic—errors raised but records still saved.
&lt;/li&gt;
&lt;li&gt;Duplicate credit entries when serializers &lt;strong&gt;and&lt;/strong&gt; signals both processed transactions.
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lesson:&lt;/strong&gt; Unit &amp;amp; integration tests are great—but manual/smoke tests on the live server are invaluable for catching signal- and transaction-related bugs.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Testing isn’t just a checkbox, it’s your fastest path to confidence and fewer late-night fire drills.  &lt;/p&gt;

&lt;p&gt;Next up: automating CI/CD pipelines to run these tests on every push.  &lt;/p&gt;

&lt;p&gt;See you in Week 6!&lt;br&gt;&lt;br&gt;
-vn-vision&lt;/p&gt;

</description>
      <category>testing</category>
      <category>djangorestframework</category>
      <category>api</category>
      <category>devjourney</category>
    </item>
    <item>
      <title>Serializers, ViewSets, and Security — Making the System Talk</title>
      <dc:creator>Victor Ng'ang'a</dc:creator>
      <pubDate>Thu, 05 Jun 2025 08:30:05 +0000</pubDate>
      <link>https://dev.to/vn-vision/serializers-viewsets-and-security-making-the-system-talk-1f83</link>
      <guid>https://dev.to/vn-vision/serializers-viewsets-and-security-making-the-system-talk-1f83</guid>
      <description>&lt;h2&gt;
  
  
  Week 4: Serializers, ViewSets, and Security — Making Vimist Talk
&lt;/h2&gt;

&lt;p&gt;This week was about &lt;strong&gt;getting &lt;a href="https://github.com/vn-vision/vimist" rel="noopener noreferrer"&gt;Vimist&lt;/a&gt; to communicate&lt;/strong&gt; — from models to APIs to responses.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧭 &lt;a href="https://github.com/vn-vision/vimist" rel="noopener noreferrer"&gt;Vimist&lt;/a&gt; API Request Flow
&lt;/h2&gt;

&lt;p&gt;Here's how a typical request travels through the &lt;a href="https://github.com/vn-vision/vimist" rel="noopener noreferrer"&gt;Vimist&lt;/a&gt; system:&lt;/p&gt;

&lt;p&gt;1️⃣ Client&lt;br&gt;
→ Browser or mobile app sends a request&lt;/p&gt;

&lt;p&gt;2️⃣ HTTP Request&lt;br&gt;
→ Type: GET, POST, PUT, or DELETE&lt;/p&gt;

&lt;p&gt;3️⃣ urls.py&lt;br&gt;
→ Matches request to a route (e.g. /sales/)&lt;/p&gt;

&lt;p&gt;4️⃣ views.py&lt;br&gt;
→ Entry point for logic (SaleViewSet)&lt;br&gt;
→ Calls serializer and handles permissions&lt;/p&gt;

&lt;p&gt;5️⃣ serializers.py&lt;br&gt;
→ Validates and transforms data&lt;br&gt;
→ Triggers service logic like process_sale()&lt;/p&gt;

&lt;p&gt;6️⃣ models.py&lt;br&gt;
→ Interacts with the database&lt;br&gt;
→ Uses signals for consistency and atomicity&lt;/p&gt;

&lt;p&gt;7️⃣ Response&lt;br&gt;
→ Sends back a JSON or XML response to the client&lt;/p&gt;

&lt;p&gt;💡 Each part has a role. Want more? Check the full breakdown below.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔄 Serialization Deep Dive
&lt;/h2&gt;

&lt;p&gt;I learned how to transform model instances and querysets into JSON/XML and back.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;ModelSerializers&lt;/strong&gt;: quick and DRY, great for prototyping.&lt;/li&gt;
&lt;li&gt;🛠 &lt;strong&gt;Manual Serializers&lt;/strong&gt;: more verbose, but perfect when I needed full control.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📡 Views and APIs
&lt;/h2&gt;

&lt;p&gt;Once serialization was working, I moved on to &lt;strong&gt;views&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Used &lt;strong&gt;&lt;code&gt;ModelViewSets&lt;/code&gt;&lt;/strong&gt; for standard CRUD.&lt;/li&gt;
&lt;li&gt;Switched to &lt;strong&gt;&lt;code&gt;generics&lt;/code&gt;&lt;/strong&gt; where I needed custom logic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The choice often boiled down to &lt;strong&gt;clarity vs control&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔐 Securing the Endpoints
&lt;/h2&gt;

&lt;p&gt;I implemented &lt;code&gt;permission_classes&lt;/code&gt; to make sure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only &lt;strong&gt;authenticated users&lt;/strong&gt; could interact with the system.&lt;/li&gt;
&lt;li&gt;Each view was tied to the user’s &lt;strong&gt;role (RBAC)&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧠 Delegating to Services
&lt;/h2&gt;

&lt;p&gt;To keep views thin, I offloaded business logic to services called by serializers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;process_sale&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;process_purchase&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;credit_transactions&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;credit_accounts&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It made testing easier and the codebase cleaner.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚖️ Signals &amp;amp; Consistency
&lt;/h2&gt;

&lt;p&gt;Using Django signals, I ensured that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All transactions are &lt;strong&gt;atomic&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Database state stays consistent even if something fails mid-way, &lt;em&gt;no half-done work&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧭 Vimist API Flow (Simplified)
&lt;/h2&gt;

&lt;p&gt;Client&lt;br&gt;
  ↓&lt;br&gt;
HTTP Request (GET/POST/PUT/DELETE)&lt;br&gt;
  ↓&lt;br&gt;
urls.py (Route matching)&lt;br&gt;
  ↓&lt;br&gt;
views.py (e.g. SaleViewSet)&lt;br&gt;
  ↓&lt;br&gt;
serializers.py (Validation &amp;amp; transformation)&lt;br&gt;
  ↓&lt;br&gt;
models.py (Database operations)&lt;br&gt;
  ↓&lt;br&gt;
Response (JSON/XML to client)&lt;/p&gt;




&lt;h2&gt;
  
  
  🧵 Wrapping It Up
&lt;/h2&gt;

&lt;p&gt;Week 4 was about making the backend &lt;strong&gt;talk and listen&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I’m slowly tying the pieces together — from &lt;code&gt;design&lt;/code&gt; to &lt;code&gt;function&lt;/code&gt; to &lt;code&gt;security&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Each layer now has a purpose, and the system is becoming more predictable and stable.&lt;/p&gt;

&lt;p&gt;Week 5… let’s ship more.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;- vn-vision&lt;/em&gt;&lt;/p&gt;

</description>
      <category>djangorestframework</category>
      <category>api</category>
      <category>systemdesign</category>
      <category>devjourney</category>
    </item>
    <item>
      <title>System Revamp: Stepping Into System Design</title>
      <dc:creator>Victor Ng'ang'a</dc:creator>
      <pubDate>Mon, 26 May 2025 15:39:02 +0000</pubDate>
      <link>https://dev.to/vn-vision/system-revamp-stepping-into-system-design-15l0</link>
      <guid>https://dev.to/vn-vision/system-revamp-stepping-into-system-design-15l0</guid>
      <description>&lt;h2&gt;
  
  
  Week 3: A Shift in Perspective
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Quick Snapshot&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Learned from &lt;em&gt;&lt;a href="https://www.youtube.com/watch?v=SqcXvc3ZmRU&amp;amp;list=PLMCXHnjXnTnvo6alSjVkgxV-VH6EPyvoX" rel="noopener noreferrer"&gt;Gaurav Sen's system design series&lt;/a&gt;&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Started redesigning my &lt;em&gt;&lt;a href="https://github.com/vn-vision/vimist/" rel="noopener noreferrer"&gt;Vimist POS + Inventory system&lt;/a&gt;&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Focus: consistency, transactional integrity, scalability
&lt;/li&gt;
&lt;li&gt;Tech: Django, MySQL, Docker, REST APIs, RBAC
&lt;/li&gt;
&lt;li&gt;LLD in progress, HLD shaping up
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;




&lt;p&gt;Two weeks ago, I started blogging. I had no clear direction — just a deep desire to share. That led to my first post: &lt;em&gt;&lt;a href="https://dev.to/vn-vision/i-almost-didnt-write-this-but-heres-why-i-did-anyway-3h18"&gt;I Almost Didn’t Write This&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;By week two, I had dived into Docker and system design, writing about &lt;em&gt;&lt;a href="https://dev.to/vn-vision/devsecops-scale-docker-security-and-system-design-24pc"&gt;scaling, security, and why DevSecOps matters&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  This Week: System Design Hit Me Hard
&lt;/h2&gt;

&lt;p&gt;After bingeing &lt;em&gt;&lt;a href="https://www.youtube.com/watch?v=SqcXvc3ZmRU&amp;amp;list=PLMCXHnjXnTnvo6alSjVkgxV-VH6EPyvoX" rel="noopener noreferrer"&gt;Gaurav Sen's system design&lt;/a&gt;&lt;/em&gt; breakdowns (Tinder, WhatsApp, Instagram), I saw things differently.&lt;/p&gt;

&lt;p&gt;It made me look at my own project — &lt;strong&gt;&lt;a href="https://github.com/vn-vision/vimist/" rel="noopener noreferrer"&gt;Vimist&lt;/a&gt;&lt;/strong&gt;, a POS and Inventory app — and realize:&lt;br&gt;&lt;br&gt;
It could be better.&lt;/p&gt;

&lt;p&gt;So I paused building... and started redesigning.&lt;/p&gt;




&lt;h2&gt;
  
  
  Core Requirements I Mapped Out
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Inventory management
&lt;/li&gt;
&lt;li&gt;Purchases (what, where, who, how paid)
&lt;/li&gt;
&lt;li&gt;Sales (to whom, by whom, payment method)
&lt;/li&gt;
&lt;li&gt;Credit tracking w/ limits &amp;amp; repayments
&lt;/li&gt;
&lt;li&gt;Notifications: low stock, overdue payments
&lt;/li&gt;
&lt;li&gt;Payment types: cash, mobile money, credit
&lt;/li&gt;
&lt;li&gt;Business branding: themes, logos, company details&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Tradeoffs and Decisions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Consistency is a must&lt;/strong&gt; — money’s involved.&lt;/p&gt;

&lt;p&gt;That left me debating between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Availability
&lt;/li&gt;
&lt;li&gt;Partition tolerance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Still undecided. Any thoughts?&lt;br&gt;
&lt;strong&gt;Share down in the comments.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Stack I Chose
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🧱 &lt;strong&gt;REST APIs&lt;/strong&gt; for simplicity
&lt;/li&gt;
&lt;li&gt;🐬 &lt;strong&gt;MySQL&lt;/strong&gt; for strong ACID guarantees
&lt;/li&gt;
&lt;li&gt;🐳 &lt;strong&gt;Docker&lt;/strong&gt; to scale across systems
&lt;/li&gt;
&lt;li&gt;🔐 &lt;strong&gt;RBAC via Django&lt;/strong&gt; (middleware + signals)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Currently working on the &lt;strong&gt;LLD&lt;/strong&gt; (schema, services). HLD coming together too. -- &lt;em&gt;coming soon&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;This journey isn’t fast — but it’s moving.&lt;br&gt;&lt;br&gt;
And that’s what matters.&lt;/p&gt;

&lt;p&gt;Sometimes, &lt;strong&gt;slow forward&lt;/strong&gt; beats a backward step.&lt;/p&gt;

&lt;p&gt;If you’re building anything similar or have thoughts on consistency vs Partition Tolerance, hit me up in the comments.&lt;/p&gt;

&lt;p&gt;See you in Week 4.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;vn-vision&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devjourney</category>
      <category>systemdesign</category>
      <category>backend</category>
      <category>blog</category>
    </item>
    <item>
      <title>DevSecOps &amp; Scale: Docker, Security, and System Design</title>
      <dc:creator>Victor Ng'ang'a</dc:creator>
      <pubDate>Mon, 19 May 2025 16:24:38 +0000</pubDate>
      <link>https://dev.to/vn-vision/devsecops-scale-docker-security-and-system-design-24pc</link>
      <guid>https://dev.to/vn-vision/devsecops-scale-docker-security-and-system-design-24pc</guid>
      <description>&lt;p&gt;This week I dove into the full spectrum of &lt;strong&gt;DevSecOps &amp;amp; System Design&lt;/strong&gt;—from building and deploying containers to hardening them, all the way through the architectural patterns that make systems scale. Here’s what I learned, why it matters, and how you can apply it in your journey too.&lt;/p&gt;




&lt;h2&gt;
  
  
  🐳 Docker Deep Dive
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why Docker?&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Portability:&lt;/strong&gt; “It works on my machine” becomes universal
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolation:&lt;/strong&gt; Dependencies and services can’t interfere
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reproducibility:&lt;/strong&gt; CI/CD pipelines run identical builds
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource Efficiency:&lt;/strong&gt; Lightweight compared to full VMs
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Hands‑On Highlights&lt;/strong&gt;  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Wrote my first &lt;code&gt;Dockerfile&lt;/code&gt; and built custom images
&lt;/li&gt;
&lt;li&gt;Orchestrated multi‐container setups with &lt;code&gt;docker-compose.yml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Deployed images locally and inspected running containers
&lt;/li&gt;
&lt;li&gt;Learned best practices: minimal base images, multi‐stage builds
&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Start with an official Python/Django image, then strip out dev tools in a second stage to keep your final image lean.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🛡️ Container Security
&lt;/h2&gt;

&lt;p&gt;Building on Docker, I explored how to &lt;strong&gt;harden a container&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scanning images for known vulnerabilities (e.g. &lt;code&gt;docker scan&lt;/code&gt;)
&lt;/li&gt;
&lt;li&gt;Running containers as non‑root users
&lt;/li&gt;
&lt;li&gt;Restricting filesystem permissions (&lt;code&gt;read‑only&lt;/code&gt; mounts)
&lt;/li&gt;
&lt;li&gt;Using Docker’s built‑in secrets management
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also mapped these practices to &lt;strong&gt;Django’s security features&lt;/strong&gt;:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OWASP Top 10 awareness (SQLi, XSS, CSRF)
&lt;/li&gt;
&lt;li&gt;Enabling &lt;code&gt;SECURE_SSL_REDIRECT&lt;/code&gt;, &lt;code&gt;X_FRAME_OPTIONS&lt;/code&gt;, etc.
&lt;/li&gt;
&lt;li&gt;Writing and testing &lt;strong&gt;signals&lt;/strong&gt; that log suspicious behavior
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Resource:&lt;/strong&gt; Check out &lt;a href="https://docs.djangoproject.com/en/stable/topics/security/" rel="noopener noreferrer"&gt;Django’s security checklist&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🔁 Cybersecurity Mindset
&lt;/h2&gt;

&lt;p&gt;Security is more than config flags—it’s a &lt;strong&gt;way of thinking&lt;/strong&gt;. I practiced:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Threat modeling&lt;/strong&gt; each feature before building it
&lt;/li&gt;
&lt;li&gt;Crafting &lt;strong&gt;unit tests&lt;/strong&gt; for signal‑based audits in Vimist
&lt;/li&gt;
&lt;li&gt;Inspecting Docker logs for anomalous behavior
&lt;/li&gt;
&lt;li&gt;Studying OWASP injection and auth attacks
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Exercise:&lt;/strong&gt; For every new endpoint, ask “What happens if someone sends malicious input?” and write a test case to prove your defenses.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🚀 System Design Foundations
&lt;/h2&gt;

&lt;p&gt;To see how all these pieces fit, I explored key architectural patterns:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concept&lt;/th&gt;
&lt;th&gt;Why It Matters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scalability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Ensure the app can handle growing load&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Load Balancing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Distribute requests evenly to prevent bottlenecks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Consistent Hashing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Minimize data reshuffling when adding/removing nodes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Message Queues&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Decouple services and absorb traffic spikes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sharding&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Split data across databases to boost performance&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Start simple—spin up two web containers behind Nginx, then add a message queue for background jobs.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  💡 Daily LeetCode
&lt;/h2&gt;

&lt;p&gt;I kept my problem‑solving sharp with a daily LeetCode challenge. Even 30 minutes each morning reinforces algorithmic patterns and prepares me for technical interviews.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔭 Next Steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Continuous Learning&lt;/strong&gt;: continue growing my skills, let's see how it goes.&lt;/li&gt;
&lt;/ol&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Key Takeaway:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Learning at the intersection of DevOps, security, and architecture transforms you from a coder into a systems thinker. Every container you build, every threat you model, and every design pattern you master compounds into real‑world resilience and scale.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;em&gt;Thanks for reading Post #2 of :&lt;/em&gt;&lt;em&gt;Code.Secure.Scale&lt;/em&gt;&lt;em&gt;.&lt;br&gt;
If you found this helpful, let’s connect and learn together!&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;– vn-vision&lt;/em&gt;    &lt;/p&gt;

</description>
      <category>devops</category>
      <category>security</category>
      <category>systemdesign</category>
      <category>docker</category>
    </item>
    <item>
      <title>I Almost Didn’t Write This — But Here’s Why I Did Anyway</title>
      <dc:creator>Victor Ng'ang'a</dc:creator>
      <pubDate>Mon, 12 May 2025 14:24:43 +0000</pubDate>
      <link>https://dev.to/vn-vision/i-almost-didnt-write-this-but-heres-why-i-did-anyway-3h18</link>
      <guid>https://dev.to/vn-vision/i-almost-didnt-write-this-but-heres-why-i-did-anyway-3h18</guid>
      <description>&lt;p&gt;This time is set aside for me to blog, improve my social media presence, and hopefully make something impactful.&lt;br&gt;
Well, here I am, chatting with my GPT model. Hey there, ChatGPT.&lt;/p&gt;

&lt;p&gt;I didn’t want to just write about anything out of the blue. I want what I post to mean something — to me, and to whoever reads it.&lt;/p&gt;

&lt;p&gt;The First Idea: Pawned Boxes&lt;br&gt;
Initially, I thought I’d write about all the different machines I’ve pawned — give a walkthrough, share some alternatives, and reflect on how I got there. The stories behind each box are personal. But I haven’t written that post yet. I haven’t even pawned all of them. So I shelved that idea for now.&lt;/p&gt;

&lt;p&gt;The Second Idea: A Day in My Life as a Developer&lt;br&gt;
Then I figured, why not take people through my day as a developer? But again, I paused. I wondered if that would really help anyone. Every dev has their routine — what would make mine worth reading?&lt;/p&gt;

&lt;p&gt;That’s when something clicked.&lt;/p&gt;

&lt;p&gt;Why Not Both?&lt;br&gt;
What if I don’t have to choose?&lt;br&gt;
What if I talk about the boxes I’ve pawned and the life I live behind the keyboard that led to those moments? What if I tell real stories, then tie them back to the developer experience — both the highs and the struggles?&lt;/p&gt;

&lt;p&gt;I could share the tech problems I face in React, Redux, TypeScript, Django, Node.js, REST APIs, Docker containers — all of it. But I want to do it differently. I want my content to mean something. Not just tutorials, but context. Real-life situations where these tools either saved me or failed me.&lt;/p&gt;

&lt;p&gt;The Question That Stays With Me: How Do I Stand Out?&lt;br&gt;
I’m still figuring that out.&lt;br&gt;
Maybe it’s my storytelling. Maybe it’s the fact that I’m living it — and not pretending to have all the answers. Maybe it’s the willingness to be honest, even when I feel unsure.&lt;/p&gt;

&lt;p&gt;Instead of keeping this thought process to myself, I decided to chat with ChatGPT.&lt;br&gt;
It may not qualify as a blog post in the traditional sense — but it’s better than waiting for the “perfect idea.”&lt;/p&gt;

&lt;p&gt;And hey, I showed up.&lt;br&gt;
I didn’t let this pass me by.&lt;br&gt;
I didn’t postpone it till I had something “worthy.”&lt;br&gt;
I just did it.&lt;/p&gt;

&lt;p&gt;And that’s where I’ll start.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;br&gt;
This isn’t the peak. It’s the beginning.&lt;br&gt;
Let’s see where this goes.&lt;/p&gt;

&lt;p&gt;vn-vision.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
