Sagar’s Blog
Author ↗

This blog is written by Sagar Sangwan, a software engineer working on full-stack systems, AI tooling, and production software. These posts are notes from real work — what failed, what shipped, and what mattered.

PortfolioGitHubLinkedIn

© 2026 Sagar Sangwan · blogs.sagarsangwan.dev

Notes on Building Software

Practical writing on web development, AI systems, and engineering decisions — based on real projects, not tutorials rewritten for SEO.

Written by Sagar Sangwan, software engineer.

A small personal request

Help me reach 500 subscribers on YouTube

I am building content consistently and your support means a lot. If my blogs help you, please watch one full video and subscribe.

Watch My VideosSubscribe To Help

Showing 34 of 34 posts

How I Built Google OAuth for a Real SaaS (Next.js + Auth.js) — CreatorCopilot Part 2

How I Built Google OAuth for a Real SaaS (Next.js + Auth.js) — CreatorCopilot Part 2

authenticationnextjscodingbysagar

Learn how to implement production-ready Google OAuth in Next.js using Auth.js (NextAuth v5) with App...

Learn how to implement production-ready Google OAuth in Next.js using Auth.js (NextAuth v5) with App Router. This guide covers secure setup, session handling, and how to prepare yo...

4
How I Prevent My APIs From Being Destroyed by Bots

How I Prevent My APIs From Being Destroyed by Bots

web developmentsoftware developmentreactjs

A practical guide to protecting your APIs from bots using rate limiting, request throttling, caching...

A practical guide to protecting your APIs from bots using rate limiting, request throttling, caching, and bot detection with simple production-ready code examples.

4
SE7 Practical Python Scripts That Automate Everyday Tasks (Real Tools You’ll Actually Use)

SE7 Practical Python Scripts That Automate Everyday Tasks (Real Tools You’ll Actually Use)

Discover 7 practical Python scripts that automate everyday tasks like cleaning your Downloads folder...

Discover 7 practical Python scripts that automate everyday tasks like cleaning your Downloads folder, renaming files, converting images to WebP, checking website uptime, and more. ...

3
The SEO Stack I Actually Use in My Next.js Blog (With Real Implementation)

The SEO Stack I Actually Use in My Next.js Blog (With Real Implementation)

next.jsreactjssitemaps

A practical guide to implementing a production-ready SEO stack in a Next.js blog. Learn how to add J...

A practical guide to implementing a production-ready SEO stack in a Next.js blog. Learn how to add JSON-LD structured data, breadcrumb schema, dynamic sitemap, RSS feed, and Open G...

15
How I Built an Email Sending System in Next.js with Drizzle, PostgreSQL & Brevo (Queue + Daily Limits)

How I Built an Email Sending System in Next.js with Drizzle, PostgreSQL & Brevo (Queue + Daily Limits)

smtpjavascriptreactjs

Learn how to build an email queue system in Next.js with Drizzle, Postgres, and Brevo SMTP including...

Learn how to build an email queue system in Next.js with Drizzle, Postgres, and Brevo SMTP including daily limits, batch processing, and failure logging.

23
Why RSS Feeds Still Win in 2026: A Guide for Next.js Developers

Why RSS Feeds Still Win in 2026: A Guide for Next.js Developers

javascriptreactjsnext.js

If you’re a creator, engineer, or indie builder, you’ve probably learned this the hard way: Algorith...

If you’re a creator, engineer, or indie builder, you’ve probably learned this the hard way: Algorithms are fickle. Platforms can change their reach overnight. A single tweak to a f...

6
API Gateway vs Direct Service Calls — Real Trade-offs (from building microservices)

API Gateway vs Direct Service Calls — Real Trade-offs (from building microservices)

next.jsprogrammingpython

The right choice depends on your stage, your clients, and what you’re willing to operationally own. ...

The right choice depends on your stage, your clients, and what you’re willing to operationally own. I’ve built microservice setups where direct calls were the only reason we shippe...

10
Tired of a Messy Downloads Folder? I Built a Python Script to Fix It Forever

Tired of a Messy Downloads Folder? I Built a Python Script to Fix It Forever

Performance OptimizationAccessibilityData Science

We’ve all been there. You look at your Downloads folder and it’s a digital graveyard. PDFs mixed wit...

We’ve all been there. You look at your Downloads folder and it’s a digital graveyard. PDFs mixed with cat memes, random .exe installers, and three different versions of the same .z...

19
Class-Based Views vs. Function-Based Views in Django REST Framework

Class-Based Views vs. Function-Based Views in Django REST Framework

BackendWeb DevelopmentREST API

Choosing the right architecture for your API endpoints is crucial for building scalable and maintain...

Choosing the right architecture for your API endpoints is crucial for building scalable and maintainable applications. In the Django REST Framework (DRF), you have two primary ways...

18
Next.js vs. React: Choosing the Right Framework for Your Project

Next.js vs. React: Choosing the Right Framework for Your Project

ReactFrontendWeb Development

Unlock the power of React and Next.js! This guide clarifies their key differences, ideal use cases, ...

Unlock the power of React and Next.js! This guide clarifies their key differences, ideal use cases, and helps you choose the best framework for your web development project. Learn ...

36
10 Mind-Blowing JavaScript One-Liners

10 Mind-Blowing JavaScript One-Liners

ReactPerformance OptimizationFrontend

Master JavaScript with these 10 concise and powerful one-liners. Level up your coding skills with ef...

Master JavaScript with these 10 concise and powerful one-liners. Level up your coding skills with efficient and elegant solutions for common tasks. Learn now!

17
How to Manage Django Settings for Local and Production Environments

How to Manage Django Settings for Local and Production Environments

DjangoAccessibilityPerformance Optimization

In this blog, we’ll structure Django settings efficiently using a modular approach. We’ll create a s...

In this blog, we’ll structure Django settings efficiently using a modular approach. We’ll create a settings/ folder with separate files for base settings, local settings, and produ...

229
The Ultimate .gitignore Guide for Django and Next.js Projects

The Ultimate .gitignore Guide for Django and Next.js Projects

Web DevelopmentAccessibilityDjango

Learn how to use .gitignore effectively to keep your Git repository clean. Avoid committing unnecess...

Learn how to use .gitignore effectively to keep your Git repository clean. Avoid committing unnecessary files and streamline your workflow with best practices.

88
Git and GitHub for Beginners: A Complete Step-by-Step Guide

Git and GitHub for Beginners: A Complete Step-by-Step Guide

CI/CDWeb Development

New to Git and GitHub? This beginner-friendly guide covers Git commands, repositories, branching, me...

New to Git and GitHub? This beginner-friendly guide covers Git commands, repositories, branching, merging, and collaboration. Perfect for beginners!

30
Next.js Blog SEO: How to Implement Metadata for Maximum Visibility

Next.js Blog SEO: How to Implement Metadata for Maximum Visibility

Next.jsReactWeb Development

Boost your Next.js blog's SEO and social sharing with the generateMetadata function. Learn to optimi...

Boost your Next.js blog's SEO and social sharing with the generateMetadata function. Learn to optimize visibility and engagement effectively.

125
The U.S. Government’s Bold $500 Billion Investment in AI Infrastructure

The U.S. Government’s Bold $500 Billion Investment in AI Infrastructure

AI

The U.S. government has announced a historic $500 billion investment in AI infrastructure. Learn how...

The U.S. government has announced a historic $500 billion investment in AI infrastructure. Learn how this initiative, in collaboration with OpenAI, Oracle, and SoftBank, will shape...

29
How Can You Build an AI News Aggregator with Flask & Vercel for Free? 📰

How Can You Build an AI News Aggregator with Flask & Vercel for Free? 📰

AIAPIBackend

Build and deploy an AI-powered news aggregator with Flask, Python, and Vercel. Scrape, analyze, and ...

Build and deploy an AI-powered news aggregator with Flask, Python, and Vercel. Scrape, analyze, and deliver real-time trending news with AI insights

17
How to Automate Your Daily Tasks with Python: 5 Advanced Scripts for Real Productivity

How to Automate Your Daily Tasks with Python: 5 Advanced Scripts for Real Productivity

AIFlaskPython

Boost productivity with Python automation! Discover 5 powerful scripts to track expenses, summarize ...

Boost productivity with Python automation! Discover 5 powerful scripts to track expenses, summarize news, and automate tasks like AI-powered email responses.

36
Build a Reusable Multi-Select Dropdown in React with ShadCN & React Hook Form

Build a Reusable Multi-Select Dropdown in React with ShadCN & React Hook Form

Web DevelopmentFrontendUI/UX

Learn to build a reusable multi-select dropdown in React with ShadCN UI and react-hook-form. Add dyn...

Learn to build a reusable multi-select dropdown in React with ShadCN UI and react-hook-form. Add dynamic options, validation, and seamless form handling.

78
How to build a Live Password Strength Meter in Next.js with zxcvbn.js

How to build a Live Password Strength Meter in Next.js with zxcvbn.js

AuthenticationNext.jsTailwindCSS

Build a real-time password strength meter in Next.js using zxcvbn.js. Learn to evaluate password sec...

Build a real-time password strength meter in Next.js using zxcvbn.js. Learn to evaluate password security and estimate crack time effectively.

48
Top 13 Prisma Extensions for Enhanced Database Capabilities

Top 13 Prisma Extensions for Enhanced Database Capabilities

Next.jsJavaScriptPerformance Optimization

Discover powerful Prisma extensions for Node.js and TypeScript to enhance caching, pagination, RBAC,...

Discover powerful Prisma extensions for Node.js and TypeScript to enhance caching, pagination, RBAC, and more. Supercharge your database operations today!

18
PDF Generation in Next.js 15 with Puppeteer

PDF Generation in Next.js 15 with Puppeteer

BackendJavaScriptNext.js

Learn to integrate Puppeteer with Next.js 15 for seamless HTML-to-PDF conversion. Set up API routes ...

Learn to integrate Puppeteer with Next.js 15 for seamless HTML-to-PDF conversion. Set up API routes and enable easy PDF downloads in your app

204
Build a Simple Python Data Transformation Tool with a Web Interface (Step-by-Step Guide)

Build a Simple Python Data Transformation Tool with a Web Interface (Step-by-Step Guide)

FlaskBackendDjango

Learn how to build a Python script with a web interface to upload, transform, and download Excel sal...

Learn how to build a Python script with a web interface to upload, transform, and download Excel sales data. A simple solution for seamless data conversion between tools.

125
Dynamic Pricing and Discounts: Developing a Token Purchase Interface in React

Dynamic Pricing and Discounts: Developing a Token Purchase Interface in React

Web DevelopmentUI/UXNext.js

Build a user-friendly token purchase interface in React with reusable components and custom hooks. L...

Build a user-friendly token purchase interface in React with reusable components and custom hooks. Learn pricing logic, dynamic discounts, and cost calculation.

8
Generate a Dynamic Sitemap in Next.js with Prisma

Generate a Dynamic Sitemap in Next.js with Prisma

Web DevelopmentNext.jsSEO

Learn to create a dynamic sitemap in Next.js using Prisma. Improve SEO by helping search engines eff...

Learn to create a dynamic sitemap in Next.js using Prisma. Improve SEO by helping search engines efficiently index your website.

32
How to Add Social Media Sharing in a Next.js Blog

How to Add Social Media Sharing in a Next.js Blog

Responsive DesignUI/UXReact

Boost engagement by adding social media sharing in Next.js. Learn to create a shareable blog post co...

Boost engagement by adding social media sharing in Next.js. Learn to create a shareable blog post component for Twitter, Facebook, LinkedIn, and more.

59
Prisma in Next.js 15 with JavaScript: Step-by-Step Guide

Prisma in Next.js 15 with JavaScript: Step-by-Step Guide

PrismaReactWeb Development

Set up Prisma in a Next.js 15 project with JavaScript. Learn to create a singleton file to prevent m...

Set up Prisma in a Next.js 15 project with JavaScript. Learn to create a singleton file to prevent multiple instances and streamline database management

97
How to Track Page Views and Set Cookies in Next.js : A Complete Guide

How to Track Page Views and Set Cookies in Next.js : A Complete Guide

Performance OptimizationJavaScriptReact

Learn to track user activity in your website, including page views, view counts, and cookie manageme...

Learn to track user activity in your website, including page views, view counts, and cookie management, for better analytics and user experience.

73
Google Login with Django & React – Part 1 (Seamless Authentication Guide

Google Login with Django & React – Part 1 (Seamless Authentication Guide

AuthenticationReactWeb Development

Integrate Google OAuth2 with Django and React for seamless authentication. Follow this part 2 step-b...

Integrate Google OAuth2 with Django and React for seamless authentication. Follow this part 2 step-by-step guide to enhance user login in your web app.

9
Seamless Google Login with Django & React – Part 2 (Complete Authentication Guide)

Seamless Google Login with Django & React – Part 2 (Complete Authentication Guide)

AuthenticationWeb DevelopmentDjango

Integrate Google OAuth2 with Django and React for seamless authentication. Follow this step-by-step ...

Integrate Google OAuth2 with Django and React for seamless authentication. Follow this step-by-step guide to enhance user login in your web app.

21
Next.js Email: Google SMTP Step By Step With Example Code

Next.js Email: Google SMTP Step By Step With Example Code

Web DevelopmentJavaScriptNext.js

Learn to send emails in Next.js using Google SMTP and Nodemailer. Follow this step-by-step guide to ...

Learn to send emails in Next.js using Google SMTP and Nodemailer. Follow this step-by-step guide to set up and integrate email functionality easily.

150
Build a Validated Multi-Step Form with ShadCN & React Hook Form (Step-by-Step Guide)

Build a Validated Multi-Step Form with ShadCN & React Hook Form (Step-by-Step Guide)

ReactJavaScriptNext.js

If you’re developing a multistep form in Next.js, ensuring validation at every step can improve user...

If you’re developing a multistep form in Next.js, ensuring validation at every step can improve user experience. In this guide, we’ll use ShadCN UI, React Hook Form, and Zod to cre...

457
Connect React/Next.js to Google Drive API (V3) for File Upload, Search & Retrieval

Connect React/Next.js to Google Drive API (V3) for File Upload, Search & Retrieval

JavaScriptAPIWeb Development

Integrate Google Drive API with Next.js or React.js to upload and retrieve files. Follow this step-b...

Integrate Google Drive API with Next.js or React.js to upload and retrieve files. Follow this step-by-step guide to add seamless cloud storage to your app

170
Next.js Authentication in 2025: NextAuth + Free DBs vs Clerk vs Auth0

Next.js Authentication in 2025: NextAuth + Free DBs vs Clerk vs Auth0

Next.jsJavaScriptAuthentication

Next.js authentication: Compare NextAuth with free databases like Neon & Supabase vs. third-party so...

Next.js authentication: Compare NextAuth with free databases like Neon & Supabase vs. third-party solutions like Clerk & Auth0. Find the best fit for your app.

159
Get in Touch
Have a question? Drop a message below.

Stay Updated

Subscribe to get the latest posts delivered to your inbox