<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Anandu</title>
    <description>The latest articles on Forem by Anandu (@ananduapillai).</description>
    <link>https://forem.com/ananduapillai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2359437%2Fde256f5d-fd2c-4edb-ac06-c5349c6b7014.jpg</url>
      <title>Forem: Anandu</title>
      <link>https://forem.com/ananduapillai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ananduapillai"/>
    <language>en</language>
    <item>
      <title>Building a Minimal Developer Portfolio with Google Cloud Run</title>
      <dc:creator>Anandu</dc:creator>
      <pubDate>Mon, 02 Feb 2026 07:59:38 +0000</pubDate>
      <link>https://forem.com/ananduapillai/building-a-minimal-developer-portfolio-with-google-cloud-run-44fa</link>
      <guid>https://forem.com/ananduapillai/building-a-minimal-developer-portfolio-with-google-cloud-run-44fa</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/new-year-new-you-google-ai-2025-12-31"&gt;New Year, New You Portfolio Challenge Presented by Google AI&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  About Me
&lt;/h2&gt;

&lt;p&gt;I’m a full-stack developer, but most of the time I find myself leaning more towards the front end, especially UI, UX, and the overall feel of a product.&lt;/p&gt;

&lt;p&gt;I’ve built portfolios before, but I tend to overthink them and never feel satisfied. This time, I wanted to stop chasing “perfect” and just build something simple and real.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://portfolio-290657851921.asia-south1.run.app" rel="noopener noreferrer"&gt;View full site&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Portfolio
&lt;/h2&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag__cloud-run"&gt;
  &lt;iframe height="600px" src="https://portfolio-290657851921.asia-south1.run.app"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The idea
&lt;/h3&gt;

&lt;p&gt;Before starting, I was clear about one thing — I didn’t want anything fancy. I just wanted a simple, clean portfolio.&lt;/p&gt;

&lt;p&gt;Something that shows who I am, what I build, and stays out of the way.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tech Stack
&lt;/h3&gt;

&lt;p&gt;I went with tools I’m already comfortable with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Next.js (App Router)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TypeScript&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tailwind CSS&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Framer Motion&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Docker + Google Cloud Run&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Using Google AI (Antigravity)
&lt;/h3&gt;

&lt;p&gt;I used &lt;strong&gt;Antigravity&lt;/strong&gt; throughout the process, mostly to think through ideas and get unstuck when I was unsure.&lt;/p&gt;

&lt;p&gt;I didn’t use it to generate the whole project, but more for things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trying out layout ideas&lt;/li&gt;
&lt;li&gt;Improving wording&lt;/li&gt;
&lt;li&gt;Breaking features into smaller steps&lt;/li&gt;
&lt;li&gt;Getting quick feedback on UX decisions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It felt a bit like talking to someone while building, helpful for clarity.&lt;/p&gt;

&lt;h3&gt;
  
  
  The messy part (real experience)
&lt;/h3&gt;

&lt;p&gt;The hardest part wasn’t building the UI.&lt;br&gt;&lt;br&gt;
It was deploying.&lt;/p&gt;

&lt;p&gt;I had never used &lt;strong&gt;Google Cloud Run&lt;/strong&gt; before, and I honestly underestimated how many small things could go wrong:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docker not running
&lt;/li&gt;
&lt;li&gt;Wrong ports
&lt;/li&gt;
&lt;li&gt;Missing permissions
&lt;/li&gt;
&lt;li&gt;Build service accounts failing silently
&lt;/li&gt;
&lt;li&gt;Artifact Registry access errors
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At one point I spent more time fixing IAM roles than writing code.&lt;/p&gt;

&lt;p&gt;But that struggle was actually valuable. I now understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How container-based deployment works&lt;/li&gt;
&lt;li&gt;How Cloud Build, Artifact Registry, and Cloud Run fit together&lt;/li&gt;
&lt;li&gt;And why production setups are rarely “one click”&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I'm Most Proud Of
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The portfolio feels &lt;strong&gt;simple and calm&lt;/strong&gt;, not overwhelming.&lt;/li&gt;
&lt;li&gt;Small &lt;strong&gt;micro-interactions&lt;/strong&gt; that add life without being distracting.&lt;/li&gt;
&lt;li&gt;The fact that it’s &lt;strong&gt;properly deployed on Google Cloud&lt;/strong&gt;, not just hosted on a static platform.&lt;/li&gt;
&lt;li&gt;And most importantly: I actually finished it instead of endlessly tweaking.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Thanks to DEV and Google AI for the challenge.  &lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>googleaichallenge</category>
      <category>gemini</category>
      <category>devnewyear2026</category>
    </item>
    <item>
      <title>📬 From Inbox to Impact: An AI-Powered Wall of Love</title>
      <dc:creator>Anandu</dc:creator>
      <pubDate>Mon, 09 Jun 2025 06:58:43 +0000</pubDate>
      <link>https://forem.com/ananduapillai/from-inbox-to-impact-an-ai-powered-wall-of-love-11ef</link>
      <guid>https://forem.com/ananduapillai/from-inbox-to-impact-an-ai-powered-wall-of-love-11ef</guid>
      <description>&lt;p&gt;This is a submission for the &lt;a href="https://dev.to/challenges/postmark"&gt;Postmark Challenge: Inbox Innovators&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;For this challenge, I built &lt;strong&gt;&lt;a href="https://wall-of-love.anandu.dev" rel="noopener noreferrer"&gt;Wall of Love&lt;/a&gt;&lt;/strong&gt; — an AI-powered testimonial showcase system that automatically receives customer feedback through email, analyzes it using AI, and displays curated testimonials on a public-facing website.&lt;/p&gt;

&lt;p&gt;In simple terms:&lt;br&gt;&lt;br&gt;
👉 You send an email.&lt;br&gt;&lt;br&gt;
🤖 AI checks if it’s genuine.&lt;br&gt;&lt;br&gt;
🌟 If yes, it appears live on the site instantly.&lt;/p&gt;

&lt;p&gt;This project is built on &lt;strong&gt;Postmark’s Inbound Email Streaming&lt;/strong&gt; and showcases how easy and powerful it is to build automated experiences from something as old-school as email.&lt;/p&gt;

&lt;p&gt;I wanted to take the traditional "wall of love" page to the next level — make it smart, real-time, and effortless to manage.&lt;/p&gt;




&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;🔗 &lt;a href="https://wall-of-love.anandu.dev" rel="noopener noreferrer"&gt;&lt;strong&gt;Live App&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
💌 Send a test testimonial to: &lt;code&gt;testimonials@anandu.dev&lt;/code&gt;&lt;br&gt;&lt;br&gt;
📸 Here’s how it looks:&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;You email → Postmark catches it → AI filters it → Supabase stores it → React displays it&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Code Repository
&lt;/h2&gt;

&lt;p&gt;💻 &lt;a href="https://github.com/AnanduApillAi/postmark-challenge" rel="noopener noreferrer"&gt;GitHub: AnanduApillAi/postmark-challenge&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ⚙️ Tech Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Next.js 14&lt;/strong&gt; (App Router + Edge Functions)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Postmark Inbound Webhooks&lt;/strong&gt; (email parsing + real-time delivery)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI GPT-4o-mini&lt;/strong&gt; (AI filtering + sentiment analysis)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Supabase&lt;/strong&gt; (database + row-level security)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tailwind CSS&lt;/strong&gt; (UI)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vercel&lt;/strong&gt; (hosting)&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🧠 The Smart Workflow
&lt;/h3&gt;

&lt;p&gt;Here’s what happens under the hood:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Email Reception&lt;/strong&gt;: Customer sends an email to &lt;code&gt;testimonials@anandu.dev&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Postmark Inbound&lt;/strong&gt;: Instantly receives it and calls my webhook with full data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Processing&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Removes greetings, signatures, etc.&lt;/li&gt;
&lt;li&gt;Scores sentiment (-100 to +100)&lt;/li&gt;
&lt;li&gt;Filters spam and low-confidence entries&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage&lt;/strong&gt;: Only high-quality testimonials are stored in Supabase.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Display&lt;/strong&gt;: A React-based frontend shows approved content in real-time.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  🤖 Why Use AI?
&lt;/h3&gt;

&lt;p&gt;Because not every email is a testimonial.&lt;/p&gt;

&lt;p&gt;Some people say “hi”, others try to sell you things. AI helps clean the clutter — it only shows what truly matters: heartfelt feedback.&lt;/p&gt;

&lt;p&gt;I’ve added confidence scoring, sentiment filtering, spam detection, and manual review flags. And yes — GPT-4o-mini is doing all of that in milliseconds.&lt;/p&gt;




&lt;h3&gt;
  
  
  💡 Why Postmark?
&lt;/h3&gt;

&lt;p&gt;Before this project, I had never used Postmark. After this project, I’m not going back.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setup was seamless.&lt;/li&gt;
&lt;li&gt;Delivery is instant.&lt;/li&gt;
&lt;li&gt;The inbound webhook UI is intuitive.&lt;/li&gt;
&lt;li&gt;Email parsing "just works" — no MIME headaches, no flaky payloads.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Honestly, Postmark feels like email done right. I wish I’d discovered it earlier.&lt;/p&gt;




&lt;h3&gt;
  
  
  ✨ What I Loved
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Watching a testimonial email show up &lt;strong&gt;instantly&lt;/strong&gt; on the frontend. That’s a dopamine hit.&lt;/li&gt;
&lt;li&gt;Building an &lt;strong&gt;AI filter that works&lt;/strong&gt;. Not perfect, but pretty reliable.&lt;/li&gt;
&lt;li&gt;Combining old (email) and new (LLMs) to create something &lt;strong&gt;delightfully automatic&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🧠 Learnings &amp;amp; Takeaways
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Postmark inbound + webhooks = endless automation potential.&lt;/li&gt;
&lt;li&gt;GPT is amazing at extracting meaning, but you still need guardrails.&lt;/li&gt;
&lt;li&gt;A little design polish.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  💭 Final Thoughts
&lt;/h3&gt;

&lt;p&gt;Sometimes, the best UX is &lt;strong&gt;no UX&lt;/strong&gt; — just let users send a plain email, and you handle the rest. That's the magic I tried to build here.&lt;/p&gt;

&lt;p&gt;If you're reading this, send me a note at &lt;code&gt;testimonials@anandu.dev&lt;/code&gt;. Let’s see how smart the system really is :)&lt;/p&gt;

&lt;p&gt;Thanks to the Postmark team and the dev.to community for this challenge — I had a blast building this.&lt;/p&gt;




&lt;h3&gt;
  
  
  🔗 Links
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🌐 Live Demo&lt;/strong&gt;: &lt;a href="https://wall-of-love.anandu.dev" rel="noopener noreferrer"&gt;wall-of-love.anandu.dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;💻 GitHub Repo&lt;/strong&gt;: &lt;a href="https://github.com/AnanduApillAi/postmark-challenge" rel="noopener noreferrer"&gt;github.com/AnanduApillAi/postmark-challenge&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;📖 Postmark Docs&lt;/strong&gt;: &lt;a href="https://postmarkapp.com/developer/webhooks/inbound-webhook" rel="noopener noreferrer"&gt;Inbound Email Webhooks&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Built with ❤️ by &lt;a href="https://github.com/AnanduApillAi" rel="noopener noreferrer"&gt;@AnanduApillAi&lt;/a&gt;&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Email to testimonial. Just like magic.&lt;/em&gt; ✨&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>postmarkchallenge</category>
      <category>webdev</category>
      <category>api</category>
    </item>
    <item>
      <title>KendoReact Form Builder – Build Smarter Forms</title>
      <dc:creator>Anandu</dc:creator>
      <pubDate>Sun, 23 Mar 2025 13:46:03 +0000</pubDate>
      <link>https://forem.com/ananduapillai/kendoreact-form-builder-build-smarter-forms-4klc</link>
      <guid>https://forem.com/ananduapillai/kendoreact-form-builder-build-smarter-forms-4klc</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/kendoreact"&gt;KendoReact Free Components Challenge&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built a Form Builder using KendoReact that allows users to create custom forms effortlessly through a drag-and-drop interface. The project integrates AI assistance to generate and customize forms based on user input, making the form-building process more intuitive and efficient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Form Builder includes the following key features:&lt;/strong&gt;&lt;br&gt;
✅ Drag and Drop Interface – Easily add fields like text inputs, dropdowns, checkboxes, and buttons.&lt;br&gt;
✅ AI Chatbox – The AI helps users generate forms by asking questions and suggesting the best fields based on the form type.&lt;br&gt;
✅ Code Export – Once the form is built, users can export the code directly for integration into their projects.&lt;br&gt;
✅ Save and Edit – Users can save the form, modify it later, and even generate multiple versions with AI assistance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Demo
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://kendo-forms.vercel.app/" rel="noopener noreferrer"&gt;view here&lt;/a&gt;&lt;/p&gt;

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

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

&lt;p&gt;&lt;a href="https://github.com/AnanduApillAi/kendo-forms" rel="noopener noreferrer"&gt;view repository&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  KendoReact Experience
&lt;/h2&gt;

&lt;p&gt;This project was built entirely using KendoReact components, making the UI smooth, responsive, and easy to customize. The components used include:&lt;br&gt;
Button&lt;br&gt;
Dialog&lt;br&gt;
Input&lt;br&gt;
TextArea&lt;br&gt;
Checkbox&lt;br&gt;
RadioButton&lt;br&gt;
DropDownList&lt;br&gt;
Notification&lt;br&gt;
TabStrip&lt;br&gt;
Fade&lt;/p&gt;

&lt;h3&gt;
  
  
  AIm to Impress
&lt;/h3&gt;

&lt;p&gt;The standout feature of this project is the AI-powered form generation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The AI dynamically adapts to the type of form you want to create by asking relevant questions.&lt;/li&gt;
&lt;li&gt;It intelligently suggests suitable input types (e.g., text fields, dropdowns, checkboxes) based on your responses.&lt;/li&gt;
&lt;li&gt;The project also includes a form restoration feature, allowing you to revert to previously created versions, making it easy to undo changes or restore a preferred form state.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thank You.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>kendoreactchallenge</category>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Dark Mode and Night Mode with Tailwind CSS and CSS Variables</title>
      <dc:creator>Anandu</dc:creator>
      <pubDate>Thu, 26 Dec 2024 18:07:03 +0000</pubDate>
      <link>https://forem.com/ananduapillai/dark-mode-and-night-mode-with-tailwind-css-and-css-variables-3047</link>
      <guid>https://forem.com/ananduapillai/dark-mode-and-night-mode-with-tailwind-css-and-css-variables-3047</guid>
      <description>&lt;p&gt;Dark mode and night mode are must-haves for modern websites. They improve accessibility and give users the flexibility to choose their preferred look. Let’s dive into how you can build this feature using Tailwind CSS and CSS variables.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Tailwind CSS and CSS Variables Work So Well
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;CSS Variables: Simplify managing colors for different themes.&lt;/li&gt;
&lt;li&gt;Parent Class: Toggle themes by switching a single parent class.&lt;/li&gt;
&lt;li&gt;JavaScript Integration: Dynamically update themes with minimal
effort.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setting Up Theme Colors with CSS Variables
&lt;/h2&gt;

&lt;p&gt;Start by defining the colors for your themes. These CSS variables will be inside a parent class to make switching themes easy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Light Theme (Default) */
:root {
  --bg-color: #ffffff;
  --text-color: #000000;
}

/* Dark Theme */
.theme-dark {
  --bg-color: #000000;
  --text-color: #ffffff;
}

/* Solarized Theme */
.theme-solarized {
  --bg-color: #002b36;
  --text-color: #839496;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Using CSS Variables in Tailwind Classes
&lt;/h2&gt;

&lt;p&gt;Tailwind makes it easy to use CSS variables for styling.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="min-h-screen flex flex-col items-center justify-center bg-[var(--bg-color)] text-[var(--text-color)]"&amp;gt;
  &amp;lt;h1 class="text-4xl font-bold mb-6"&amp;gt;Dark Mode Demo&amp;lt;/h1&amp;gt;
  &amp;lt;button class="px-4 py-2 rounded bg-[var(--text-color)] text-[var(--bg-color)] font-semibold"&amp;gt;
    Click Me
  &amp;lt;/button&amp;gt;
  &amp;lt;select id="theme-select" class="mt-6 p-2 border border-gray-300 rounded"&amp;gt;
    &amp;lt;option value="theme-light"&amp;gt;Light Theme&amp;lt;/option&amp;gt;
    &amp;lt;option value="theme-dark"&amp;gt;Dark Theme&amp;lt;/option&amp;gt;
    &amp;lt;option value="theme-solarized"&amp;gt;Solarized Theme&amp;lt;/option&amp;gt;
  &amp;lt;/select&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Adding JavaScript for Dynamic Theme Switching
&lt;/h2&gt;

&lt;p&gt;Here’s the JavaScript to handle theme changes dynamically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const themeSelect = document.getElementById("theme-select");
const rootElement = document.documentElement;

// Listen for dropdown changes
themeSelect.addEventListener("change", (event) =&amp;gt; {
  const selectedTheme = event.target.value;

  // Remove all theme classes
  rootElement.classList.remove("theme-light", "theme-dark", "theme-solarized");

  // Add the selected theme class
  rootElement.classList.add(selectedTheme);
});

// Set default theme on load
window.addEventListener("DOMContentLoaded", () =&amp;gt; {
  rootElement.classList.add("theme-light");
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Real-Time Theme Switching in Action&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When users pick a theme from the dropdown, the background and text colors change instantly. This dynamic update makes the experience seamless and interactive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why This Approach is Awesome&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scalability: Add new themes by defining additional CSS variables.&lt;/li&gt;
&lt;li&gt;Clean Separation: CSS handles theming; JavaScript manages logic.&lt;/li&gt;
&lt;li&gt;Performance: CSS variables make updates smooth and efficient.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Save Theme Preferences with LocalStorage
&lt;/h2&gt;

&lt;p&gt;Take it up a notch by saving the selected theme so it persists across sessions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Save the theme
themeSelect.addEventListener("change", (event) =&amp;gt; {
  const selectedTheme = event.target.value;
  rootElement.classList.remove("theme-light", "theme-dark", "theme-solarized");
  rootElement.classList.add(selectedTheme);
  localStorage.setItem("theme", selectedTheme);
});

// Load the saved theme
window.addEventListener("DOMContentLoaded", () =&amp;gt; {
  const savedTheme = localStorage.getItem("theme") || "theme-light";
  rootElement.classList.add(savedTheme);
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Extra Tips for Dark Mode and Night Mode&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More Themes: Add high-contrast or custom user-defined themes.&lt;/li&gt;
&lt;li&gt;Transitions: Use CSS transitions for smooth background and text color changes.&lt;/li&gt;
&lt;li&gt;Accessibility: Make sure your theme switcher works well with keyboards and screen readers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With Tailwind CSS and CSS variables, creating a dynamic dark mode or night mode is straightforward and efficient. Try it out and see how it transforms your website’s user experience!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>tailwindcss</category>
      <category>css</category>
    </item>
  </channel>
</rss>
