<?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: Ayush Mishra</title>
    <description>The latest articles on DEV Community by Ayush Mishra (@ayush_mishra_9ca4577790d3).</description>
    <link>https://dev.to/ayush_mishra_9ca4577790d3</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%2F4071247%2F7e368edc-5122-4ad4-8545-49113987c330.jpg</url>
      <title>DEV Community: Ayush Mishra</title>
      <link>https://dev.to/ayush_mishra_9ca4577790d3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ayush_mishra_9ca4577790d3"/>
    <language>en</language>
    <item>
      <title>Why Zod Crashed My Node.js Server</title>
      <dc:creator>Ayush Mishra</dc:creator>
      <pubDate>Mon, 31 Aug 2026 15:49:39 +0000</pubDate>
      <link>https://dev.to/ayush_mishra_9ca4577790d3/why-zod-crashed-my-nodejs-server-e7h</link>
      <guid>https://dev.to/ayush_mishra_9ca4577790d3/why-zod-crashed-my-nodejs-server-e7h</guid>
      <description>&lt;p&gt;Today, when I was creating my project, there was an interesting bug occurred in my Postman. When using Zod, it crash my server completely.&lt;/p&gt;

&lt;p&gt;I am first time using the Zod in my project. Although it is made for the TypeScript, but it also works well with the JavaScript.&lt;/p&gt;

&lt;p&gt;Basically, Zod in simple language use to check the inputs of data which you are moving in the backend, like if it is good or not. Even the input come in &lt;code&gt;req.body&lt;/code&gt;, &lt;code&gt;req.params&lt;/code&gt;, &lt;code&gt;req.headers&lt;/code&gt;, etc., but generally use for the input validation of the input come in body and params from the outside.&lt;/p&gt;

&lt;p&gt;I was think this saves my lot of effort and make code more scalable. Through its working, I am at least able to remove that input checks in every controller or business logic to validate the input is correct or not.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Setup and The Crash
&lt;/h2&gt;

&lt;p&gt;But it cause the server crash. I was create a specific middleware for the Zod with name of &lt;code&gt;validator&lt;/code&gt;, so it call the specific validator file in the folder written by using Zod as an universal middleware. So, I can add the check in the router and things become easy.&lt;/p&gt;

&lt;p&gt;Here is the code of my Zod schema setup to validate the inputs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;usernameRule&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;required_error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Username is required&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Username must be at least 3 characters long&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Username cannot exceed 20 characters&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;emailRule&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;required_error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Email is required&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;email&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Invalid email address format&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;registerSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;usernameRule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;emailRule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When I check the things in the Postman to test the setup is working or not, interesting thing happen. I got the internal server error (500) status code and message inside my controller. I think maybe due to wrong any configuration. I check the flow end to end properly and cross verify the configuration on internet and even the AI. I don't get the bug even in the middleware. Then, after lot of struggle, I found it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Investigation: throw vs next()
&lt;/h2&gt;

&lt;p&gt;It was due to these line in the code: &lt;code&gt;throw new ApiError()&lt;/code&gt;. Generally this line simple throw the error. Here &lt;code&gt;ApiError()&lt;/code&gt; is my custom error class, not the global error handler itself. But in middleware case, I miss one thing that is important, which is &lt;code&gt;next()&lt;/code&gt; as a wrapper. But question here is why throw work in the controller, but not in middleware, which cause my Zod crash and things bad?&lt;/p&gt;

&lt;p&gt;Basically I found it that, middleware is a check comes in middle and move the cycle further of the request so the controller do its work. So I found that concept effect in real life after search that Express &lt;code&gt;next()&lt;/code&gt; is not only used for the moving cycle further for only controller or next middleware, but also to pass errors to the global error handler. That's why we need to use &lt;code&gt;next()&lt;/code&gt; upon the throw to pass it to my global error handler.&lt;/p&gt;

&lt;p&gt;Here is the code of the fixed validation middleware using the try/catch and next() wrapper:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ApiError&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../error/ApiErrors.error.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;validate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;body&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;safeParse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;success&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; 
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;errorMessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
            &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;?.[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]?.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
            &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;errors&lt;/span&gt;&lt;span class="p"&gt;?.[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]?.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
            &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Invalid input data&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ApiError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;errorMessage&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;VALIDATION MIDDLEWARE CRASHED:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ApiError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Validation middleware crashed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Hidden Magic of asyncHandler
&lt;/h2&gt;

&lt;p&gt;Whereas I encounter this problem in this case first time because my old wrapper done this job for me as a sake of the error, which name is &lt;code&gt;asyncHandler&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When the authentication middleware called, since I don't use the &lt;code&gt;next()&lt;/code&gt; in middleware, this thing cause server crash and async error. But my &lt;code&gt;asyncHandler&lt;/code&gt; wrapper catch it and do the &lt;code&gt;next()&lt;/code&gt; to the error, cause the things work. After the test and code is in production, this thing I cannot catch if this problem not happen with me today.&lt;/p&gt;

&lt;p&gt;Here is the code of the asyncHandler that was hiding the magic from me:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;asyncHandler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;requestHandler&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;requestHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;asyncHandler&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>node</category>
      <category>express</category>
      <category>javascript</category>
      <category>backend</category>
    </item>
    <item>
      <title>Planning an AI Health Surveillance System</title>
      <dc:creator>Ayush Mishra</dc:creator>
      <pubDate>Sun, 23 Aug 2026 11:45:53 +0000</pubDate>
      <link>https://dev.to/ayush_mishra_9ca4577790d3/planning-an-ai-health-surveillance-system-ehg</link>
      <guid>https://dev.to/ayush_mishra_9ca4577790d3/planning-an-ai-health-surveillance-system-ehg</guid>
      <description>&lt;p&gt;The Smart India Hackathon (SIH) problem statements is based on real life problems actually faced by the government of India different ministries, and solution proposed in them often lead to the real world implementation based on how good idea you have and how better implementation you have too.&lt;/p&gt;

&lt;p&gt;So, I take the problem statement of the SIH of last year and try to think and build solution from my side just as a fun with this and I don't claim this is a good idea it just a try. These government problems is real world problems so students who is always telling about we want real world project ideas this is one of those kind problem statements which really improve your skills, this things actually work if you not win hackathon you definitely learn skills and build industry grade real world project for at least portfolio and there is no shortage of ideas .Also open for suggestion to improve my plans.&lt;/p&gt;

&lt;h2&gt;
  
  
  problem Statement
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Title:&lt;/strong&gt; &lt;em&gt;Smart Community Health Monitoring and Early Warning System for Water-Borne Diseases in Rural Northeast India&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Description:&lt;/strong&gt; &lt;em&gt;Water-borne diseases like diarrhea, cholera, typhoid and hepatitis A are common across rural and tribal belts of the Northeast, especially during monsoon, largely due to contaminated water sources and weak sanitation infrastructure. The ask is a Smart Health Surveillance and Early Warning System that: collects health data from local clinics, ASHA workers and community volunteers via mobile app or SMS; applies AI/ML to detect outbreak patterns from symptoms, water-quality reports and seasonal trends; integrates with water-testing kits or IoT sensors monitoring turbidity, pH and bacterial presence; pushes real-time alerts to district health officials; offers a multilingual interface for community reporting; and gives health departments a dashboard to visualize hotspots and allocate resources.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Functional :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Receive data via smartphone app, basic SMS, and automated IoT sensor streams. Means the data come in bundle in one go.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Detect localized symptom spikes before clinical diagnoses are confirmed. the disease pattern using simulated data or trend analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Push dynamic alerts to District Medical Officers (DMOs) based on severity thresholds. alerts through apps and SMS services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GIS-mapped heatmaps showing active clusters and real-time hospital bed/medicine inventory. integrate the inventory and beds availability data and generate heat map after data simulation and AI trend detection.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Support for Assamese, Bengali, Bodo, Hindi, English,other local languages by having the language translation model for SMS and the app both.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  NON-Functional :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The mobile app must allow data entry without internet and auto-sync immediately upon network reconnection.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IoT protocols and app payloads must be aggressively compressed (measured in bytes, not kilobytes).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Must adhere to India's DISHA (Digital Information Security in Healthcare Act) guidelines.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The ingestion and alerting APIs must maintain 99.99% uptime, especially during monsoon-triggered mass events.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Constraints :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Connectivity:&lt;/strong&gt; Means You not continuously sync the data from the phone. So data will come in burst. due to high hills and forest regions or low connectivity regions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sensor Calibration:&lt;/strong&gt; Due to weather conditions sensors information can be inaccurate. Sensor can be damaged or may be distorted from accuracy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Literacy &amp;amp; UI/UX:&lt;/strong&gt; Humans are not machines ASHA workers is also human if calibration is taking long time and feel like a exam no one will continue to it properly so solution need to be highly visual and quick data collection.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SMS Formatting:&lt;/strong&gt; There is chance of the SMS based data collection contain local slang and typos.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Plan
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The ASHA workers collect data from the _ &lt;strong&gt;React Native&lt;/strong&gt; _ application. and the data is collected using the _ &lt;strong&gt;SQLite&lt;/strong&gt; _ or _ &lt;strong&gt;WatermelonDB&lt;/strong&gt; _, if there was no internet the data will be queue in database locally, if app is not working then SMS service.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Machine send the raw telemetry message, which we made compressed via _ &lt;strong&gt;Protocol Buffers&lt;/strong&gt; _ over _ &lt;strong&gt;MQTT&lt;/strong&gt; _.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;when internet come ASHA worker data will sync not bombard way in a queue on main server without losing data. Simultaneously the backend also decompress the sensor data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the Check on the machine data does it will sending distorted data we can mark it easily and filter out also we can figure out the which sensor is not good.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We add the massive data cleaning organising and sorting. also use different data science methods to get the appropriate data ,And save it into the database of _ &lt;strong&gt;MongoDB&lt;/strong&gt; _ or _ &lt;strong&gt;PostgreSQL&lt;/strong&gt; _ for feeding the AI.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then the _ &lt;strong&gt;Node.js&lt;/strong&gt; _ server sending the HTTP request to the isolated _ &lt;strong&gt;Python&lt;/strong&gt; _ microservice where we Simulate the environment properly including this new data and various different real time government and scientific data like geographical regions, location, symptoms, weather, season, timeline, medical past record of the region, biodiversity, etc. using existing _ &lt;strong&gt;Python&lt;/strong&gt; _ library which help to simulate data, and sharing of data mostly in real time using the _ &lt;strong&gt;Kafka&lt;/strong&gt; _.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In there using those simulation data we can generate heat map of the location.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;And the edge computing backend framework server take all real time data from _ &lt;strong&gt;MongoDB&lt;/strong&gt; _ database and _ &lt;strong&gt;Python&lt;/strong&gt; _ microservice and send it to the AI API endpoint. The AI analyze massive context and Generate localised outbreak risk score using mathematics and different operations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dashboard update and heat map updated of the admin side of the district health officials and also alerts is given to them through app and also SMS, why because low connectivity region this SMS is helpful.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Special care
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;We have to intentionally design the app for ASHA worker minimal and more visual so that it does not overwhelm them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;we intentionally have data in bytes not too big otherwise apply compressor and decompressor both end.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;we use edge computing and edge networking technology so the information can be send from anywhere with minimum latency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;the communication between the sensor and the microservices is on _ &lt;strong&gt;Kafka&lt;/strong&gt; _ so that real time data is collected even between other government geographical data and medical database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;we add the multilingual translator also in the express side so the SMS done in native side is easily predictable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If possible then we enforce the native SMS structuring like this format if SMS come then more better.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;we introduce the reward system but authentic one so ASHA workers is rewarded for the real data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;we demand the location information even there was a service which translate the address into the GPS coordinates easily from backend side.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;for data from sensor we add _ &lt;strong&gt;Kafka&lt;/strong&gt; _ to sit directly behind _ &lt;strong&gt;MQTT&lt;/strong&gt; _ broker which queue capture incoming data instantly and holds safely into memory.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This plan is not sure perfect for the real world, try my best but also I don't consider cost effectiveness in this case of plan which is also a necessary part. and also testing things here too. which is considerable also. There was a mention of the input devices otherwise My plan was I should made the highly portable alerting systems which can do the alert anywhere easily using AI , like services already exist in the world. Humm. creating this scalable site is good and big project for the individual programmer I hope I may be develop this for now Please give suggestion if you have to improve this things. comment below and what you think is my plan good enough to execute.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>softwaredevelopment</category>
      <category>aiagents</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>Hacking DSA: My Blueprint - feedback</title>
      <dc:creator>Ayush Mishra</dc:creator>
      <pubDate>Mon, 17 Aug 2026 13:22:25 +0000</pubDate>
      <link>https://dev.to/ayush_mishra_9ca4577790d3/hacking-dsa-my-blueprint-feedback-1c2a</link>
      <guid>https://dev.to/ayush_mishra_9ca4577790d3/hacking-dsa-my-blueprint-feedback-1c2a</guid>
      <description>&lt;p&gt;Since, I am a Fresher student who is in their learning journey and DSA is one of the important part of it. everyone Has to go with it.&lt;/p&gt;

&lt;p&gt;But, You got lot of advice online you should do this or that thing to go with it. Which is good but Also confusing at the same time.&lt;/p&gt;

&lt;p&gt;Many students go with Brute force approach and grind all day to learn the DSA. Generally doing leet code or hacker rank 300 plus questions. But as a lazy guy. i try to find the good way to do this thing, And i know i am not the only one doing this way. But this whole idea is mostly generated by me and ai.&lt;/p&gt;

&lt;p&gt;And i am just in Testing phase So you can advice me to grow and doing the dsa in the simplest way. Here i explain my plan with my thought process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Plan:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;There is a Law in nature. Which is famously called 80/20 Principle. which say _ &lt;strong&gt;roughly 80% of results come from 20% of causes or efforts.&lt;/strong&gt; _ Using this i came to conclusion that their is mostly 6 to 8 data structure and 15 to 20 Algorithms is motly asked in companies and generally used in real life most of the time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The purpose, Why companies ask DSA ? Answer: to test ability of candidate, to solve and write optimised, scalable programs under constrains. which includes you ability to translate the solution into program, thinking process, pattern Recognition and problem solving skills. This clear my approach how to deal with dsa.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then resources simple Neetcode 150, &lt;strong&gt;Striver A2Z DSA Sheet&lt;/strong&gt; (created by Raj Vikramaditya on his platform &lt;em&gt;takeUforward&lt;/em&gt;) for roadmap Contain those algorithm which i say just for tracking purpose, youtube channels which explain me from first order like how behave in memory,pros,cons,tradeoff,etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The programming language: See my core stack is javascript because i do most of the coding in it. but for the dsa i want something strategic which help me the most and i also enough coding in it. because as we know javascript is bit unpredictable... I don't think , But python provides very less syntax overhead, enough resources,phycologically fast readablity,etc. i choose this. also this is my second best programming language because first is javascript.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Process:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Learn Time and space Complexity, as much as i can tell by seeing any algorithm that this is time and space complexity of it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;take data structure and Do the CRUD operation. why? Because in programming language you initially don't know how to create those data structure like except array no one know how to make linked list in python or may be tree.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Instantly, prepare for the algorithm for that data structure specific. like i choose array then i also learn its algorithm from those 15 to 20 before going to next data structure, because the knowledge is fresh in your mind currently&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do the Neet code 150 questions on that algorithm specific, and also if possible i record my thought process of solving the things or approaching problem if it is Convenient or get me advantage this is test phase.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When i am satisfied, i am able to solve the problem then move to next data structure and repeate the loop. The main goal is to build understanding, thinking,knowledge and use them properly. The whole plan takes 5 to 8 loops depend on the data structure and may be 1 or 3 month i guess. Depend on ability to learn.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;See, i make this plan as per my knowledge and understanding level their is definately a problems in this i am open to update and change in it and May be this thing help someone to learn and grow. i can just do my work properly that's it. i am currently starting the journey not sure what will come forward i am in third year of my degree of Bsc IT.&lt;/p&gt;

</description>
      <category>dsa</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>The automation post pipeline</title>
      <dc:creator>Ayush Mishra</dc:creator>
      <pubDate>Tue, 11 Aug 2026 12:33:41 +0000</pubDate>
      <link>https://dev.to/ayush_mishra_9ca4577790d3/the-automation-post-pipeline-4c56</link>
      <guid>https://dev.to/ayush_mishra_9ca4577790d3/the-automation-post-pipeline-4c56</guid>
      <description>&lt;p&gt;I am testing my first automated end to end social media post automation system. which is created using the free tools. But it is very efficient and productive. i can use this thing in future posting on various platforms to tell people about my learning's and update about me.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Tools :&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://Make.com" rel="noopener noreferrer"&gt;Make.com&lt;/a&gt; = I use this tool to mainly automate my system it include flow how things works and system is linked.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hashnode = I use this as a central blog and article publishing tool other tools is connected with it so content links is properly distributed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Google Ai Studio = I use this to integrate the ai in between this whole process which just do small job to add the engaging hook and the tags for the reach&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Buffer = I use to connect X (twitter) with this Because &lt;a href="http://Make.com" rel="noopener noreferrer"&gt;Make.com&lt;/a&gt; remove the platform X (twitter) to His integration. After the policy change of the platform.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://Dev.to" rel="noopener noreferrer"&gt;Dev.to&lt;/a&gt; = I use this to improve SEO of my post over the google &lt;strong&gt;search&lt;/strong&gt; engine.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Challenges&lt;/strong&gt; :
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I cannot integrate the github actions with the hashnode becuase this feature is become paid on hashnode. May be in future i can do this thing using self written yml file, i am guessing Not sure will this 100 % work or not.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Twitter integration as i described early that twitter integration is not present in the &lt;a href="http://make.com" rel="noopener noreferrer"&gt;make.com&lt;/a&gt; so i use the another tool Buffer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The limits calculation, Their was a limits on each tools for their specific use case so i have to intentionally calculate them properly. Even the free tear of the twitter which is X is few hundreds words that's why i have to limit the text of the post, which is hook only, The threads creation i don't think it will be their in this tools which i am using, i will definitely find it if their.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Solutions :
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Simply use other Way if this way is closed, use different tool for twitter&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;May be in future i create yml file for the github actions but for now i am directly writing on hashnode.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;a href="http://dev.to"&gt;dev.to&lt;/a&gt; does not provide feature of direct posting it save your cycle into draft so you have to manually click on publish button. i choose once a week i will do for all the posts. Because these posts is My documentation of journey. Or May be an &lt;strong&gt;Assets&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>automation</category>
      <category>devops</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
