<?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 Kunal Kejriwal on Medium]]></title>
        <description><![CDATA[Stories by Kunal Kejriwal on Medium]]></description>
        <link>https://medium.com/@kunal.resolute?source=rss-ff73a5145bcc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*10S7saTfRreJMxe6</url>
            <title>Stories by Kunal Kejriwal on Medium</title>
            <link>https://medium.com/@kunal.resolute?source=rss-ff73a5145bcc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 08:41:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kunal.resolute/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[The Salesforce API Limit Isn’t One Number — It’s Five, and the Wrong One Will Take You Down]]></title>
            <link>https://medium.com/@kunal.resolute/salesforce-api-limit-f77480742cf2?source=rss-ff73a5145bcc------2</link>
            <guid isPermaLink="false">https://medium.com/p/f77480742cf2</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[salesforce]]></category>
            <dc:creator><![CDATA[Kunal Kejriwal]]></dc:creator>
            <pubDate>Mon, 07 Sep 2026 11:44:38 GMT</pubDate>
            <atom:updated>2026-09-07T11:44:38.421Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I recently wrote a deep-dive guide for Getint on Salesforce integration limits. This is the short version — the ideas that changed how I design integrations, and why. The full 14-minute guide, with benchmarks and setup walkthroughs, is </em><a href="https://www.getint.io/blog/salesforce-integration-limits"><em>on the Getint blog</em></a><em>.</em></p><p>Every Salesforce integration failure story I’ve seen follows the same arc. The build goes well. Auth works, field mappings get signed off, the sandbox sync runs clean for two weeks. Then, a few days after launch, everything in the org stops at once — your integration, the marketing platform, the finance reporting sync — all returning the same HTTP 403: REQUEST_LIMIT_EXCEEDED.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kkZz92uihzy7X8cbeG7llA.png" /></figure><p>Nobody deployed anything. Data volume was normal. What actually happened, more often than not, is that a retry loop found a record that could never save and spent hours discovering that one API call at a time.</p><p>The root cause is never the code. It’s the framing: teams treat Salesforce limits as an operations problem to handle after launch, when they’re really an architecture constraint. Almost every design decision — polling interval, batching strategy, retry policy — carries a quota cost, and most teams never price it.</p><h3>There is no “the limit”</h3><p>People talk about the Salesforce API limit as a single number. There are at least five, and they live in separate buckets:</p><ol><li><strong>Daily API requests</strong>, measured over a <em>rolling</em> 24-hour window — burn through your quota at 3pm and you’re not clear at midnight, you’re clear around 3pm tomorrow.</li><li><strong>Bulk API batches</strong> — a completely separate allocation of 15,000 batches per day. Moving high-volume writes to Bulk 2.0 doesn’t shave a percentage off your consumption; it relocates the work to a different bucket almost entirely.</li><li><strong>Concurrent long-running requests</strong> — capped at 25, with no soft landing. This is the limit almost nobody writes about, and the one most likely to page you at 2am.</li><li><strong>Request timeouts</strong> — ten minutes per request, covering <em>all</em> subrequests in a Composite call.</li><li><strong>Event delivery allocations</strong> for Platform Events and Change Data Capture.</li></ol><p>The daily limit is soft; the concurrency limit isn’t. Knowing which bucket your workload draws from is most of the design work.</p><h3>What the same workload costs, six different ways</h3><p>For the guide, I ran an identical workload — 1,000 Accounts and 2,000 Contacts — through six write strategies against a Developer Edition org and watched the counter:</p><ul><li><strong>Check-then-write</strong> (query first, then insert or update): ~6,000 calls. That’s 40% of a Developer org’s daily quota to sync 3,000 records <em>once</em>.</li><li><strong>Upsert by External ID</strong>: ~3,000 calls, plus idempotency for free — a redelivered webhook can no longer create a duplicate.</li><li><strong>sObject Collections</strong> (200 records per call): ~15 calls.</li><li><strong>Bulk API 2.0</strong>: ~6 calls plus one batch, charged mostly to the separate Bulk bucket.</li></ul><p>The gap between the worst and best strategy is three orders of magnitude, and none of the expensive patterns look wrong in code review. That’s what makes them dangerous.</p><h3>The two things that actually drain an org</h3><p>Neither is record volume. <strong>Polling</strong> costs the same whether anything changed or not — five objects at sixty-second intervals is 7,200 calls a day against a completely idle org. And <strong>retry storms</strong> are worse: a validation-rule rejection is not a transient error, and retrying it a thousand times buys you a thousand identical rejections. Classify errors <em>before</em> writing retry code — transient failures get exponential backoff with jitter, terminal ones go straight to a dead-letter queue.</p><h3>Build vs. platform</h3><p>Nothing in the guide can be bypassed. Salesforce’s allocations apply to every caller equally — no integration tool gets a private lane, and any vendor implying otherwise deserves suspicion.</p><p>What a platform like <a href="https://www.getint.io/">Getint</a> changes is <em>who implements the optimisations</em> and whether they’re still correct two years from now. Getint’s Salesforce connector authenticates through the same External Client App flow the guide walks through, and past that point the decisions the article spends three thousand words on — which fields sync, in which direction, how records stay correlated across runs, how failures surface before they become a 403 — become configuration instead of code your team maintains forever.</p><p>My honest framing, from the article: if you’re syncing a few hundred records a day between two systems and you enjoy this class of problem, build it yourself — the guide is most of the design work. If you’re syncing across several tools and non-developers need to change mappings without a deployment, the real question isn’t what a strategy costs in API calls. It’s who’s on the hook when Salesforce revises an allocation in the next release.</p><p><strong>Read the full guide</strong> — including External Client App setup, OAuth flow selection, monitoring with Sforce-Limit-Info, and the six questions to answer before building — on the Getint blog: <a href="https://www.getint.io/blog/salesforce-integration-limits">Salesforce Integration Limits: A Developer&#39;s Guide (2026)</a></p><p><em>Kunal Kejriwal is a backend engineer and technical writer specializing in APIs, integrations, and scalable system design.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f77480742cf2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA["Sticky" Tech is a Trap. Here's the Escape Plan for Founders.]]></title>
            <link>https://medium.com/@kunal.resolute/avoid-vendor-lock-in-api-infrastructure-flexibility-ceee9f9d33af?source=rss-ff73a5145bcc------2</link>
            <guid isPermaLink="false">https://medium.com/p/ceee9f9d33af</guid>
            <category><![CDATA[cto]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Kunal Kejriwal]]></dc:creator>
            <pubDate>Tue, 21 Apr 2026 11:19:15 GMT</pubDate>
            <atom:updated>2026-04-21T11:19:15.237Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why We Built a Product That’s Easy to Quit (And Why You Should Use It)</h3><p>There is a common playbook in SaaS: <strong>Hook them early, make it hard to leave.</strong> It’s called “Vendor Lock-in,” and it’s a brilliant business strategy — but it’s a terrible way to treat developers and founders.</p><figure><img alt="Illustration of a developer breaking out of a locked server cage into a vibrant digital landscape of JSON, CSV, and Excel data icons." src="https://cdn-images-1.medium.com/max/1024/1*GTLcKxvknqj4tkt2bbf_fA.png" /></figure><p>Most infrastructure tools are designed like <strong>lobster traps</strong>: <em>easy to slide into, but impossible to leave without breaking something</em>. As a founder, you’re told to move fast and pivot often. But how can you pivot when your data is locked in a proprietary cage and your schema is set in stone?</p><p>I didn’t build <a href="https://theapiengine.com/quickstart"><strong>APIEngine</strong> </a>to be another cage. I built it to be an engine. And engines are designed to move.</p><h3>The Architecture of Anxiety</h3><p>Early-stage founders face a constant paradox. You need to build a production-grade backend <em>yesterday</em>, but you also know that your product requirements will probably change by next Tuesday.</p><p>If you choose a rigid platform, every pivot comes with a “migration tax.” You spend weeks refactoring instead of iterating. Eventually, you stop innovating because the technical debt of your “flexible” tool is too high.</p><h3>Engineering for the “Exit Strategy”</h3><p>At APIEngine, we have a radical philosophy: <strong>We believe we should earn your business every single day.</strong> If our platform stops serving your needs, you should be able to leave. Period. We aren’t interested in holding your data hostage to pad our retention metrics. That’s why we’ve baked “freedom” into the core architecture.</p><h4>1. True Data Sovereignty (One-Click Portability)</h4><p>Most tools treat “Export” as a hidden feature they hope you never find. We put it front and center. Whether you need a JSON for your local environment, a CSV for your marketing team, or an Excel sheet for an investor, your data is always yours.</p><figure><img alt="APIEngine dashboard interface highlighting the ‘Export JSON’ and ‘Export CSV’ buttons for easy data portability." src="https://cdn-images-1.medium.com/max/1024/1*_JT14V5jHFK2EMHHQhdbMg.png" /></figure><blockquote><strong><em>Technical Reality:</em></strong><em> We provide clean, structured exports that look just as good in VS Code as they do in your production database. No weird proprietary formats. No data scrubbing required.</em></blockquote><figure><img alt="A clean, structured JSON data export from APIEngine being viewed in a Visual Studio Code editor." src="https://cdn-images-1.medium.com/max/1024/1*bx5R-ZKVqSrpkfqDBiWqiA.png" /></figure><p><strong><em>Checkout the </em></strong><a href="https://theapiengine.com/quickstart"><strong><em>APIEngine — Quickstart Guide</em></strong></a><strong><em> to setup your JSON-database, and make your first REST API call, total, in under 5 minutes.</em></strong></p><h4>2. Beyond Mocks: Behavioral Simulation</h4><p>We don’t just “mock” data; we simulate production reality. Need to see how your app handles a 404 Not Found, a 429 Rate Limit, or a total Auth Rejection?</p><figure><img alt="The APIEngine Simulation Workspace showing a high-level overview of active endpoints, request logs, and simulation metrics." src="https://cdn-images-1.medium.com/max/1024/1*L2QLJ-sgqiLmUwT64xZKfw.png" /></figure><p>With our <a href="https://theapiengine.com/simulator"><strong>Simulation Workspace</strong></a>, you can inject failures and latency into your endpoints with a toggle.</p><figure><img alt="Technical configuration view of an APIEngine endpoint showing response status codes and JSON body customization." src="https://cdn-images-1.medium.com/max/741/1*1ripd6eqluyq6asGTZTvyw.png" /></figure><p>You aren’t just testing “happy paths” — you’re battle-testing your infrastructure before you even write a line of backend code.</p><figure><img alt="Postman interface demonstrating a successful 404 Not Found error simulation triggered by an APIEngine endpoint." src="https://cdn-images-1.medium.com/max/757/1*8LcKqrhJdj3foH1hwJpcUQ.png" /></figure><h4>3. “Scenarios” — Your Chaos Engineering Playbook</h4><p>What happens if Stripe goes down? What if your auth provider starts throwing errors?</p><figure><img alt="APIEngine ‘Scenarios’ dashboard showing an active simulation playbook for testing complex API failure states." src="https://cdn-images-1.medium.com/max/764/1*a-nOzYCe_E8HBRD5trQ4pA.png" /></figure><p>In APIEngine, you can group endpoints into <a href="https://theapiengine.com/simulator/scenarios"><strong>Scenarios</strong></a>. Activate a “Stripe Down” playbook with one click and see if your frontend actually handles the error or just crashes.</p><h3>The “No-Risk” Infrastructure</h3><p>I know what it’s like to balance a budget while trying to build a world-changing product. You shouldn’t have to pay for the privilege of testing your own ideas.</p><p>That’s why we’ve made the entry point as low as possible. No credit cards, no “gotchas” — just the tools you need to build:</p><ul><li><strong>5,000 Records</strong> to establish your core logic.</li><li><strong>10,000 Raw JSON records</strong> for your heavy lifting.</li><li><strong>Full Feature Access:</strong> Because a “lite” version is just another form of lock-in.</li></ul><h3>Build for Today. Plan for Freedom.</h3><p>Don’t build your startup on borrowed ground. Use tools that respect your right to grow, change, and — if necessary — move on.</p><p>We’ll be here to power your growth until you’re ready to fly. And when that day comes, we’ll even help you pack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XVm-ZGflAHA_UmOmAJBmEw.png" /></figure><p><strong>Are you tired of being locked in? [Check out </strong><a href="https://theapiengine.com/"><strong>APIEngine</strong></a><strong>] and start building with an exit strategy in mind.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ceee9f9d33af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Building Backends: Why Your Startup Needs APIEngine to Ship 10x Faster]]></title>
            <link>https://medium.com/@kunal.resolute/apiengine-the-modern-backend-platform-c8c8506044c7?source=rss-ff73a5145bcc------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8c8506044c7</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[backend-as-a-service]]></category>
            <dc:creator><![CDATA[Kunal Kejriwal]]></dc:creator>
            <pubDate>Mon, 20 Apr 2026 18:12:24 GMT</pubDate>
            <atom:updated>2026-04-20T18:12:24.899Z</atom:updated>
            <content:encoded><![CDATA[<h3>Stop Building Backends: Why Your Startup is Moving Too Slow</h3><h3>Building a Backend is a Waste of Your Time (and Your Seed Round)</h3><p>You have a killer idea. You’ve mapped out the UI. You’re ready to change the world.</p><p>Then, you hit the “Infrastructure Wall.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BcG8hi5SekSZep1U_5H2Lw.png" /><figcaption>Why modern product teams are trading custom infrastructure for instant scalability, and how APIEngine steps in to accelerate your MVP!!</figcaption></figure><p>You spend three weeks setting up an Express server. Another two weeks on JWT authentication and role-based access control. You wrestle with database schemas, CORS headers, and webhook listeners. Before you’ve even shipped your first feature, you’re 1,000 lines deep into boilerplate code that every other startup on Earth has already written.</p><p><strong>This is the hidden tax of modern development.</strong> We are living in an era of “Backend Fatigue.” While frontend tools have evolved at lightspeed, backend development still feels like reinventing the wheel with every new repository.</p><h3>The Broken Status Quo</h3><p>Traditional backend development is broken. It’s not just the coding — it’s the maintenance. Every custom-built system is a liability. You aren’t just building a feature; you’re building a complex web of dependencies that you’ll have to patch, scale, and secure forever.</p><p>For a startup, time is the only currency that matters. Every hour spent debugging a CRUD engine is an hour you aren’t talking to users or refining your product-market fit.</p><h3>Enter APIEngine: The Modern Backend Platform</h3><p>What if you could skip the infrastructure phase entirely?</p><p><strong>APIEngine</strong> is designed to be the “Engine” under the hood of the world’s next great SaaS products. It provides a robust, enterprise-grade backend infrastructure that launches instantly. No more manual database provisioning. No more repetitive API documentation.</p><p>It’s the <strong>fastest way to build APIs</strong> without sacrificing the control that developers crave.</p><h4>What’s Under the Hood?</h4><p>APIEngine isn’t just a database; it’s a full-stack orchestration layer:</p><ul><li><strong>Instant CRUD Engines:</strong> Turn your data models into functional REST APIs in seconds.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WpOwJDGQcR-0GTzvhX2Gxg.png" /></figure><ul><li><strong>Built-in Auth &amp; RBAC:</strong> Secure your app with production-ready user management and roles.</li><li><strong>SON Database Support:</strong> Flexible schema management that grows with your needs.</li><li><strong>Webhooks &amp; Logic:</strong> Connect your backend to the rest of the internet without friction.</li><li><strong>Auto-Generated Docs:</strong> Your API documentation stays updated in real-time.</li></ul><h3>Who is APIEngine For?</h3><p>Whether you are a <strong>SaaS founder</strong> looking to launch in days rather than months, or a <strong>technical lead</strong> at an agency tired of billing clients for boilerplate setup, APIEngine fits the workflow:</p><ul><li><strong>Indie Hackers:</strong> Ship your MVP before the weekend is over.</li><li><strong>Product Teams:</strong> Build internal tools and dashboards without distracting your core dev team.</li><li><strong>Enterprises:</strong> Scale with confidence using infrastructure designed for high-concurrency workloads.</li></ul><h3>The Future of Building</h3><p>We are moving toward a “composable” web. The companies that win are those that focus 100% on their <strong>unique value proposition</strong> and 0% on the plumbing.</p><p>Building your own backend from scratch in 2026 is like generating your own electricity to run an office. It’s possible, but it’s probably not why you started the business.</p><p><strong>Stop building infrastructure. Start building your product.</strong></p><p><strong>Explore how APIEngine can accelerate your roadmap:</strong> <a href="https://theapiengine.com/">APIEngine </a>— <em>API Simulation and Backend Platform for Developers.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8c8506044c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Rate Limiter in 40 Lines of Python — No Redis Required]]></title>
            <link>https://medium.com/@kunal.resolute/python-rate-limiter-no-redis-django-b1e66f732bf9?source=rss-ff73a5145bcc------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1e66f732bf9</guid>
            <category><![CDATA[django]]></category>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Kunal Kejriwal]]></dc:creator>
            <pubDate>Sat, 04 Apr 2026 16:35:37 GMT</pubDate>
            <atom:updated>2026-04-04T16:35:37.095Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building a Poor Man’s Rate Limiter in Pure Python</h3><p><em>No Redis. No django-ratelimit. Just a sliding window, a dictionary, and 40 lines of code.</em></p><p>I’ve used Redis-backed rate limiters. I’ve dropped in django-ratelimit with a decorator and called it a day. They work great — until you&#39;re spinning up a small internal tool, a personal project, or a lightweight API where standing up a Redis instance feels like bringing a forklift to move a cardboard box.</p><p>So I built one from scratch.</p><figure><img alt="A dark code editor window showing the is_rate_limited Python function. The timestamp pruning line is highlighted in green with a left border accent. A red 429 badge sits in the top right corner of the terminal frame." src="https://cdn-images-1.medium.com/max/1024/1*Les9_1EH-QW4uEhFhmkY3g.png" /><figcaption>The entire algorithm lives in one line — prune the stale timestamps, then count what’s left.</figcaption></figure><p>This isn’t a replacement for Redis in production at scale. But it’s a surprisingly capable solution for low-to-medium traffic services, and building it yourself teaches you something that using a library never will: exactly what a rate limiter is actually doing.</p><h3>The algorithm: sliding window counter</h3><p>There are several approaches to rate limiting — fixed window, token bucket, leaky bucket. The one we’re building is a <strong>sliding window counter</strong>. Here’s the idea in plain English:</p><p>For every incoming request, look back over the last N seconds. Count how many requests came from this client in that window. If it exceeds your limit, reject the request. If not, allow it and record the timestamp.</p><figure><img alt="A horizontal timeline spanning 0 to 60 seconds. Gray faded dots on the left represent stale requests that have been pruned. A dashed green rectangle marks the active sliding window, containing seven vivid green dots representing valid requests. A badge reads “7 requests counted.” A red vertical marker indicates the current moment." src="https://cdn-images-1.medium.com/max/1024/1*741yJyvgSQOvZgjowyDyzA.png" /><figcaption>The window doesn’t reset — it slides. Anything older than 60 seconds gets pruned on every request.</figcaption></figure><p>It’s called “sliding” because the window moves with time — it’s always “the last 60 seconds,” not “this calendar minute.”</p><h3>The core logic</h3><pre>import time<br>from collections import defaultdict<br><br># Stores request timestamps per client key<br>request_log = defaultdict(list)<br>def is_rate_limited(client_key: str, limit: int, window_seconds: int) -&gt; bool:<br>    now = time.time()<br>    window_start = now - window_seconds<br>    # Keep only timestamps within the current window<br>    request_log[client_key] = [<br>        ts for ts in request_log[client_key]<br>        if ts &gt; window_start<br>    ]<br>    if len(request_log[client_key]) &gt;= limit:<br>        return True<br>    request_log[client_key].append(now)<br>    return False</pre><p>That’s it. Let’s break down what’s happening:</p><p>request_log is a dictionary mapping a client identifier (an IP address, a user ID, an API key) to a list of timestamps. Every time a request comes in, we prune the list — anything older than our window gets dropped. Then we check the length. If we&#39;re at or over the limit, the request is blocked. Otherwise, we append the current timestamp and let it through.</p><p>The pruning step is what makes this a sliding window rather than a fixed one. We’re not resetting a counter every 60 seconds — we’re continuously discarding stale data.</p><h3>Plugging it into Django middleware</h3><p>The core function is clean and stateless enough to drop into a Django middleware class with minimal ceremony:</p><pre>import time<br>from collections import defaultdict<br>from django.http import JsonResponse<br><br>request_log = defaultdict(list)<br>class RateLimitMiddleware:<br>    def __init__(self, get_response):<br>        self.get_response = get_response<br>        self.limit = 60        # max requests<br>        self.window = 60       # per 60 seconds<br>    def __call__(self, request):<br>        client_key = self._get_client_key(request)<br>        if is_rate_limited(client_key, self.limit, self.window):<br>            return JsonResponse(<br>                {&quot;error&quot;: &quot;Too many requests. Slow down.&quot;},<br>                status=429<br>            )<br>        return self.get_response(request)<br>    def _get_client_key(self, request):<br>        # Use forwarded IP if behind a proxy, else REMOTE_ADDR<br>        forwarded_for = request.META.get(&quot;HTTP_X_FORWARDED_FOR&quot;)<br>        if forwarded_for:<br>            return forwarded_for.split(&quot;,&quot;)[0].strip()<br>        return request.META.get(&quot;REMOTE_ADDR&quot;, &quot;unknown&quot;)</pre><p>Register it in settings.py:</p><pre>MIDDLEWARE = [<br>    &quot;yourapp.middleware.RateLimitMiddleware&quot;,<br>    # ... rest of your middleware<br>]</pre><p>One request comes in. The middleware fires. We extract the client IP, check it against the sliding window, return a 429 if they&#39;re over the limit, or pass the request down the chain if they&#39;re not. Clean, readable, no dependencies.</p><figure><img alt="A split diagram comparing two rate limiting approaches. The left side shows middleware with a single purple “global limit” gate funneling all requests to login, feed, and search views equally at 60 requests per 60 seconds. The right side shows the decorator approach where each view has its own gate — login in coral at 5 per 60s, feed in teal at 100 per 60s, and search in amber at 30 per 60s." src="https://cdn-images-1.medium.com/max/1024/1*hwi7j3GTUriQlwU0XOBZGw.png" /><figcaption>Middleware guards the door. Decorators guard each room. Pick based on how much control you need.</figcaption></figure><h3>The IP extraction detail worth knowing</h3><p>_get_client_key handles one real-world wrinkle: if your Django app sits behind a load balancer or reverse proxy (Nginx, AWS ALB), REMOTE_ADDR will be the proxy&#39;s IP — not the client&#39;s. Every user would share the same key, and your rate limiter would be useless.</p><p>HTTP_X_FORWARDED_FOR contains the original client IP in that case, but it can be a comma-separated chain of IPs if the request passed through multiple proxies. We take the first one, which is always the original client.</p><h3>Making it configurable per-view</h3><p>The middleware approach rate limits every endpoint equally. If you want per-view control — stricter limits on your login endpoint, looser limits on your public feed — wrap the logic in a decorator instead:</p><pre>from functools import wraps<br>from django.http import JsonResponse<br><br>def rate_limit(limit=30, window=60):<br>    def decorator(view_func):<br>        @wraps(view_func)<br>        def wrapper(request, *args, **kwargs):<br>            client_key = f&quot;{request.META.get(&#39;REMOTE_ADDR&#39;)}:{view_func.__name__}&quot;<br>            if is_rate_limited(client_key, limit, window):<br>                return JsonResponse({&quot;error&quot;: &quot;Rate limit exceeded.&quot;}, status=429)<br>            return view_func(request, *args, **kwargs)<br>        return wrapper<br>    return decorator</pre><p>Usage:</p><pre>@rate_limit(limit=5, window=60)<br>def login(request):<br>    ...<br><br>@rate_limit(limit=100, window=60)<br>def public_feed(request):<br>    ...</pre><p>Notice the client_key now includes the view name. This scopes the rate limit per endpoint — a burst on the login page won&#39;t consume the user&#39;s public feed quota.</p><h3>What this doesn’t do — and when to reach for Redis</h3><p>This implementation has one significant constraint: it lives in memory. That means:</p><ul><li><strong>It doesn’t survive server restarts.</strong> The request log is wiped when the process dies.</li><li><strong>It doesn’t work across multiple processes or servers.</strong> If you’re running Gunicorn with 4 workers, each worker maintains its own request_log. A client could make 4× your intended limit by hitting different workers.</li><li><strong>It will grow unbounded under heavy unique-client traffic</strong> unless you add periodic cleanup.</li></ul><p>For a single-process app, a personal project, an internal tool, or a low-traffic API — none of that matters. This works perfectly.</p><figure><img alt="A two-column decision matrix comparing pure Python rate limiting versus Redis-backed rate limiting across four criteria: single vs multiple servers, personal vs production use, acceptable resets vs persistent state, and no infrastructure vs distributed setup. Green checkmarks mark scenarios where pure Python works. Red crosses mark scenarios that require Redis. A dashed vertical line separates the two columns with an upgrade arrow between the headers." src="https://cdn-images-1.medium.com/max/1024/1*sqIVfxjONeq1Lb7kaDsehg.png" /><figcaption>If any row on the right describes your setup — that’s your signal to reach for Redis.</figcaption></figure><p>The moment you need distributed rate limiting — multiple dynos on Heroku, multiple EC2 instances behind a load balancer, or a serverless setup — reach for Redis. django-ratelimit with a Redis backend handles all of the above cleanly.</p><p>Build the simple version first. You’ll know exactly when you’ve outgrown it.</p><h3>The complete implementation</h3><pre>import time<br>from collections import defaultdict<br>from functools import wraps<br>from django.http import JsonResponse<br><br>request_log = defaultdict(list)<br>def is_rate_limited(client_key: str, limit: int, window_seconds: int) -&gt; bool:<br>    now = time.time()<br>    window_start = now - window_seconds<br>    request_log[client_key] = [<br>        ts for ts in request_log[client_key]<br>        if ts &gt; window_start<br>    ]<br>    if len(request_log[client_key]) &gt;= limit:<br>        return True<br>    request_log[client_key].append(now)<br>    return False<br><br>class RateLimitMiddleware:<br>    def __init__(self, get_response):<br>        self.get_response = get_response<br>        self.limit = 60<br>        self.window = 60<br>    def __call__(self, request):<br>        client_key = self._get_client_key(request)<br>        if is_rate_limited(client_key, self.limit, self.window):<br>            return JsonResponse({&quot;error&quot;: &quot;Too many requests.&quot;}, status=429)<br>        return self.get_response(request)<br>    def _get_client_key(self, request):<br>        forwarded_for = request.META.get(&quot;HTTP_X_FORWARDED_FOR&quot;)<br>        if forwarded_for:<br>            return forwarded_for.split(&quot;,&quot;)[0].strip()<br>        return request.META.get(&quot;REMOTE_ADDR&quot;, &quot;unknown&quot;)<br><br>def rate_limit(limit=30, window=60):<br>    def decorator(view_func):<br>        @wraps(view_func)<br>        def wrapper(request, *args, **kwargs):<br>            client_key = f&quot;{request.META.get(&#39;REMOTE_ADDR&#39;)}:{view_func.__name__}&quot;<br>            if is_rate_limited(client_key, limit, window):<br>                return JsonResponse({&quot;error&quot;: &quot;Rate limit exceeded.&quot;}, status=429)<br>            return view_func(request, *args, **kwargs)<br>        return wrapper<br>    return decorator</pre><h3>Final thoughts</h3><p>The next time a dependency feels like overkill, ask yourself what the dependency is actually doing. Rate limiting is timestamps in a list and a length check. Once you see it, you can’t unsee it.</p><p>Libraries exist for good reasons — use them when you need them. But knowing how to build the thing underneath makes you a better engineer whether you reach for the library or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WtW_dePgSE0vNSAjGSVqHg.png" /><figcaption>This article is step one. The architecture scales — and so does your understanding of it.</figcaption></figure><p><em>Enjoyed this? I write about Python, Django, and the mechanics behind tools we use every day. Follow for more.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1e66f732bf9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Cryptic Ledger: What a CTF Challenge Taught Me About Hashing]]></title>
            <link>https://medium.com/@kunal.resolute/cryptic-ledger-md5-ctf-python-5276eabc0608?source=rss-ff73a5145bcc------2</link>
            <guid isPermaLink="false">https://medium.com/p/5276eabc0608</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Kunal Kejriwal]]></dc:creator>
            <pubDate>Sat, 04 Apr 2026 06:51:37 GMT</pubDate>
            <atom:updated>2026-04-04T06:51:37.208Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>The Cryptic Ledger: What a CTF Challenge Taught Me About Never Trusting </strong><strong>.strip()</strong></h3><p><em>I thought I was just solving a puzzle. Turns out I was learning something fundamental about data integrity.</em></p><p>There’s a specific kind of frustration that only programmers know: your logic is perfect, your syntax is clean, and your output is still completely wrong.</p><p>Imagine you’ve recovered a corrupted terminal log from a legacy system. Hidden within thousands of lines of junk data is a single security sequence required to reboot the environment. The catch? The data is “mined” using cryptographic signatures.</p><p>I hit that wall while working through a <strong>CTF (Capture the Flag) challenge</strong> late on a Tuesday night. The puzzle was called <strong><em>The Cryptic Ledger</em></strong> — and it broke me for about two hours. Not because it was mathematically complex. Because of a single invisible character.</p><p>A newline.</p><p>Let me walk you through it — because what looks like a niche puzzle is actually a masterclass in three skills every serious developer needs: precise file I/O, cryptographic hashing, and the discipline to <em>not</em> assume.</p><h3>The Setup: You’re a Digital Archaeologist</h3><p>Imagine you’ve recovered a corrupted terminal log from a compromised system. Thousands of lines of junk data. Somewhere inside is a security sequence — <strong><em>a hidden string needed to reboot the environment</em></strong>.</p><p>The catch? You can’t just grep for it. The sequence isn&#39;t stored as plaintext. It&#39;s <em>mined</em> — extracted based on cryptographic fingerprints.</p><figure><img alt="A dark terminal window styled like a classic code editor, filled with faded green log lines — most marked as system noise or corrupted fragments. A single line near the center is sharply highlighted against a dark green background with a bright green left border, labeled “LOG-0049-DATA-auth-seq-7F3A — MINED — hash ends: 7.” A blinking cursor sits at the bottom. Subtle CRT scanlines run across the entire screen." src="https://cdn-images-1.medium.com/max/1024/1*Dh0K_9FNFincL6WttNoCSA.png" /><figcaption>Thousands of lines of noise. One line that matters. The decoder finds it so you don’t have to.</figcaption></figure><p>This is your ledger_data.txt. Your job is to decode it.</p><h3>The Rules of Engagement</h3><p>The protocol is rigid. Any deviation — even a single missing character — produces garbage output. Here’s what you must do:</p><p><strong>Step 1 — Filter the noise.</strong> Skip any line beginning with SYSTEM or #. These are system artifacts, not data.</p><p><strong>Step 2 — Hash every valid line.</strong> Compute the MD5 hash of the line. Here’s the critical part: <em>include the trailing </em><em>\n</em>. The newline is part of the data.</p><p><strong>Step 3 — Apply the mining rule.</strong> Look at the final character of the 32-character hex hash.</p><ul><li>If it’s a letter (a–f): discard the line. It&#39;s &quot;hollow.&quot;</li><li>If it’s a digit (0–9): the line is &quot;mined.&quot; Keep it.</li></ul><p><strong>Step 4 — Harvest.</strong> From every mined line, extract the character at index 6 (the 7th character — zero-indexed).</p><p><strong>Step 5 — Compile.</strong> Concatenate every extracted character in order. That’s your security sequence.</p><p>Simple enough to describe. Deceptively easy to get wrong.</p><h3>The Trap That Got Me (And Will Get You Too)</h3><p>When I first wrote my solution, I did what every programmer does by reflex:</p><p>python</p><pre>line = line.strip()</pre><p>It felt responsible. Clean. Defensive.</p><p>It was also completely wrong.</p><figure><img alt="Two parallel rows showing the same log line processed two ways: the top row passes “LOGDATA-X4\n” (with newline) through MD5 and produces a hash ending in a digit, marked as mined. The bottom row passes the stripped version “LOGDATA-X4” through MD5 and produces a completely different hash ending in a letter, marked as discarded. A note at the bottom reads: “Same line of text. One invisible character difference. Completely different hash. Completely different outcome.”" src="https://cdn-images-1.medium.com/max/1024/1*UIKKXC40i32Po7BFiuWbsg.png" /><figcaption>One invisible character. Two completely different hashes. This is why .strip() breaks everything.</figcaption></figure><p>When you strip the newline before hashing, you’re not hashing the same string the protocol expects. MD5(&quot;LOGDATA-X4-TERMINAL\n&quot;) and MD5(&quot;LOGDATA-X4-TERMINAL&quot;) produce entirely different hashes. Different hashes mean different final characters. Different final characters mean different lines pass the mining rule. Your extracted sequence becomes meaningless noise.</p><p>This is what makes the challenge so insidious: the bug is invisible. Your code runs without errors. It produces <em>a</em> sequence — just not the <em>right</em> one.</p><p>The lesson isn’t really about .strip(). It&#39;s about this: <strong>hashing is a contract.</strong> You and the system must agree, byte for byte, on what&#39;s being hashed. Even a single whitespace character breaks the agreement.</p><h3>Breaking Down the Logic</h3><p>Before we dive into the code, let’s look at why this is tricky.</p><h3>The “Newline” Pitfall</h3><p>Most programmers automatically use .strip() when reading files. However, in this protocol, the \n is part of the data being hashed. If you strip it, your MD5 hash will be entirely different, and you’ll &quot;mine&quot; the wrong lines.</p><figure><img alt="A top-down flowchart showing the cryptic ledger mining process. A valid line is passed into an MD5 hash function, producing a 32-character hex string. The final character is inspected and highlighted in purple. The flow branches left if the character is a letter (a–f), leading to a coral “discard” box labeled “line is hollow.” It branches right if the character is a digit (0–9), leading to a teal “harvest” box, then down to a final step: extract the character at index 6." src="https://cdn-images-1.medium.com/max/1024/1*ygVF0__vefhktGeOUv72GQ.png" /><figcaption>The full decision path: from valid line to mined sequence character, in five steps.</figcaption></figure><h3>Zero-Based Indexing</h3><p>In programming, we start counting at zero. If the protocol asks for the <strong>7th character</strong>, we target <strong>Index 6</strong>.</p><blockquote><strong><em>Example:</em></strong><em> </em><em>L-O-G-D-A-T-A </em><strong><em>Indices:</em></strong><em> </em><em>0-1-2-3-4-5-6 The character at Index 6 is </em><em>A.</em></blockquote><h3>The Solution in Python</h3><p>Python’s hashlib library makes this process incredibly efficient. Here is how you implement the decoder:</p><p>Python</p><pre>import hashlib<br><br>def decode_ledger(file_path):<br>    sequence = []<br>    <br>    try:<br>        # We open the file in &#39;r&#39; mode to preserve line endings<br>        with open(file_path, &#39;r&#39;, encoding=&#39;utf-8&#39;) as file:<br>            for line in file:<br>                # 1. Filtration<br>                if line.startswith(&quot;SYSTEM&quot;) or line.startswith(&quot;#&quot;):<br>                    continue<br>                <br>                # 2. MD5 Hashing (Must include \n)<br>                # We encode the string to bytes for the MD5 function<br>                hash_hex = hashlib.md5(line.encode(&#39;utf-8&#39;)).hexdigest()<br>                <br>                # 3. The Mining Rule<br>                last_char = hash_hex[-1]<br>                <br>                if last_char.isdigit():<br>                    # 4. Harvesting the 7th character (Index 6)<br>                    if len(line) &gt; 6:<br>                        sequence.append(line[6])<br>        <br>        # Join the characters to reveal the final sequence<br>        final_flag = &quot;&quot;.join(sequence)<br>        print(f&quot;--- RECOVERY COMPLETE ---&quot;)<br>        print(f&quot;SECURITY SEQUENCE: {final_flag}&quot;)<br>        <br>    except FileNotFoundError:<br>        print(&quot;Error: ledger_data.txt not found. Ensure the file is in the script directory.&quot;)</pre><pre>if __name__ == &quot;__main__&quot;:<br>    decode_ledger(&#39;ledger_data.txt&#39;)</pre><p>Notice what we’re <em>not</em> doing:</p><ul><li>We’re not loading the whole file into memory (scalable to gigabyte logs)</li><li>We’re not stripping lines before hashing</li><li>We’re not treating the 7th character as index 7</li></ul><p>Each of those would silently corrupt the output.</p><h3>Why This Isn’t Just a Puzzle</h3><p>MD5 is a one-way function. Feed it the same input, you always get the same 32-character fingerprint. Change one byte — a space, a newline, a capital letter — and the fingerprint is completely different. That’s not a quirk. That’s the entire point.</p><p>This property is what makes hashing useful in the real world:</p><ul><li><strong>File integrity checks</strong>: Your Linux package manager verifies downloaded files by comparing MD5 (or SHA-256) hashes. A corrupted file produces a different hash and gets rejected.</li><li><strong>Password storage</strong>: Systems don’t store your password — they store its hash. When you log in, your input is hashed and compared.</li><li><strong>Log auditing</strong>: Security systems can detect whether a log file has been tampered with by checking if its hash still matches.</li></ul><p>The Cryptic Ledger compresses all of this into one small challenge. That’s what makes it elegant.</p><h3>Why This Matters</h3><p>This exercise isn’t just about finding a hidden string; it’s about <strong>data integrity</strong>. MD5 is a one-way cryptographic function. Even a single space or an extra newline changes the “fingerprint” of the data entirely.</p><p>When you build a “miner” like this, you are essentially practicing how to:</p><ul><li><strong>Process large datasets</strong> line-by-line (memory efficiency).</li><li><strong>Apply cryptographic validation</strong> to verify data state.</li><li><strong>Filter out noise</strong> using conditional logic.</li></ul><h3>What’s Next?</h3><p>If this challenge clicked for you, here are three natural next steps:</p><ol><li><strong>Swap MD5 for SHA-256.</strong> Python’s hashlib makes this a one-word change: hashlib.sha256(...). How does the longer hash change which lines get &quot;mined&quot;?</li><li><strong>Add parallel processing.</strong> For truly massive log files, Python’s concurrent.futures module lets you hash lines across multiple CPU cores simultaneously.</li><li><strong>Build a real log auditor.</strong> Take this same logic and apply it to a real-world problem: write a script that monitors a directory and alerts you if any file’s hash changes overnight.</li></ol><figure><img alt="A four-step horizontal progression roadmap. Step 1 is a purple card labeled “MD5 — current solution.” Step 2 is a teal card labeled “SHA-256 — stronger hash, one-word swap.” Step 3 is an amber card labeled “Parallel processing — concurrent.futures, multi-core speed.” Step 4 is a coral card labeled “Real log auditor — production ready tool,” positioned slightly elevated to mark it as the capstone. A progress bar runs beneath all four cards with a “you are here” marker under step 1." src="https://cdn-images-1.medium.com/max/1024/1*mX4m_4zj6WrqdLaMLe3ooA.png" /><figcaption>You’ve built the baseline. Here’s where to take it next.</figcaption></figure><p>The puzzle was the tutorial. Now build something real.</p><h3>Final Thoughts</h3><p>The next time you see a massive log file, don’t just search for keywords. Sometimes, the answers are hidden behind the hashes!</p><p><strong>Are you interested in more Python puzzles? Let me know in the comments if you’d like to see a version of this using SHA-256 or parallel processing!</strong></p><p><strong>About Me: </strong>I’m a backend developer with nearly three years of experience building and deploying scalable web applications. Python and Django are my tools of choice — and when I’m not writing code, I’m writing about it. I believe the best technical writers are the ones still getting their hands dirty.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5276eabc0608" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with React: A Complete Beginner-Friendly Guide (From Zero to Your First App)]]></title>
            <link>https://medium.com/@kunal.resolute/react-a-complete-beginner-friendly-guide-ea934e66725e?source=rss-ff73a5145bcc------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea934e66725e</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[frontend]]></category>
            <dc:creator><![CDATA[Kunal Kejriwal]]></dc:creator>
            <pubDate>Tue, 24 Feb 2026 08:07:58 GMT</pubDate>
            <atom:updated>2026-02-24T08:07:58.705Z</atom:updated>
            <content:encoded><![CDATA[<p>React has become one of the most dominant technologies in modern web development. Whether you’re a beginner stepping into frontend development or a backend engineer looking to build interactive user interfaces, React is often the first framework you’ll encounter.</p><p>In this guide, we will build a strong conceptual foundation and then create our first React project step-by-step.</p><h4>What You Will Learn</h4><ul><li>What React is and why it exists</li><li>Why React became so popular</li><li>How to set up your first React project using Create React App</li></ul><p>Let’s begin.</p><h3>What is React?</h3><p>React is a JavaScript library used for building user interfaces, especially for single-page applications (SPAs). It allows developers to create reusable UI components that efficiently update and render when data changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KtO_fwwCQlfUGmCElpopdQ.png" /></figure><p>React was developed and open-sourced by Facebook (now Meta) and is widely used for building modern web applications.</p><p>At its core, React is all about building UI using components.</p><h4>Understanding React Through an Example</h4><p>Think about a typical web page: it contains multiple elements such as headers, buttons, forms, lists, and cards. In traditional web development, these elements are tightly coupled and difficult to maintain as the application grows.</p><p>React solves this problem by breaking the UI into independent, reusable components.</p><p>For example:</p><ul><li>Navbar component</li><li>Sidebar component</li><li>Profile Card component</li><li>Footer component</li></ul><p>Each component manages its own logic and rendering, making the application modular and maintainable. This concept is very similar to how backend developers think in terms of services or modules.</p><h4>Key Idea: Component-Based Architecture</h4><p>In React, everything is a component.</p><p>A component is simply a reusable piece of UI with its own logic and structure. Components can be nested, reused, and independently maintained.</p><p>This approach makes large applications easier to scale and maintain.</p><h3>What Makes React So Popular?</h3><p>React’s popularity is not accidental. It solved many real-world problems faced in traditional frontend development.</p><p>Let’s break down the major reasons.</p><h4>Reason #1: Virtual DOM for High Performance</h4><p>React uses a concept called the Virtual DOM.</p><p>Instead of directly updating the browser DOM every time something changes, React first updates a virtual representation in memory. It then calculates the most efficient way to update the real DOM.</p><figure><img alt="Diagram showing React Virtual DOM updating a virtual tree in memory, running a diffing algorithm, and applying minimal changes to the real browser DOM for faster rendering." src="https://cdn-images-1.medium.com/max/1024/1*xBlhC90WFFySowy5yhTASQ.png" /></figure><p>This significantly improves performance, especially in large applications with frequent UI updates.</p><p>For backend engineers, think of this as an optimized diff-based update mechanism rather than full page re-rendering.</p><h4>Reason #2: Reusable Components = Clean Architecture</h4><p>React promotes reusability. Once you build a component, you can reuse it across the application.</p><p>This leads to:</p><ul><li>Cleaner codebase</li><li>Better maintainability</li><li>Faster development</li></ul><p>It’s similar to writing reusable services or utility classes in backend systems.</p><h4>Reason #3: Strong Ecosystem and Community</h4><p>React has one of the largest developer communities in the world. This means:</p><ul><li>Tons of libraries and tools</li><li>Excellent documentation</li><li>Massive job demand</li><li>Continuous improvements</li></ul><p>From routing to state management, React’s ecosystem covers everything needed to build enterprise-grade applications.</p><figure><img alt="Infographic illustrating React’s ecosystem with libraries, routing, state management, documentation, and developer community enabling enterprise-grade application development." src="https://cdn-images-1.medium.com/max/1024/1*dL04lzqNJqcr8_cAYPX1xg.png" /></figure><h4>Reason #4: Unidirectional Data Flow</h4><p>React follows a one-way data flow model. Data flows from parent components to child components.</p><p>This makes debugging easier and improves predictability, especially in large applications.</p><figure><img alt="Diagram explaining React’s one-way data flow where state moves from parent component to child components via props, with callbacks updating parent state." src="https://cdn-images-1.medium.com/max/1024/1*IJBDo27BXJ-5mw94jrS84Q.png" /></figure><p>If you come from backend frameworks like Spring or Django, think of this as controlled data propagation similar to service-layer-driven updates.</p><h4>Reason #5: Learn Once, Use Everywhere</h4><p>React is not limited to web apps. The same concepts apply to:</p><ul><li>React Native (mobile apps)</li><li>Next.js (server-side rendering)</li><li>Electron (desktop apps)</li></ul><p>This versatility significantly boosts its adoption across industries.</p><h3>How to Set Up a React Project (Using Create React App)</h3><p>Now that we understand the “why”, let’s move to the practical part: setting up our <a href="https://react.dev/learn"><strong><em>first React project</em></strong></a>.</p><p>We will use Create React App (CRA), which is an official tool that sets up a fully configured React environment without manual configuration.</p><h4>Prerequisites</h4><p>Before creating a React project, make sure you have the following installed:</p><ul><li>Node.js (LTS version recommended)</li><li>npm (comes bundled with Node.js)</li></ul><p>To verify installation, run:</p><pre>node -v<br>npm -v</pre><figure><img alt="Terminal screenshot showing Node.js and npm version verification using node -v and npm -v commands before setting up a React project." src="https://cdn-images-1.medium.com/max/783/1*OO7j11SOyTWqFXUjMq1NIw.png" /></figure><p>If versions are printed, you are good to go.</p><h4>Creating a New React App</h4><p>Run the following command in your terminal:</p><pre>npx create-react-app my-first-react-app</pre><p>This command will:</p><ul><li>Create a new folder named my-first-react-app</li><li>Install React, ReactDOM, and necessary dependencies</li><li>Configure Webpack and Babel automatically</li></ul><figure><img alt="Terminal command npx create-react-app my-first-react-app used to initialize a new React application with default configuration." src="https://cdn-images-1.medium.com/max/1024/1*Rls3CoVltBMTipzGkayvIg.png" /></figure><p>This process might take a few minutes depending on your internet speed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rxZhlUxAgTEqFIbgMYoO5w.png" /></figure><figure><img alt="Terminal command cd my-first-react-app used to move into the newly created React project directory." src="https://cdn-images-1.medium.com/max/1024/1*n9HlhSmm846aX5hSfmRNGw.png" /></figure><h4>Navigating into the Project</h4><p>Once installation completes, move into the project directory:</p><pre>cd my-first-react-app</pre><figure><img alt="Terminal command cd my-first-react-app used to move into the newly created React project directory." src="https://cdn-images-1.medium.com/max/1024/1*M6SfR1YRsW32Vz4o1QDBxg.png" /></figure><h4>Running the React Application</h4><p>Start the development server:</p><pre>npm start</pre><figure><img alt="Terminal output showing npm start command launching the React development server at localhost:3000." src="https://cdn-images-1.medium.com/max/969/1*ew0Yiaxk8L2biEw9BjLXzg.png" /></figure><p>This will launch the application at: <a href="http://localhost:3000/"><em>http://localhost:3000</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tcNJStrNFq9w8T9CkiIT6A.png" /></figure><p>You should now see the default React welcome screen in your browser.</p><figure><img alt="Browser screenshot displaying the default Create React App welcome screen after successful project setup." src="https://cdn-images-1.medium.com/max/1024/1*CKUy457THdkuRXQ4xtuNMg.png" /></figure><p>Congratulations 🎉 You just created and ran your first React application.</p><h3>Understanding the Project Structure</h3><p>Once the project is created, you’ll see several files and folders. The most important ones are:</p><ul><li>node_modules: Contains all installed dependencies</li><li>public: Static assets and HTML template</li><li>src: Main source code for the React application</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pplDfkR0JgPphbXvOTa5cA.png" /></figure><p>Inside the src folder, the key file is App.js. This is the root component of your application.</p><p>You can edit this file to see live updates in the browser instantly. This is powered by React’s hot reloading feature.</p><h4>Your First Small Change</h4><p>Open src/App.js and replace its content with:</p><pre>function App() { <br>return ( <br>        &lt;div&gt; <br>          &lt;h1&gt;Hello, React World 🚀&lt;/h1&gt; <br>          &lt;p&gt;This is my first React application.&lt;/p&gt;<br>         &lt;/div&gt; <br>        ); <br>    } <br><br>export default App;</pre><figure><img alt="Code snippet showing a simple React functional component rendering “Hello, React World” with JSX inside App.js." src="https://cdn-images-1.medium.com/max/1024/1*cCfYIK0c1ENrdNvJStUh-g.png" /></figure><p>Save the file, and you will immediately see the updated content in the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s_IGYTC-axp--2f1MZEDpw.png" /></figure><p>This instant feedback loop is one of the reasons developers love React.</p><h3>Final Thoughts</h3><p>React is more than just a JavaScript library; it is a paradigm shift in how we think about building user interfaces. By adopting a component-based architecture, leveraging the Virtual DOM, and maintaining a unidirectional data flow, React makes it easier to build scalable and maintainable web applications.</p><p>Whether you are a beginner exploring frontend development or a backend engineer expanding your full-stack capabilities, React provides a powerful and flexible foundation to build modern applications.</p><p>In the next article, we will dive deeper into:</p><ul><li>JSX and how it works under the hood</li><li>Functional components and props</li><li>Rendering dynamic data in React</li></ul><p>Stay tuned 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea934e66725e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating Your First Django App, Admin Panel, Superuser & Migrations]]></title>
            <link>https://medium.com/@kunal.resolute/how-to-create-django-app-5f7141a118c0?source=rss-ff73a5145bcc------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f7141a118c0</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[Kunal Kejriwal]]></dc:creator>
            <pubDate>Mon, 23 Feb 2026 08:30:00 GMT</pubDate>
            <atom:updated>2026-02-23T08:30:00.907Z</atom:updated>
            <content:encoded><![CDATA[<p>In the previous article, we set up our Django project and understood how Django works internally with URLs and Views. Now it’s time to build our first <strong>real Django app</strong>, wire it into the project, explore the admin panel, and understand migrations — the backbone of Django’s database schema management.</p><p>This article will cover:</p><p>1️⃣ What is a Django App<br> 2️⃣ startapp Command<br> 3️⃣ App Structure Explained<br> 4️⃣ Registering Apps in settings.py<br> 5️⃣ Creating a Superuser<br> 6️⃣ Django Admin Overview<br> 7️⃣ makemigrations vs migrate<br> 8️⃣ How Django ORM Creates Database Schema</p><h3>What is a Django App?</h3><p>A <strong>Django app</strong> is a self-contained module that performs a specific functionality within a Django project — such as a blog, authentication system, payment module, etc.</p><p>Think of it this way:</p><blockquote><em>🔹 Project = Entire product<br> 🔹 App = Feature or module inside that product</em></blockquote><p>For example:</p><ul><li>accounts app → user authentication</li><li>blog app → posts and comments</li><li>payments app → transactions</li></ul><p>Django promotes <strong>modular architecture</strong>, meaning apps can be reused across different projects.</p><h3>Creating Your First App — startapp Command</h3><p>Inside your Django project directory (where manage.py exists), run:</p><pre>python manage.py startapp blog</pre><figure><img alt="Django startapp command creating a new app named blog from terminal" src="https://cdn-images-1.medium.com/max/951/1*nkeXy57tyBSG6rB8GPrE7Q.png" /></figure><p>This command auto-generates a complete app scaffold with all required files.</p><pre>config/<br>│── manage.py<br>│── config/<br>│<br>└── blog/          ← New Django App</pre><p>This is where your actual feature logic will live. When you run startapp, Django creates a standard structure like:</p><pre>blog/<br>├── __init__.py<br>├── admin.py<br>├── apps.py<br>├── migrations/<br>│   └── __init__.py<br>├── models.py<br>├── tests.py<br>└── views.py</pre><figure><img alt="Django project directory structure showing newly created blog app folder" src="https://cdn-images-1.medium.com/max/919/1*xqYfNy5OIzl6Kq-nEwL86Q.png" /></figure><p>📁 __init__.py</p><p>Marks the folder as a Python package so modules can be imported.</p><p>📁 admin.py</p><p>Used to register models so they appear in Django Admin panel.</p><p>📁 apps.py</p><p>Contains configuration for this app.</p><p>📁 models.py</p><p>Defines database schema using Django ORM.</p><p>📁 views.py</p><p>Contains business logic for handling HTTP requests and returning responses.</p><p>📁 tests.py</p><p>Holds unit tests for the app.</p><p>📁 migrations/</p><p>Stores migration files that describe database schema changes.</p><h3>Registering Apps in settings.py</h3><p>Creating an app is not enough. Django must know it exists.</p><p>Open:</p><pre>config/settings.py</pre><p>Find INSTALLED_APPS and add your app:</p><pre>INSTALLED_APPS = [<br>    &#39;django.contrib.admin&#39;,<br>    &#39;django.contrib.auth&#39;,<br>    &#39;django.contrib.contenttypes&#39;,<br>    &#39;django.contrib.sessions&#39;,<br>    &#39;django.contrib.messages&#39;,<br>    &#39;django.contrib.staticfiles&#39;,<br><br>    &#39;blog&#39;,  # 👈 Register your app<br>]</pre><figure><img alt="Adding blog app to INSTALLED_APPS list in Django settings.py configuration" src="https://cdn-images-1.medium.com/max/1024/1*r3EKITYhr2mvermjCx_WKg.png" /></figure><p>Why this matters:</p><blockquote>Django scans INSTALLED_APPS to discover models, admin configs, management commands, and migrations.</blockquote><h3>Creating a Superuser</h3><p>Django provides a powerful built-in admin interface. To access it, we need a <strong>superuser</strong>.</p><p>Run:</p><pre>python manage.py createsuperuser</pre><p>You’ll be prompted to enter:</p><pre>Username:<br>Email:<br>Password:</pre><figure><img alt="Django createsuperuser command execution in terminal prompting for username email and password" src="https://cdn-images-1.medium.com/max/703/1*DbzNjt4wxJfaanydILNfVA.png" /></figure><p>Once created, start the server:</p><pre>python manage.py runserver</pre><figure><img alt="Running Django development server using python manage.py runserver command" src="https://cdn-images-1.medium.com/max/715/1*qIQBZ94m65pfUgc4D8CGEg.png" /></figure><p>Now open:</p><pre>http://127.0.0.1:8000/admin/</pre><figure><img alt="Django admin login interface accessed at localhost admin panel" src="https://cdn-images-1.medium.com/max/1024/1*cB2zlMDnMsknlWg53dXzyg.png" /></figure><p>Login using superuser credentials.</p><figure><img alt="Accessing the Django Admin Panel" src="https://cdn-images-1.medium.com/max/1024/1*nDecXN0Zbg4DGLljtv17xg.png" /></figure><h3>Django Admin Overview</h3><p>The Django Admin panel is an auto-generated dashboard that lets you manage database records visually.</p><p>Out of the box, it includes:</p><ul><li>User management</li></ul><figure><img alt="Users model in Django Admin Panel, and can be used to add or delete users." src="https://cdn-images-1.medium.com/max/1024/1*ectGzsuCKjkP5OKxnSRnQg.png" /></figure><ul><li>Groups &amp; permissions</li></ul><figure><img alt="Groups and Permissions in Django Admin Panel" src="https://cdn-images-1.medium.com/max/1024/1*kfI3efkFGiPAPfEN5ec1PQ.png" /></figure><ul><li>Sessions</li><li>Site administration</li></ul><p>The magic happens because Django automatically generates admin UI for registered models.</p><p>For this demonstration, let’s create a Post model, which contains three fields.</p><pre>#blog/models.py<br>from django.db import models<br><br># Create your models here.<br>class Post(models.Model):<br>    title = models.CharField(max_length=200),<br>    content = models.TextField,<br>    created_at = models.DateTimeField(auto_now_add=True)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rp-n0BO_jvXznz84YFtY4w.png" /></figure><p>Example:</p><pre># blog/admin.py<br>from django.contrib import admin<br>from .models import Post<br><br>admin.site.register(Post)</pre><p>Once registered → Post model appears instantly in admin panel. Onced you make changes to your blog/admin.py file, and save it, VSCode should automatically run the server for you. If not, you can run the runserver command manually.</p><figure><img alt="Registering Post model inside Django admin.py using admin.site.register" src="https://cdn-images-1.medium.com/max/1024/1*uxobNeSDFhXXh8xA3wlfFA.png" /></figure><p>In your Terminal window, type</p><pre>python manage.py runserver</pre><p>and execute.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3gUcMZnszs2TDdb-Xjp4uw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-43Urw-x1l_Pl8qNQtt9bw.png" /></figure><h3>makemigrations vs migrate</h3><h4>python manage.py makemigrations</h4><p><strong>What it does:</strong><br> Creates new migration files based on changes detected in your models.</p><p><strong>Think of it as:</strong></p><blockquote><em>“Detect model changes and generate migration scripts.”</em></blockquote><figure><img alt="Running makemigrations command to generate Django migration files for models" src="https://cdn-images-1.medium.com/max/1024/1*fDci9BNRpjou4vqkwYwBkQ.png" /></figure><p>When you run it</p><ul><li>Django compares your current models.py with the last migration state.</li><li>If changes are found, it creates a migration file inside app/migrations/.</li></ul><h4>python manage.py migrate</h4><p><strong>What it does:</strong><br> Applies the migration files to the actual database.</p><p><strong>Think of it as:</strong></p><blockquote><em>“Execute the generated migration scripts on the DB.”</em></blockquote><figure><img alt="Applying database schema changes using Django migrate command" src="https://cdn-images-1.medium.com/max/1024/1*_vtM3h36eRU-Tk88ouS6dA.png" /></figure><p><strong>When you run it</strong></p><ul><li>Django reads all unapplied migration files</li><li>Executes SQL to alter database schema</li></ul><h3>Final Summary</h3><p>In this article, you learned:</p><p>✔ What a Django App is<br> ✔ How to create an app using startapp<br> ✔ Complete app folder structure breakdown<br> ✔ Registering apps in settings.py<br> ✔ Creating and using Django Superuser<br> ✔ Django Admin Panel fundamentals<br> ✔ Difference between makemigrations and migrate<br> ✔ How Django ORM converts models into database schema</p><p>You now understand the <strong>core development workflow</strong> of every Django project.</p><h3>Coming Next</h3><p>In Part 3, we’ll cover:</p><p><em>📌 Creating Models, Fields &amp; Relationships (ForeignKey, OneToOne, ManyToMany)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f7141a118c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Your First Django App (Step-by-Step Guide for Beginners) | Part 1]]></title>
            <link>https://medium.com/@kunal.resolute/django-guide-for-beginners-507d2a1758ef?source=rss-ff73a5145bcc------2</link>
            <guid isPermaLink="false">https://medium.com/p/507d2a1758ef</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Kunal Kejriwal]]></dc:creator>
            <pubDate>Mon, 23 Feb 2026 06:25:01 GMT</pubDate>
            <atom:updated>2026-02-23T08:32:38.114Z</atom:updated>
            <content:encoded><![CDATA[<p>This beginner-friendly Django tutorial will guide you through installing Django, creating your first project, and running the development server successfully.</p><figure><img alt="A step-by-step beginner guide to installing Django, creating your first project, and running the development server." src="https://cdn-images-1.medium.com/max/1024/1*8w_g9H21bV9_ov0OeN6Lzw.png" /><figcaption>Django tutorial for beginners</figcaption></figure><h3>🚀 What You’ll Learn in This Article</h3><ul><li>How to install Django on your system</li><li>How to create a Django project</li><li>How to run the Django development server</li><li>Understanding the default Django project structure</li></ul><h3>🛠️ Prerequisites</h3><p>Before we start, make sure you have:</p><ul><li>Python 3.8+</li><li>pip installed</li><li>Basic knowledge of Python</li><li>VS Code / PyCharm (recommended)</li></ul><p>You can verify Python installation using command lind. Open CMD, and paste the following command,</p><pre>python --version</pre><figure><img alt="Checking Python installation using python — version command in terminal" src="https://cdn-images-1.medium.com/max/789/1*F9MbjLZaL4f_ay18YDJZJw.png" /></figure><p>If you see a version show up, you have python installed on your device.</p><p><strong>Step 1: Open Terminal in VS Code</strong></p><p>Open VSCode, or the Code Editor of your choosing. Click Ctrl +` to open terminal.</p><p><strong>Step 2: Create a Virtual Environment for Django</strong></p><p>We always isolate dependencies using <a href="https://docs.python.org/3/library/venv.html">virtual environments</a>.</p><pre>python -m venv venv</pre><p>Step 3: <strong>Activate Virtual Environment</strong></p><p>Once you have create the virtual environment, you need to activate it.</p><p>For Windows, execute the following command in the terminal.</p><pre>venv\Scripts\activate</pre><p>For MacOS users, use the following:</p><pre>source venv/bin/activate</pre><figure><img alt="Creating a virtual environment for Django project using python -m venv" src="https://cdn-images-1.medium.com/max/1024/1*lr0z9tS5BFNSFJl2jj_1cw.png" /></figure><p>Now, once we have an active virtual environment, we can install Django on our virtual environment.</p><p>The ideal way to install django is with the pip command.</p><pre>pip install django</pre><figure><img alt="Installing Django framework using pip install django command in terminal" src="https://cdn-images-1.medium.com/max/657/1*mMUIZDJahGpy7ynLbAIRiA.png" /></figure><p>To verify whether Django was installed successfully, you can run the <em>admin version</em> command.</p><pre>django-admin --version</pre><figure><img alt="Verifying Django installation using django-admin — version command" src="https://cdn-images-1.medium.com/max/610/1*1mCju2Wx2v-shyk4HEcvPg.png" /></figure><h3><strong>Create Your First Django Project</strong></h3><p>Once you have installed Django on your system, you are ready to create your first Django project.</p><p>In <a href="https://docs.djangoproject.com/en/6.0/">Django</a>, you can create a project using the startproject . Execute the following command in your terminal.</p><pre>django-admin startproject config</pre><p>In the above code sample, config is the name of the project, and it can be any name of your choosing.</p><figure><img alt="Creating a new Django project using django-admin startproject command" src="https://cdn-images-1.medium.com/max/733/1*zlfHoKLnUgIjesDCZF1vzQ.png" /></figure><p>Once you execute the command, Django will create a config folder. Navigate to this config folder using cd config. Your project structure would look something like this.</p><pre>config/<br>│── manage.py<br>│── config/<br>    │── __init__.py<br>    │── settings.py<br>    │── urls.py<br>    │── asgi.py<br>    │── wsgi.py</pre><figure><img alt="Default Django project folder structure with manage.py, settings.py and urls.py" src="https://cdn-images-1.medium.com/max/1024/1*Krlcedor8dS7ujIcXs0Vcw.png" /></figure><p>Once you have verified the folder structure, you are good to run the development server. Ensure, you have cd to the outer config folder, which contains the manage.py file.</p><p>To start the server, execute the <a href="https://docs.djangoproject.com/en/6.0/ref/django-admin/#runserver">runserver</a> command in your terminal.</p><pre>python manage.py runserver</pre><figure><img alt="Running Django development server using python manage.py runserver command" src="https://cdn-images-1.medium.com/max/1024/1*iqYPQlD_4zYIVPU7cIXctg.png" /></figure><p>To verify, open a web browser, and go to:</p><pre>http://127.0.0.1:8000/</pre><figure><img alt="Django welcome page displayed after running local development server" src="https://cdn-images-1.medium.com/max/1024/1*b-lakPjrxA7Nukpqvt25sg.png" /></figure><p>If you see the above page, congratulations. You have successfully installed your first Django application, and ran the local deployment server.</p><p>This page confirms:</p><ul><li>Django is installed correctly</li><li>Your project is configured properly</li><li>The development server is running successfully</li></ul><p>🎉 Your First Django Server is Live!</p><p>Behind the scenes, Django has already:</p><ul><li>Loaded project settings</li><li>Initialized installed apps</li><li>Set up URL routing</li><li>Started the WSGI application server</li></ul><p>And all of this happened with just a single command:</p><pre>python manage.py runserver</pre><h3>What’s Next in This Series?</h3><p>Now that our project is up and running, we’ll start building actual functionality in the upcoming articles.</p><h3>📚 Upcoming Articles in This Django Series</h3><h3>Part 2 — Creating Your First App, Admin Panel, Superuser &amp; Migrations</h3><p>In our next article <a href="https://medium.com/@kunal.resolute/how-to-create-django-app-5f7141a118c0"><strong><em>Creating Your First Django App, Admin Panel, Superuser &amp; Migrations</em></strong></a>, we will:</p><ul><li>Create our first Django app</li><li>Understand the app architecture</li><li>Configure and explore the Django Admin Panel</li><li>Create a Superuser</li><li>Run makemigrations and migrate</li><li>Understand how Django manages database schema</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=507d2a1758ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Django Explained End-to-End: Architecture, ORM, Security & Backend Design (2026 Guide)]]></title>
            <link>https://medium.com/@kunal.resolute/django-explained-end-to-end-architecture-orm-security-backend-design-2026-guide-71cb35adb0f8?source=rss-ff73a5145bcc------2</link>
            <guid isPermaLink="false">https://medium.com/p/71cb35adb0f8</guid>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[backend-development]]></category>
            <dc:creator><![CDATA[Kunal Kejriwal]]></dc:creator>
            <pubDate>Fri, 13 Feb 2026 11:45:04 GMT</pubDate>
            <atom:updated>2026-02-13T11:45:04.041Z</atom:updated>
            <content:encoded><![CDATA[<p>Even though I have been a backend developer for over 3 years, the capabilities of modern web never fails to amaze me. Even today, when all I started with was an idea which quickly turned into a maze of routing logic, defining versions, authentication flows, database queries, form validation, asynchronous processing, cloud deployment, and security concerns. When I look at the codebase of APIEngine, I get flashbacks of the time when I underestimated how many moving parts would work in sync with one another for the application to be accessed by end users.</p><p>But let’s take a step back here. Let’s approach this article from the point of view of someone who isn’t a backend developer. You know the fundamentals of web, how a modern web application works, and maybe even heard about microservices, and you want to explore how the web works behind the scenes. So where do you start?</p><p>Your first choice would be to lock in a programming language you are most comfortable with, and you can choose Java, Python, JavaScript, C, or C++. Once you have locked in your language, you will need to select a web framework of your choice.</p><p>If that feels confusing, here’s a simple way to think about it:</p><ul><li><strong>Programming languages</strong> define the syntax and rules for writing instructions.</li><li><strong>Frameworks</strong> sit on top of languages, providing structure and prebuilt components to accelerate development.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*auBK1Lheyy8rNEeuUnxUGA.png" /></figure><p>For Java, Spring and Spring Boot are the go-to frameworks, whereas if your language of choice is Python, you can opt for either of FastAPI, Flask, or Django.</p><ul><li><strong>Java</strong> → Spring / Spring Boot</li><li><strong>Python</strong> → Django, FastAPI, Flask</li><li><strong>JavaScript</strong> → Express, NestJS</li></ul><p>In this article, we will be talking primarily about Django, and how it tries to address one of the core concerns of modern web development, powerful, but fragmented. At its core, <strong>Django is a high-level Python web framework designed for rapid, secure, and scalable backend development</strong>. Instead of forcing developers to assemble dozens of third-party tools, Django provides a cohesive, batteries-included ecosystem that handles the most critical aspects of building web applications:</p><ul><li>URL routing</li><li>Database interaction via ORM</li><li>Authentication &amp; authorization</li><li>Form handling &amp; validation</li><li>Security protections</li><li>Admin interfaces for internal tool</li></ul><h3><strong>Django for Modern Backend Development? Can it compete in 2026?</strong></h3><p>A frequent question I come across is “Is Django even worth learning in 2026?”. Now, while there might not be a universally acceptable answer to this question especially when you weigh in the fact that it was first introduced in 2005, over 20 years ago. With the rise of microframeworks and async-first frameworks &amp; tools, Django still manages to find its way into the GitHub repositories of organizations from across the world.</p><p>But what makes Django still relevant? Despite being over two decades old, Django continues to power modern applications — not because it is trendy, but because it solves real engineering problems with maturity and reliability.</p><h4>Batteries-Included Philosophy</h4><p>Unlike microframeworks that require assembling multiple libraries, Django ships with a cohesive ecosystem:</p><ul><li>ORM for database abstraction</li><li>Built-in authentication &amp; permissions</li><li>Admin dashboard auto-generated from models</li><li>Form handling &amp; validation</li><li>Security protections against common attacks</li></ul><p>This reduces <strong>decision fatigue</strong> and lets teams focus on business logic instead of infrastructure plumbing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bJnsAuWSnd6Mhw4faIMiKg.png" /></figure><h4>Security By Default</h4><p>Modern web applications face constant threats. Django was designed with security as a first-class concern.</p><p>Out of the box, Django protects against:</p><ul><li>SQL Injection</li><li>Cross-Site Scripting (XSS)</li><li>Cross-Site Request Forgery (CSRF)</li><li>Clickjacking</li><li>Session hijacking</li></ul><p>For organizations handling sensitive data (healthcare, finance, SaaS platforms), this built-in protection is a major advantage.</p><p>ORM That Scales With Complexity</p><p>Django’s ORM allows developers to work with databases using Python objects instead of raw SQL.</p><p>For beginners:</p><pre>User.objects.filter(is_active=True)</pre><p>For advanced use cases:</p><ul><li>Complex joins</li><li>Aggregations</li><li>Query optimizations</li><li>Database migrations</li></ul><p>This makes Django suitable for both small projects and enterprise-scale systems.</p><h4>The Admin Interface: An Underrated Superpower</h4><p>The Django web framework provides you with an admin interface out of the box, and accessible via “/admin” endpoint. With minimal configuration and a few lines of code, I get</p><ol><li>CRUD Interfaces for all objects/models.</li><li>Role-based access controls.</li><li>Search, filters, and pagination.</li><li>Data management without building custom dashboards.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*14kyO7yZUn3hakPD1J3UQw.png" /></figure><p>For internal tools and early-stage startups, this can save <strong>weeks of development time</strong>.</p><h4>Django in an Async &amp; Microservices World</h4><p>A common misconception is that Django is outdated because of async frameworks like FastAPI or Node.js.</p><p>Reality in 2026:</p><ul><li>Django supports <strong>ASGI</strong> and async views</li><li>Works seamlessly with Celery for background jobs</li><li>Can coexist in microservice architectures</li><li>Often used as a core service alongside async APIs</li></ul><p>Many teams use Django for:</p><ul><li>Core business logic</li><li>Admin &amp; internal tools</li><li>Data management layers</li></ul><p>While delegating high-throughput endpoints to async services.</p><p><strong>So, is Django worth learning in 2026?</strong></p><p>Modern web development can feel fragmented — a maze of frameworks, services, and architectural decisions. Django’s enduring appeal lies in its ability to <strong>simplify complexity without sacrificing power</strong>.</p><p>Whether you’re a beginner trying to understand backend systems or an experienced developer building production platforms, Django offers a foundation that is both approachable and battle-tested. And perhaps that’s why, even in 2026, it still quietly powers a significant portion of the web.</p><p>If your goal is to:</p><p>✅ Build secure, scalable backends<br>✅ Ship products quickly<br>✅ Reduce tooling complexity<br>✅ Work on real-world production systems</p><p>Then Django remains one of the most practical frameworks to learn.</p><p>If you need:<br> ⚡ Ultra-low latency APIs<br> ⚡ Real-time streaming<br> ⚡ Async-first architectures</p><p>You may complement Django with FastAPI, Node.js, or Go — not necessarily replace it.</p><h3>Django, From A Backend Perspective</h3><p>At a glance, Django is often described as a “Python web framework.” While technically accurate, this definition undersells what Django truly offers to backend engineers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JUwknAQcL3qKXF-TGAQJrQ.png" /></figure><p>Django is not just a tool for building web pages — it is a <strong>structured backend platform</strong> that provides the core building blocks required to design secure, scalable, and maintainable web systems.</p><p>To understand its value, we need to clarify three foundational ideas:</p><ul><li>Framework vs. library</li><li>Django’s “batteries-included” philosophy</li><li>Its architectural pattern: MVT vs. traditional MVC</li></ul><p>Django is a <strong>full-fledged framework</strong>. It decides:</p><ul><li>How requests are routed</li><li>Where business logic should live</li><li>How database models are structured</li><li>How responses are generated</li></ul><p>As a developer, you focus on defining models, views, and configuration — Django orchestrates the rest.</p><p>For backend engineers, this structure reduces decision fatigue and enforces architectural consistency across teams.</p><p>Django is famously described as a <strong>batteries-included framework</strong>. This means it ships with built-in solutions for problems that every web application must solve.</p><p>Instead of assembling multiple third-party tools, Django provides:</p><ul><li>ORM for database access</li><li>Authentication &amp; authorization</li><li>Form validation</li><li>Admin interface</li><li>Security protections</li><li>Session management</li><li>Middleware support</li></ul><h4>Why This Matters for Backend Systems</h4><p>In large systems, every additional dependency increases:</p><ul><li>Maintenance overhead</li><li>Security risk</li><li>Integration complexity</li></ul><p>Django reduces this surface area by offering a cohesive, well-tested ecosystem.</p><p>Think of it as the difference between assembling a server from parts versus deploying a preconfigured, production-ready environment.</p><p><strong>Why Django Appeals To Me as a Backend Developer?</strong></p><h4>1. Clear Separation of Concerns</h4><p>Each layer has a defined responsibility:</p><ul><li>Models → data &amp; relationships</li><li>Views → business logic &amp; request handling</li><li>Templates → presentation</li></ul><p>This separation prevents logic from leaking across layers, improving maintainability.</p><h4>2. Predictable Project Structure</h4><p>In Django projects, developers know where to find:</p><ul><li>Database models</li><li>URL routing</li><li>Business logic</li><li>Configuration</li></ul><p>This consistency is invaluable in team environments.</p><h4>3. Built-In Security &amp; Best Practices</h4><p>Django enforces patterns that protect against common vulnerabilities:</p><ul><li>ORM prevents SQL injection</li><li>Templates auto-escape HTML to prevent XSS</li><li>CSRF protection enabled by default</li></ul><p>Backend engineers don’t need to reinvent secure defaults.</p><h4>4. Scales from Monolith to Modular Systems</h4><p>Django’s app-based structure supports:</p><ul><li>Domain-driven design</li><li>Modular development</li><li>Gradual scaling</li></ul><p>You can start with a monolith and evolve toward service-oriented architectures without rewriting the foundation.</p><h3><strong>Django Architecture: Scratching the Surface</strong></h3><p>While it is quite difficult to explain the entire Django architecture in one sitting, it is indeed possible to give you a brief overview of how Django processes a request internally. This request–response lifecycle is the backbone of every Django application and directly influences how we design scalable, maintainable backend systems.</p><p>Rather than treating Django as a black box, backend engineers benefit from understanding the exact flow of execution.</p><h4>The Complete Request–Response Lifecycle</h4><p>At a high level, every Django application follows a structured and predictable pipeline, and the following image tries to capture that flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BW31myxLF9J2FZSNpr96ow.png" /></figure><p>Let’s break down each stage.</p><p><strong>Step 1: The Incoming HTTP Request</strong></p><p>Every interaction with a Django application begins with an HTTP request sent by a client — usually a browser, mobile app, or another backend service.</p><p>Example request:</p><pre>GET /posts/ HTTP/1.1<br>Host: example.com</pre><p>Django receives this request through the web server (e.g., Nginx + Gunicorn), which passes it to the Django application for processing.</p><p>From this point forward, Django’s internal machinery takes control.</p><p><strong>Step 2: Middleware Processing</strong></p><p>Before the request reaches your application logic, it passes through <strong>middleware</strong> — a layered system that can process requests globally.</p><p>Middleware acts like an interception layer for cross-cutting concerns such as:</p><ul><li>Authentication checks</li><li>Logging</li><li>Session management</li><li>Security filtering</li></ul><p>Conceptually:</p><pre>Request → [Middleware 1] → [Middleware 2] → [Middleware 3] → URL Router</pre><p>Each middleware can:</p><ul><li>Modify the request</li><li>Reject the request</li><li>Add metadata</li><li>Perform security validations</li></ul><p><strong>Step 3: URL Resolution (Routing Layer)</strong></p><p>For backend engineers, middleware is analogous to filters/interceptors in other frameworks like Spring Boot.Step 3: URL Resolution (Routing Layer)</p><p>Once middleware processing is complete, Django attempts to determine <strong>which piece of code should handle the request</strong>. This is done by the URL dispatcher.</p><p>Django matches the incoming URL against patterns defined in urls.py.</p><p>Example:</p><pre>path(&quot;posts/&quot;, views.post_list, name=&quot;post_list&quot;)</pre><p>Here, a request to /posts/ will be routed to the post_list view.</p><p>Centralized routing provides:</p><ul><li>Predictable request mapping</li><li>Clear API design</li><li>Easier debugging and maintenance</li></ul><p>For backend systems with dozens or hundreds of endpoints, this organized routing layer is critical.</p><p><strong>Step 4: View Execution (Business Logic Layer)</strong></p><p>Once a URL match is found, Django invokes the corresponding <strong>view</strong>. Despite the name, the view is not just for presentation — it is where the core backend logic resides.</p><p>The view typically performs:</p><ul><li>Input validation</li><li>Business logic execution</li><li>Database interactions</li><li>Decision-making for responses</li></ul><p>Example:</p><pre>def post_list(request):<br>    posts = Post.objects.all()<br>    return render(request, &quot;posts.html&quot;, {&quot;posts&quot;: posts})</pre><p>From a backend perspective, views function similarly to controllers in MVC frameworks. They orchestrate the flow between models and templates (or API responses).</p><p><strong>Step 5: Model Interaction via ORM</strong></p><p>If the view needs data, it communicates with the <strong>Model layer</strong>, which represents the database schema and business entities.</p><p>Django’s ORM translates Python code into SQL queries behind the scenes:</p><pre>View → ORM → SQL Query → Database → ORM → View</pre><p>This abstraction allows backend developers to focus on domain logic rather than raw SQL, while still maintaining database portability.</p><p>The ORM also introduces safeguards, such as automatic protection against SQL injection.</p><p><strong>Step 6: Template Rendering (If Required)</strong></p><p>For web applications that return HTML, Django uses templates to generate dynamic content.</p><pre>View → Template → HTML Response</pre><p>Templates ensure that presentation logic remains separate from backend business logic — a crucial principle for maintainable systems.</p><p>However, if the application is API-focused, this step may be skipped entirely, and the view may return JSON instead.</p><p><strong>Step 7: Returning the HTTP Response</strong></p><p>Finally, Django constructs an HTTP response object and sends it back through the middleware stack before reaching the client.</p><pre>View → Response → Middleware → Client</pre><p>This reverse traversal allows middleware to modify outgoing responses, such as adding headers or cookies.</p><p><strong>Separation of Concerns: Why This Architecture Scales</strong></p><p>One of Django’s strongest architectural advantages is strict separation of responsibilities.</p><p>This modular structure ensures that large teams can work on different layers independently without tightly coupling components.</p><p>For example:</p><ul><li>Database engineers focus on models</li><li>Backend engineers design views and services</li><li>Frontend engineers modify templates</li></ul><p>Such separation is essential for scaling both the codebase and the team.</p><p><strong>Comparing Django’s Flow with Other Backend Frameworks</strong></p><p>From a backend engineering standpoint, Django’s lifecycle closely resembles structured frameworks like Spring Boot, but with Pythonic simplicity.</p><p>High-level comparison:</p><pre>Spring Boot:   Filter → DispatcherServlet → Controller → Service → Repository → Response<br>Django:        Middleware → URL Router → View → Model (ORM) → Response</pre><p>Both follow layered architecture principles, but Django reduces boilerplate while preserving clarity.</p><p>Django’s architecture is intentionally layered and opinionated. Every request flows through a predictable pipeline:</p><ul><li>Middleware handles cross-cutting concerns</li><li>URL routing determines execution entry points</li><li>Views encapsulate business logic</li><li>Models manage database interaction</li><li>Templates render presentation when needed</li></ul><p>This structured flow enables developers to build backend systems that remain clean, secure, and scalable as complexity grows.</p><h3>Conclusion: Understanding Django Before Writing Django</h3><p>Modern backend development is rarely about writing a few endpoints and calling it a day. It is about orchestrating multiple moving parts — routing layers, data models, authentication systems, background jobs, deployment pipelines, and security boundaries — all working together to deliver a reliable product to end users.</p><p>Django’s real strength lies in how elegantly it brings these pieces together.</p><p>Throughout this article, we explored Django not just as a Python web framework, but as a structured backend platform. We discussed how its batteries-included philosophy reduces dependency sprawl, how its layered architecture enforces separation of concerns, and why its built-in security and ORM make it suitable for both small projects and enterprise-scale systems. We also examined how Django continues to remain relevant in 2026, even in a world filled with async-first frameworks and microservice-heavy architectures.</p><p>For beginners, Django provides a guided path into backend development without overwhelming them with tooling decisions. For experienced engineers, it offers a mature, opinionated foundation that prioritizes maintainability, security, and long-term scalability. In many ways, Django acts as a stable core around which modern backend systems can evolve — whether that means integrating async services, background workers, or distributed architectures.</p><p>Understanding these architectural principles is far more important than memorizing commands or boilerplate code. Once you grasp how Django thinks about request handling, data modeling, and separation of concerns, the framework stops feeling magical and starts feeling predictable — and that predictability is what makes it powerful.</p><p>This article intentionally focused on the conceptual and architectural side of Django, because before we start building applications, we need to understand the philosophy and structure that guide them.</p><h3>What’s Next in This Series?</h3><p>In the next article of this series, we will move from concepts to practice.</p><p>We will walk step by step through setting up a Django project the right way — not just running a few commands, but understanding what each generated file does, why the project structure exists, and how to configure a production-ready development environment. We will cover virtual environments, project initialization, app creation, and how Django’s default layout supports scalable backend design from day one.</p><p>If this article helped you see Django from a backend engineering perspective, the next one will help you get your hands dirty and actually start building with it — with a clear understanding of what is happening under the hood.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71cb35adb0f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[REST APIs Explained: How the Web Talks Behind the Scenes]]></title>
            <link>https://medium.com/@kunal.resolute/rest-apis-explained-how-the-web-talks-behind-the-scenes-a6c80020f166?source=rss-ff73a5145bcc------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6c80020f166</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[django-rest-framework]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Kunal Kejriwal]]></dc:creator>
            <pubDate>Sun, 08 Feb 2026 15:16:10 GMT</pubDate>
            <atom:updated>2026-02-08T15:16:10.575Z</atom:updated>
            <content:encoded><![CDATA[<p>Every time you book a cab, scroll through social media, check your bank balance, or order food online, something extraordinary happens behind the scenes.</p><p>Your app talks to a server.</p><p>Not in plain English. Not through files. Not through emails.</p><p>It communicates through <strong>APIs</strong>.</p><p>APIs (Application Programming Interfaces) are the digital messengers of the modern world. They allow different software systems — built in different languages, running on different machines, across different continents — to communicate seamlessly in real time.</p><p>And among all types of APIs that exist today, one style dominates the internet.</p><p>That style is <strong>REST</strong>.</p><p>REST APIs power:</p><ul><li>Mobile applications</li><li>Web applications</li><li>Cloud platforms</li><li>Microservices architectures</li><li>IoT systems</li><li>AI and ML platforms</li></ul><p>From startups to global tech giants like Amazon, Netflix, Google, and Twitter — REST APIs form the <strong>foundation of scalable, distributed software systems</strong>.</p><p>But here’s the thing.</p><p>REST is <strong>not a technology</strong>.<br>It’s <strong>not a framework</strong>.<br>It’s <strong>not a library</strong>.</p><p>It’s an <strong>architectural philosophy</strong> for designing networked applications.</p><p>Understanding REST is not just about knowing endpoints and JSON. It’s about understanding <strong>how the web itself was designed to work</strong> — and why that design scales to billions of users.</p><p>In this article, we’ll go deep into:</p><ul><li>What APIs really are</li><li>Why REST became the dominant standard</li><li>The philosophy behind REST</li><li>How REST APIs actually work</li></ul><p>Let’s start at the foundation.</p><h3>What Is an API?</h3><p>An <strong>API (Application Programming Interface)</strong> is a contract that allows two software systems to communicate with each other.</p><p>Imagine walking into a restaurant.</p><p>You (the client) don’t go into the kitchen to cook your food. Instead, you talk to a <strong>waiter</strong> (the API). The waiter takes your request to the kitchen (the server), brings back your food (the response), and ensures both sides follow a defined structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yjOLMFYBGSGrSiDThmUlWw.png" /></figure><p>That’s exactly how APIs work in software.</p><h3>In Technical Terms</h3><p>An API defines:</p><ul><li><strong>What requests can be made</strong></li><li><strong>How those requests should be formatted</strong></li><li><strong>What responses look like</strong></li><li><strong>What rules both sides must follow</strong></li></ul><p>APIs abstract complexity. The client does not need to know:</p><ul><li>What database the server uses</li><li>What language the backend is written in</li><li>How the business logic works internally</li></ul><p>It only needs to know <strong>how to talk to the API</strong>.</p><p>This decoupling is what allows large systems to scale, evolve, and integrate with other platforms.</p><h3>So Where Does REST Come In?</h3><p>As software systems grew larger and the internet expanded, engineers needed a <strong>standardized way</strong> for systems to communicate over the web.</p><p>This led to the rise of <strong>web APIs</strong> — APIs that operate over the internet using HTTP.</p><p>But early web services were complicated.</p><p>They used heavy protocols like <strong>SOAP (Simple Object Access Protocol)</strong>, which relied on XML, strict rules, and complex contracts. While powerful, SOAP was rigid and hard to scale for the rapidly growing web.</p><p>Then came a simpler, more elegant idea.</p><p>In the year 2000, computer scientist <strong>Roy Fielding</strong> introduced a new architectural style in his doctoral dissertation.</p><p>He called it:</p><blockquote><strong><em>REST — Representational State Transfer</em></strong></blockquote><p>This wasn’t a protocol or a standard specification.</p><p>It was a <strong>set of design principles</strong> inspired by how the web already worked.</p><p>And those principles changed everything.</p><h3>What Is a REST API?</h3><p>A REST API, or representational state transfer <a href="https://cloud.google.com/apis">application programming interface</a>, is an architectural style that’s commonly seen as the standard for designing and building the networked applications that power the web. It provides a set of rules and constraints that, when followed, result in web services that are simple, scalable, and easy to integrate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OZNBpW5Ed6-U9Gp99RWXww.png" /></figure><blockquote>A REST API is an API that conforms to the design principles of the REST architectural style. At its core, REST revolves around the idea of resources, which can be any piece of information like a user, product, document, or collection of items.</blockquote><h3>How does a REST API work?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GN3XClqftj5DQ0Ei9ZN_vA.png" /></figure><h4>1. Client sends request</h4><p>A client application (like a mobile app, web browser, or another server) initiates a request to the API to perform an action. This request is sent to a specific URL and includes an HTTP method, headers with metadata, and sometimes a request body with data.</p><h4>2. Server processes request</h4><p>The server receives and validates the request, confirming that the client is authenticated and authorized to perform the requested action. It then processes the request, which could involve retrieving data from a database, creating a new resource, or updating an existing one.</p><h4>3. Server sends response</h4><p>After processing the request, the server sends a response back to the client. This response includes an HTTP status code indicating the outcome (for example, 200 OK for success, 404 Not Found if the resource doesn’t exist, 401 Unauthorized for security issues), along with the requested data in the response body.</p><h4>4. Data transfer</h4><p>The data transferred between the client and server is a “representation” of the state of the resource. JSON (JavaScript Object Notation) is the most common format for this data because it is lightweight, human-readable, and easy for programming languages to parse.</p><h3>REST API architecture and components</h3><p>The power and scalability of REST come from a set of architectural constraints that guide its design. A system that adheres to these constraints is considered “RESTful.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qRqHZtrNMN8KCMDZ42VwPA.png" /></figure><h4>Resources</h4><p>A resource is a fundamental concept in REST. It is an object with a type, associated data, relationships to other resources, and a set of methods that operate on it. For example, in an e-commerce API, a “product” or a “customer” would be a resource.</p><h4>URIs (uniform resource identifiers)</h4><p>Each resource is uniquely identified by a URI. A well designed API uses clean, descriptive, and consistent URIs to identify its resources. For example, /users might identify a collection of users, and /users/123 would identify a specific user with the ID 123.</p><pre>https://yourdomain.com/api/v1/users<br>https://yourdomain.com/api/v1/users/123</pre><h4>Representations</h4><p>A client does not interact with the resource directly but with a representation of that resource. The most common representation format is <a href="https://cloud.google.com/storage/docs/json_api">JSON</a>, but others like XML or HTML can also be used. This provides a flexible way to represent the state of a resource.</p><pre>{<br>  &quot;first_name&quot; : &quot;kunal&quot;,<br>  &quot;last_name&quot; : &quot;kejriwal&quot;,<br>  &quot;email_address&quot; : &quot;kunal_kejriwal@invalid.com&quot;<br>}</pre><h4>Statelessness</h4><p>Every request from a client to the server must contain all the information the server needs to understand and process the request. The server does not store any client context or session state between requests. This constraint makes REST APIs highly scalable because any server can handle any request.</p><h4>Client-server architecture</h4><p>The client and server are separated, with the API acting as the interface between them. This separation of concerns allows the client-side application and the server-side application to evolve independently.</p><h4>Uniform interface</h4><p>REST requires a consistent, uniform interface between the client and server. This is achieved through the use of standard HTTP methods, URIs for resource identification, and hypermedia as the engine of application state (HATEOAS).</p><h4>Cacheability</h4><p>Responses from the server should be defined as cacheable or non-cacheable. When a response is cacheable, a client or intermediary can reuse that response for subsequent, identical requests, which can significantly improve performance and reduce server load.</p><h4>Layered system</h4><p>A client connected to a REST API cannot ordinarily tell whether it is connected directly to the end server or to an intermediary along the way. Intermediary servers, such as API gateways or load balancers, can be introduced to the architecture to improve scalability, security, and performance.</p><h3>Benefits of using REST APIs</h3><h4>Simplicity and readability</h4><p>REST APIs use standard HTTP methods and human-readable URIs, making them relatively easy for developers to learn, use, and debug. The self-descriptive nature of the interface simplifies integration efforts.</p><h4><strong>Scalability</strong></h4><p>The stateless nature of REST is a key enabler of scalability. Since the server doesn’t need to maintain client sessions, it’s easy to distribute requests across multiple servers, and new servers can be added to handle increased load without complexity.</p><h4><strong>Flexibility</strong></h4><p>REST supports a variety of data formats, with JSON being the most popular due to its lightweight nature and broad support. This flexibility allows REST APIs to be used by a wide range of client applications, from web browsers to mobile devices and IoT sensors.</p><h4><strong>Decoupling of client and server</strong></h4><p>The client-server architecture enforced by REST creates a clear separation of concerns. This allows developers to work on the client-side frontend and the server-side backend independently, which can accelerate development cycles.</p><h4><strong>Language agnostic</strong></h4><p>Because REST is an architectural style built on standard HTTP, it can be implemented in any programming language and consumed by any client capable of making HTTP requests. This provides maximum interoperability between diverse technology stacks.</p><h3>REST API best practices</h3><h4>1. Use nouns for resources</h4><p>URIs should represent resources, so they should use nouns (plural for collections, singular or an ID for a specific item), not verbs. For example, use /users to represent all users, not /getAllUsers.</p><h4>2. Use HTTP Methods Correctly</h4><p>Use the standard HTTP verbs to represent actions: GET for retrieval, POST for creation, PUT for updates, and DELETE for removal. This creates a predictable and consistent interface.</p><h4>3. Implement HATEOAS (Hypermedia as the engine of application state)</h4><p>A key principle of REST is that a response should include links to other related actions or resources. This allows the client to navigate the API dynamically without having to hard-code URI patterns.</p><h4>4. Versioning</h4><p>When you need to make breaking changes to an API, introduce a new version. The most common practice is to include the version number in the URI, such as /api/v2/users. This allows existing clients to continue using the old version while new clients can adopt the new one.</p><h4>5. Handle errors gracefully</h4><p>When a request fails, provide a clear, useful error message in the response body along with the appropriate HTTP status code (for example, 400 Bad Request, 500 Internal Server Error). This helps the client-side developer understand what went wrong.</p><h4>6. Security (Authentication and Authorization)</h4><p>Protect your API by implementing robust authentication (for example, OAuth 2.0, API keys) to verify the client’s identity and authorization to ensure the client only has access to the resources they are permitted to see. Always use TLS/SSL to encrypt traffic.</p><h4>7. Pagination, Filtering, and Sorting</h4><p>For endpoints that can return a large number of items, implement pagination to return data in manageable chunks. Also, provide query parameters to allow clients to filter and sort the results, which reduces the amount of data transferred.</p><h3>Tools &amp; Resources Needed to Build REST APIs</h3><p>Building a REST API is not just about writing a few endpoints. It requires a complete ecosystem of tools, technologies, and supporting services that work together to make the API reliable, secure, and scalable.</p><p>Let’s break down everything involved.</p><h4>Programming Languages</h4><p>REST APIs can be built in almost <strong>any modern programming language</strong>. The choice usually depends on team expertise, ecosystem support, and performance requirements.</p><p>Popular choices include:</p><ul><li><strong>Java</strong> — Widely used in enterprise systems</li><li><strong>Python</strong> — Great for rapid development and data-heavy apps</li><li><strong>JavaScript (Node.js)</strong> — Ideal for full-stack JavaScript environments</li><li><strong>C# (.NET)</strong> — Strong for Microsoft ecosystems</li><li><strong>Go</strong> — Known for performance and concurrency</li><li><strong>Ruby</strong> — Famous for developer-friendly syntax</li></ul><p>The language itself doesn’t make an API RESTful — <strong>design principles do</strong>.</p><h4>Web Frameworks (Where REST APIs Are Built)</h4><p>Frameworks provide the structure and utilities to create routes, handle requests, and return responses.</p><ol><li><strong>Java Ecosystem</strong></li></ol><ul><li><strong>Spring Boot</strong> — The most popular Java framework for REST APIs. Built-in support for REST controllers, security, and database integration.</li><li><strong>Jakarta EE</strong> — Enterprise-grade Java with JAX-RS for REST services.</li><li><strong>Micronaut</strong> — Lightweight, fast startup, cloud-native.</li><li><strong>Quarkus</strong> — Optimized for containers and serverless.</li></ul><p>2. <strong>Python Ecosystem</strong></p><ul><li><strong>Django REST Framework</strong> — Powerful, full-featured toolkit on top of Django.</li><li><strong>FastAPI</strong> — Modern, ultra-fast, automatic API docs.</li><li><strong>Flask</strong> — Lightweight and flexible.</li><li><strong>Tornado</strong> — Good for long-lived connections.</li></ul><p>3. <strong>JavaScript / Node.js Ecosystem</strong></p><ul><li><strong>Express.js</strong> — Minimalist and extremely popular.</li><li><strong>NestJS</strong> — Structured, enterprise-style Node.js framework.</li><li><strong>Koa.js</strong> — Lightweight, modern middleware.</li><li><strong>Hapi.js</strong> — Configuration-driven framework.</li></ul><p><strong>4. .NET Ecosystem</strong></p><p><strong>5. Go Ecosystem</strong></p><h4>Databases (Where Data Lives)</h4><p>APIs usually interact with a database to store and retrieve data.</p><p><strong>Relational Databases</strong></p><ul><li><strong>PostgreSQL</strong></li><li><strong>MySQL</strong></li><li><strong>Microsoft SQL Server</strong></li></ul><p><strong>NoSQL Databases</strong></p><ul><li><strong>MongoDB</strong></li><li><strong>Redis</strong></li><li><strong>Cassandra</strong></li></ul><h4>API Testing Tools</h4><ul><li><strong>Postman</strong> — Most popular API testing tool</li><li><strong>Insomnia</strong> — Lightweight REST client</li><li><strong>Swagger UI</strong> — Interactive API docs</li><li><strong>cURL</strong> — Command-line HTTP requests</li></ul><h4>API Documentation Tools</h4><p>Security is critical in REST APIs.</p><p>Common methods include:</p><ul><li>API Keys</li><li>OAuth 2.0</li><li>JWT (JSON Web Tokens)</li><li>Basic Authentication</li><li>Role-based access control</li></ul><p>Libraries like <strong>Spring Security</strong>, <strong>Passport.js</strong>, and <strong>Auth0</strong> simplify this.</p><h4>Deployment &amp; Hosting Platforms</h4><p>Once built, APIs need to be deployed somewhere.</p><ul><li><strong>Amazon Web Services (AWS)</strong></li><li><strong>Google Cloud Platform</strong></li><li><strong>Microsoft Azure</strong></li><li><strong>Heroku</strong></li><li><strong>Docker</strong></li><li><strong>Kubernetes</strong></li></ul><h4>Monitoring &amp; Logging</h4><p>After deployment, APIs must be monitored.</p><ul><li><strong>Prometheus</strong></li><li><strong>Grafana</strong></li><li><strong>ELK Stack</strong></li><li><strong>Datadog</strong></li></ul><h3>Conclusion: REST APIs Are the Language of the Modern Internet</h3><p>Behind every modern digital experience — from food delivery apps to banking platforms, from streaming services to cloud dashboards — REST APIs are quietly doing the heavy lifting.</p><p>They are the invisible bridges connecting:</p><ul><li>Frontend interfaces to backend systems</li><li>Mobile apps to cloud services</li><li>Microservices to each other</li><li>Businesses to third-party platforms</li></ul><p>Understanding REST APIs is not just about learning how to send a GET or POST request. It’s about understanding <strong>how distributed systems communicate at scale</strong>.</p><p>Throughout this article, we explored how REST APIs:</p><p>✔ Treat everything as a <strong>resource</strong><br> ✔ Use standard <strong>HTTP methods</strong> to perform actions<br> ✔ Transfer <strong>representations of data</strong> (usually JSON)<br> ✔ Remain <strong>stateless</strong>, making them scalable and reliable<br> ✔ Follow a <strong>client–server model</strong> that allows independent evolution</p><p>We also looked at the <strong>real-world ecosystem</strong> required to build production-ready APIs — frameworks, databases, security mechanisms, documentation tools, deployment platforms, and monitoring systems. REST is not just a design style; it’s the backbone of modern backend engineering.</p><p>Even with newer technologies like GraphQL and gRPC gaining popularity, REST continues to dominate because it is:</p><ul><li><strong>Simple to understand</strong></li><li><strong>Based on universal web standards</strong></li><li><strong>Easy to scale</strong></li><li><strong>Language and platform agnostic</strong></li><li><strong>Supported by every major framework</strong></li></ul><p>It aligns perfectly with how the web was designed, which is why it has stood the test of time.</p><h3>Where You Go From Here</h3><p>If you truly want to master REST APIs, don’t stop at theory.</p><p>Start building:</p><ul><li>A simple CRUD API</li><li>Authentication with JWT</li><li>Pagination and filtering</li><li>Rate limiting</li><li>API versioning</li><li>Proper error handling</li></ul><p>Because REST is best understood not just by reading — but by designing, breaking, scaling, and refining real systems.</p><p>REST APIs are the <strong>language of modern software systems</strong>.</p><p>Once you understand how this language works, you unlock the ability to build applications that communicate across servers, platforms, and continents.</p><p>And in today’s connected world, that’s not just useful — it’s essential.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6c80020f166" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>