<?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: Salman Mohammad</title>
    <description>The latest articles on DEV Community by Salman Mohammad (@salman_mohammad_53a9d63c2).</description>
    <link>https://dev.to/salman_mohammad_53a9d63c2</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4134666%2Fb9e86fb8-8867-4a8d-8b36-4987a6ae6083.png</url>
      <title>DEV Community: Salman Mohammad</title>
      <link>https://dev.to/salman_mohammad_53a9d63c2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/salman_mohammad_53a9d63c2"/>
    <language>en</language>
    <item>
      <title>💰 Building Spendwise: The Tech Behind an Intelligent Personal Finance Guard</title>
      <dc:creator>Salman Mohammad</dc:creator>
      <pubDate>Sun, 20 Sep 2026 23:02:34 +0000</pubDate>
      <link>https://dev.to/salman_mohammad_53a9d63c2/building-spendwise-the-tech-behind-an-intelligent-personal-finance-guard-2554</link>
      <guid>https://dev.to/salman_mohammad_53a9d63c2/building-spendwise-the-tech-behind-an-intelligent-personal-finance-guard-2554</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Why standard budgeting apps fail, and how i combined Flask, MongoDB Atlas, and failover resilience to build a real-time spending guard.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🎯 1. The Problem: Why Traditional Budget Trackers Fail
&lt;/h2&gt;

&lt;p&gt;Most budget management applications act like passive digital receipts. You spend money, manually log expenses hours later, and only realize you've overspent when your bank balance hits zero.&lt;/p&gt;

&lt;p&gt;We built &lt;strong&gt;Spendwise&lt;/strong&gt; to flip this paradigm on its head. Instead of just tracking past expenses, Spendwise acts as an &lt;strong&gt;active financial guard&lt;/strong&gt;—evaluating transactions in real-time , providing an emergency safety buffer, and automating periodic budget rollovers.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ 2. The Technology Stack
&lt;/h2&gt;

&lt;p&gt;To deliver instantaneous UI feedback and 100% backend reliability, we engineered Spendwise using a modular, decoupled architecture:&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgvi70xma7e3wqy26regb.jpg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgvi70xma7e3wqy26regb.jpg" alt=" " width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Frontend UI Layer&lt;/strong&gt;: HTML5, CSS3 Glassmorphism System, Vanilla JavaScript (ES6+), and &lt;code&gt;SWApi&lt;/code&gt; REST bridge.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Backend REST Engine&lt;/strong&gt;: Python 3.14, Flask REST API, Gunicorn WSGI server, and APScheduler cron service.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Database &amp;amp; Security&lt;/strong&gt;: MongoDB Atlas Cloud NoSQL, PyMongo, In-Memory RAM Failover Layer, and BCrypt password hashing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Infrastructure&lt;/strong&gt;: Render Cloud Hosting, Procfile launcher, and HTTPS Multi-Gateway Email Routing over Port 443.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔄 3. How Spendwise Works: External Flow vs. System Engine
&lt;/h2&gt;

&lt;p&gt;Understanding Spendwise comes down to two perspectives: what the user sees on screen, and what the rules engine computes behind the scenes.&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw0qx74v0mzlmf1bffai3.jpg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw0qx74v0mzlmf1bffai3.jpg" alt=" " width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🌐 User Experience (External)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Wallet Setup&lt;/strong&gt;: Configure your balance, period spending limit, and emergency buffer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Check Before Spending&lt;/strong&gt;: Input item price before buying to receive instant approval feedback in &lt;strong&gt;&amp;lt;0.1 seconds&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Instant Buy &amp;amp; Sync&lt;/strong&gt;: Deduct funds and watch remaining limit update live.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Email Summary&lt;/strong&gt;: Trigger detailed financial reports sent directly to your inbox.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  ⚙️ System Mechanics (Internal Engine)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Rule 1 (Spending Guard)&lt;/strong&gt;: Approves purchase if Item&amp;nbsp;Cost≤Remaining&amp;nbsp;Limit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Rule 2 (Emergency Buffer Fallback)&lt;/strong&gt;: If limit is exceeded, verifies if Item&amp;nbsp;Cost≤Remaining&amp;nbsp;Limit+Emergency&amp;nbsp;Buffer. Consumes buffer reserve and drops remaining limit to $0.00 to prevent further overspending.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Rule 3 (Periodic Rollover Engine)&lt;/strong&gt;: Automatically carries over unused budget from previous periods when new cycles start.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💡 4. Real-Life Scenario: Meet Alex
&lt;/h2&gt;

&lt;p&gt;Let's look at how Spendwise protects a real user in practice:&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frikr2q77r5zmfirilv8y.jpg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frikr2q77r5zmfirilv8y.jpg" alt=" " width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Initial Setup&lt;/strong&gt;: Alex starts with &lt;code&gt;$1,000&lt;/code&gt; Balance, &lt;code&gt;$200&lt;/code&gt; Weekly Limit, and &lt;code&gt;$50&lt;/code&gt; Emergency Buffer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🟢 &lt;strong&gt;Transaction 1 ($40 Headphones)&lt;/strong&gt;: Within limit. Spendwise approves it, leaving &lt;code&gt;$160&lt;/code&gt; limit and &lt;code&gt;$960&lt;/code&gt; balance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🟡 &lt;strong&gt;Transaction 2 ($180 Laptop Charger)&lt;/strong&gt;: Exceeds &lt;code&gt;$160&lt;/code&gt; limit by &lt;code&gt;$20&lt;/code&gt;. Spendwise triggers the Emergency Buffer, absorbing &lt;code&gt;$20&lt;/code&gt; from the reserve, setting remaining limit to &lt;code&gt;$0.00&lt;/code&gt;, and updating balance to &lt;code&gt;$780&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🔴 &lt;strong&gt;Transaction 3 ($100 Smartwatch)&lt;/strong&gt;: Alex tries to buy a smartwatch. Since limit is &lt;code&gt;$0.00&lt;/code&gt; and buffer is &lt;code&gt;$30.00&lt;/code&gt;, Spendwise declines the transaction, saving Alex from overspending.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;📩 &lt;strong&gt;Transaction 4 (Email Summary)&lt;/strong&gt;: Alex clicks "Send Email Report" and receives a summary in his inbox.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛡️ 5. Technical Highlights &amp;amp; High Availability
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-Gateway HTTPS Email Routing (Port 443 Resilience)&lt;/strong&gt;: Cloud platforms like Render block raw TCP SMTP ports (25, 465, 587). Spendwise uses a resilient HTTPS API cascade: Mailtrap⟶Mailjet⟶SendGrid⟶Brevo⟶Resend&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Zero-Downtime Hybrid Database Failover&lt;/strong&gt;: If cloud MongoDB Atlas is starting up or temporarily unreachable, Spendwise seamlessly activates an &lt;strong&gt;In-Memory RAM Store&lt;/strong&gt;, guaranteeing zero 500 errors during testing.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🔗 6. Links &amp;amp; Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;🚀 &lt;strong&gt;Live Deployed Application&lt;/strong&gt;: &lt;a href="https://spendwise-f62y.onrender.com/index.html" rel="noopener noreferrer"&gt;Click Here&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;💻 &lt;strong&gt;GitHub Source Code Repository&lt;/strong&gt;: &lt;a href="https://github.com/MDS53/Spendwise" rel="noopener noreferrer"&gt;Click Here&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🎯 6. Key Takeaways
&lt;/h2&gt;

&lt;p&gt;Building Spendwise taught us that great fintech applications aren't just about recording data—they're about &lt;strong&gt;protecting user behavior in real-time&lt;/strong&gt;. By pairing instant UI feedback with resilient serverless architecture, you create a system that users can rely on every day.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Created for the Spendwise Project Documentation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>backend</category>
      <category>database</category>
      <category>python</category>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
