<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ammar Khan</title>
    <description>The latest articles on DEV Community by Ammar Khan (@ammar_khan_b07a4a1049d636).</description>
    <link>https://dev.to/ammar_khan_b07a4a1049d636</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4257161%2Fbbe6a94a-a712-4692-a137-bcb0a4456041.png</url>
      <title>DEV Community: Ammar Khan</title>
      <link>https://dev.to/ammar_khan_b07a4a1049d636</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ammar_khan_b07a4a1049d636"/>
    <language>en</language>
    <item>
      <title>Zero-Bloat Bridal Catalogs in Astro: Optimizing High-Resolution Silk Lookbooks &amp; Collection Schema</title>
      <dc:creator>Ammar Khan</dc:creator>
      <pubDate>Mon, 23 Nov 2026 10:36:04 +0000</pubDate>
      <link>https://dev.to/ammar_khan_b07a4a1049d636/zero-bloat-bridal-catalogs-in-astro-optimizing-high-resolution-silk-lookbooks-collection-schema-1j4g</link>
      <guid>https://dev.to/ammar_khan_b07a4a1049d636/zero-bloat-bridal-catalogs-in-astro-optimizing-high-resolution-silk-lookbooks-collection-schema-1j4g</guid>
      <description>&lt;p&gt;Luxury couture storefronts face an obvious performance tension: buyers inspecting hand-embellished zardozi, organza, and raw silk ensembles expect crisp full-bleed lookbooks, yet heavy client-side carousels quickly tank mobile Core Web Vitals. When architecting digital galleries for &lt;a href="https://zauqboutique.com/bridal" rel="noopener noreferrer"&gt;bespoke Pakistani bridal wear&lt;/a&gt;, shipping zero unnecessary JavaScript by default in &lt;strong&gt;Astro&lt;/strong&gt; solves most of the payload problem before an image even loads.&lt;/p&gt;

&lt;h3&gt;
  
  
  Responsive WebP Pipelines &amp;amp; Static Routing
&lt;/h3&gt;

&lt;p&gt;Using Astro's static routing and build-time asset pipeline, every lookbook frame is compiled into responsive &lt;code&gt;WebP&lt;/code&gt; srcsets with explicit &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt; attributes. Above-the-fold hero shots receive &lt;code&gt;fetchpriority="high"&lt;/code&gt;, while lower gallery cards stay lazily decoded with zero cumulative layout shift. Because collection filters and seasonal lookbook routes are pre-rendered as static HTML, time-to-first-byte stays consistently low even on throttled 4G mobile connections.&lt;/p&gt;

&lt;h3&gt;
  
  
  CollectionPage JSON-LD &amp;amp; Strict CSP
&lt;/h3&gt;

&lt;p&gt;To keep structured data verifiable without relaxing security headers, we emit deterministic &lt;code&gt;CollectionPage&lt;/code&gt; and &lt;code&gt;ItemList&lt;/code&gt; JSON-LD directly inside the Astro &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; layout alongside a strict Content Security Policy (&lt;code&gt;CSP&lt;/code&gt;) restricting script execution and image origins. You can see how clean markup and fast lookbook rendering hold up across curated &lt;a href="https://zauqboutique.com/collections" rel="noopener noreferrer"&gt;luxury couture collections&lt;/a&gt; on &lt;a href="https://zauqboutique.com/" rel="noopener noreferrer"&gt;Zauq Boutique&lt;/a&gt;, proving rich bridal photography does not require bloated storefront runtimes.&lt;/p&gt;

</description>
      <category>astro</category>
      <category>ecommerce</category>
      <category>webdev</category>
      <category>seo</category>
    </item>
    <item>
      <title>Building 50 Hz Industrial Gearbox Torque &amp; Vacuum Pump-Down Calculators in Laravel</title>
      <dc:creator>Ammar Khan</dc:creator>
      <pubDate>Mon, 23 Nov 2026 10:30:05 +0000</pubDate>
      <link>https://dev.to/ammar_khan_b07a4a1049d636/building-50-hz-industrial-gearbox-torque-vacuum-pump-down-calculators-in-laravel-2cag</link>
      <guid>https://dev.to/ammar_khan_b07a4a1049d636/building-50-hz-industrial-gearbox-torque-vacuum-pump-down-calculators-in-laravel-2cag</guid>
      <description>&lt;p&gt;Factory procurement engineers across Pakistan frequently size industrial drives under &lt;strong&gt;50 Hz, 380V/415V three-phase&lt;/strong&gt; supply conditions rather than 60 Hz catalog baselines. When an electric motor runs at 1440 RPM (4-pole at 50 Hz) instead of 1750 RPM, nameplate speed, service factor, and output torque (&lt;code&gt;M2&lt;/code&gt;) shift immediately. To eliminate manual spreadsheet errors on the shop floor, we built an interactive &lt;a href="https://mhanifsons.com/tools" rel="noopener noreferrer"&gt;50 Hz gearbox ratio and torque calculator&lt;/a&gt; alongside a rotary vane vacuum pump-down time estimator in &lt;strong&gt;Laravel&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Structuring Deterministic Physics Services in PHP
&lt;/h3&gt;

&lt;p&gt;Instead of embedding engineering formulas directly inside Blade templates or client-side scripts alone, we encapsulated unit conversions and reducer equations inside pure PHP service classes (&lt;code&gt;TorqueCalculatorService&lt;/code&gt; and &lt;code&gt;PumpDownService&lt;/code&gt;). Each calculation accepts motor kW or HP, nominal 50 Hz RPM, and standard worm reduction ratios (&lt;code&gt;1:10–1:60&lt;/code&gt;) to compute output RPM (&lt;code&gt;n2&lt;/code&gt;), mechanical output torque (&lt;code&gt;M2 = 9550 * P / n2 * efficiency&lt;/code&gt;), and thermal safety margins.&lt;/p&gt;

&lt;p&gt;For vacuum chambers, the pump-down module models vessel volume, target mbar pressure, and effective pumping speed (&lt;code&gt;m3/h&lt;/code&gt;) to estimate evacuation duration before a plant commits to a specific rotary vane unit.&lt;/p&gt;

&lt;h3&gt;
  
  
  Supporting Cast-Iron WP/WPA vs. Aluminum NMRV Comparisons
&lt;/h3&gt;

&lt;p&gt;Because procurement teams routinely weigh heavy-duty cast-iron housings against lightweight modular reducers, our Laravel toolset cross-links calculated torque outputs directly to our &lt;a href="https://mhanifsons.com/guides/wp-worm-gearbox-vs-nmrv-worm-gear-reducer-pakistan" rel="noopener noreferrer"&gt;WP vs NMRV worm gearbox guide&lt;/a&gt; and full catalog of &lt;a href="https://mhanifsons.com/gearboxes" rel="noopener noreferrer"&gt;industrial worm gearboxes in Pakistan&lt;/a&gt;, turning raw engineering math into faster, verified equipment selection.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>engineering</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Architecting Local Clinic Landing Pages &amp; Medical Schema in Astro (Lahore Case Study)</title>
      <dc:creator>Ammar Khan</dc:creator>
      <pubDate>Mon, 23 Nov 2026 10:24:50 +0000</pubDate>
      <link>https://dev.to/ammar_khan_b07a4a1049d636/architecting-local-clinic-landing-pages-medical-schema-in-astro-lahore-case-study-30hc</link>
      <guid>https://dev.to/ammar_khan_b07a4a1049d636/architecting-local-clinic-landing-pages-medical-schema-in-astro-lahore-case-study-30hc</guid>
      <description>&lt;p&gt;Multi-location veterinary websites frequently lose local search precision when they merge physical clinic addresses with mobile service territories inside generic templates. When structuring the web architecture for &lt;a href="https://rehmanvetclinic.com/" rel="noopener noreferrer"&gt;Rehman Vet Clinic&lt;/a&gt; in Astro, separating brick-and-mortar location hubs from home-visit service zones resolved schema ambiguity and improved crawl efficiency.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Separating Physical Clinics from Home-Visit Zones
&lt;/h2&gt;

&lt;p&gt;In Google's local search guidelines, a physical clinic with walk-in hours requires a concrete &lt;code&gt;PostalAddress&lt;/code&gt; and &lt;code&gt;GeoCoordinates&lt;/code&gt;, whereas a home-visit service area should model &lt;code&gt;areaServed&lt;/code&gt; without inventing duplicate street addresses. In Astro, we split routing into distinct collections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Physical Hub&lt;/strong&gt;: Dedicated location pages like the &lt;a href="https://rehmanvetclinic.com/locations/gulberg-lahore-veterinary-clinic" rel="noopener noreferrer"&gt;Gulberg 2 Zanjani Road veterinary clinic&lt;/a&gt; emit &lt;code&gt;VeterinaryCare&lt;/code&gt; JSON-LD anchored to &lt;code&gt;124-D Zanjani Rd, Gulberg 2, Lahore&lt;/code&gt;, complete with verified opening hours and clinic contact metadata.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mobile Service Zones&lt;/strong&gt;: Areas such as &lt;code&gt;DHA&lt;/code&gt; are modeled as service-area pages referencing the central clinic as the dispatching &lt;code&gt;provider&lt;/code&gt; while scoping &lt;code&gt;areaServed&lt;/code&gt; to mobile veterinary visits.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Combining &lt;code&gt;VeterinaryCare&lt;/code&gt; + &lt;code&gt;FAQPage&lt;/code&gt; JSON-LD &amp;amp; Zero-403 Breadcrumbs
&lt;/h2&gt;

&lt;p&gt;Each service page—such as the &lt;a href="https://rehmanvetclinic.com/services/pet-vaccination-center" rel="noopener noreferrer"&gt;Lahore pet vaccination center&lt;/a&gt;—ships a typed Astro &lt;code&gt;&amp;lt;Schema /&amp;gt;&lt;/code&gt; component outputting both &lt;code&gt;VeterinaryCare&lt;/code&gt; service entities and &lt;code&gt;FAQPage&lt;/code&gt; structured data alongside a zero-403 &lt;code&gt;BreadcrumbList&lt;/code&gt; hierarchy (&lt;code&gt;Home -&amp;gt; Locations/Services -&amp;gt; Leaf Page&lt;/code&gt;). Because Astro renders static HTML at build time with zero client-side hydration blocking, Googlebot inspects the complete JSON-LD graph and canonical breadcrumb links on the initial document fetch.&lt;/p&gt;

</description>
      <category>astro</category>
      <category>seo</category>
      <category>webdev</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Fixing Google Merchant Listings Schema in Shopify Liquid: ProductGroup, validFrom &amp; Return Fees</title>
      <dc:creator>Ammar Khan</dc:creator>
      <pubDate>Mon, 23 Nov 2026 10:13:53 +0000</pubDate>
      <link>https://dev.to/ammar_khan_b07a4a1049d636/fixing-google-merchant-listings-schema-in-shopify-liquid-productgroup-validfrom-return-fees-8p9</link>
      <guid>https://dev.to/ammar_khan_b07a4a1049d636/fixing-google-merchant-listings-schema-in-shopify-liquid-productgroup-validfrom-return-fees-8p9</guid>
      <description>&lt;p&gt;Multi-size apparel storefronts on Shopify frequently run into Google Search Console &lt;strong&gt;Merchant listings&lt;/strong&gt; warnings when default theme structured data emits isolated &lt;code&gt;Product&lt;/code&gt; blocks or incomplete &lt;code&gt;Offer&lt;/code&gt; properties. When refactoring structured data on &lt;a href="https://shaamg.com/" rel="noopener noreferrer"&gt;ShaamG UK&lt;/a&gt;, moving to a proper &lt;code&gt;ProductGroup&lt;/code&gt; schema with &lt;code&gt;hasVariant&lt;/code&gt; resolved variant-level coverage while eliminating Search Console non-critical warnings across the catalog.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Structuring &lt;code&gt;ProductGroup&lt;/code&gt; with &lt;code&gt;hasVariant&lt;/code&gt; in Liquid
&lt;/h2&gt;

&lt;p&gt;For multi-size garments—such as embroidered ensembles in the &lt;a href="https://shaamg.com/collections/womens" rel="noopener noreferrer"&gt;Women's Pakistani Suits Collection&lt;/a&gt;—each Shopify &lt;code&gt;variant&lt;/code&gt; should map to a &lt;code&gt;Product&lt;/code&gt; entry inside &lt;code&gt;hasVariant&lt;/code&gt;, linked via &lt;code&gt;variesBy: "https://schema.org/size"&lt;/code&gt; and a shared &lt;code&gt;productGroupID&lt;/code&gt;. Importantly, Google's Merchant Listings validator checks each nested variant &lt;code&gt;Product&lt;/code&gt; individually, so every variant object should include its own &lt;code&gt;sku&lt;/code&gt;, &lt;code&gt;image&lt;/code&gt;, &lt;code&gt;description&lt;/code&gt;, &lt;code&gt;offers&lt;/code&gt;, and &lt;code&gt;hasMerchantReturnPolicy&lt;/code&gt; rather than relying solely on parent-level inheritance.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Fixing &lt;code&gt;validFrom&lt;/code&gt; Alongside &lt;code&gt;priceValidUntil&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;If your Liquid template outputs &lt;code&gt;priceValidUntil&lt;/code&gt; inside an &lt;code&gt;Offer&lt;/code&gt;, Google expects the paired &lt;code&gt;validFrom&lt;/code&gt; field in ISO 8601 format (&lt;code&gt;YYYY-MM-DD&lt;/code&gt;). Defining both &lt;code&gt;validFrom&lt;/code&gt; and &lt;code&gt;priceValidUntil&lt;/code&gt; programmatically in Liquid prevents &lt;code&gt;Missing field 'validFrom' (in 'offers')&lt;/code&gt; warnings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"offers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Offer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"priceCurrency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"GBP"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"89.99"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"validFrom"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2026-11-23"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"priceValidUntil"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2027-11-23"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"availability"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://schema.org/InStock"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Providing &lt;code&gt;returnShippingFeesAmount&lt;/code&gt; with &lt;code&gt;ReturnShippingFees&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;When &lt;code&gt;hasMerchantReturnPolicy&lt;/code&gt; specifies &lt;code&gt;"returnFees": "https://schema.org/ReturnShippingFees"&lt;/code&gt;, Google Search Console requires an explicit &lt;code&gt;returnShippingFeesAmount&lt;/code&gt; typed as &lt;code&gt;MonetaryAmount&lt;/code&gt; (with &lt;code&gt;value&lt;/code&gt; and &lt;code&gt;currency&lt;/code&gt;, such as &lt;code&gt;"4.95"&lt;/code&gt; &lt;code&gt;"GBP"&lt;/code&gt;), alongside &lt;code&gt;shippingDetails&lt;/code&gt; (&lt;code&gt;OfferShippingDetails&lt;/code&gt;). Once deployed on production items like the &lt;a href="https://shaamg.com/products/lavender-grey-embroidered-shamoz-silk-3pc-suit" rel="noopener noreferrer"&gt;Shamoz Silk 3-Piece Suit&lt;/a&gt;, Live URL Tests immediately validate all variants with zero warnings.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>seo</category>
      <category>webdev</category>
      <category>ecommerce</category>
    </item>
    <item>
      <title>Building a Real-Time Dairy Queen Nutrition &amp; Calorie Calculator for 2026</title>
      <dc:creator>Ammar Khan</dc:creator>
      <pubDate>Sat, 21 Nov 2026 10:43:21 +0000</pubDate>
      <link>https://dev.to/ammar_khan_b07a4a1049d636/building-a-real-time-dairy-queen-nutrition-calorie-calculator-for-2026-5ei8</link>
      <guid>https://dev.to/ammar_khan_b07a4a1049d636/building-a-real-time-dairy-queen-nutrition-calorie-calculator-for-2026-5ei8</guid>
      <description>&lt;p&gt;Tracking fast food nutrition can be notoriously tricky. Fast food chains frequently update seasonal offerings, change portion sizes, and modify dessert recipes. To solve this for fast food enthusiasts and health-conscious diners, we built and launched a comprehensive, real-time web application: the &lt;a href="https://www.thequeendairymenu.us/dairy-queen-calculator" rel="noopener noreferrer"&gt;Dairy Queen Nutrition &amp;amp; Calorie Calculator&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem with Static PDF Menus
&lt;/h3&gt;

&lt;p&gt;Most diners are forced to squint at 30-page static nutritional PDFs trying to calculate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Total meal calories (e.g., combining a Signature Stackburger with cheese curds and a Blizzard).&lt;/li&gt;
&lt;li&gt;Sugar and carbohydrate spikes for diabetic or low-sugar diets.&lt;/li&gt;
&lt;li&gt;High-protein macro targets for fitness enthusiasts.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What We Built
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://www.thequeendairymenu.us/dairy-queen-calculator" rel="noopener noreferrer"&gt;Dairy Queen Calorie &amp;amp; Price Calculator&lt;/a&gt; functions as an interactive meal builder. Key architecture features include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Instant Macro Calculation&lt;/strong&gt;: Real-time aggregation of total calories, fat, carbohydrates, dietary fiber, and protein.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Comprehensive Menu Coverage&lt;/strong&gt;: Full coverage across Blizzard treats, chicken strip baskets, burgers, shakes, and ice cream cakes sourced directly from &lt;a href="https://www.thequeendairymenu.us/" rel="noopener noreferrer"&gt;The Queen Dairy Menu&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsive UI/UX&lt;/strong&gt;: Lightweight vanilla web components optimized for sub-second mobile page loads.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Check out the live interactive tool here:&lt;br&gt;
👉 &lt;a href="https://www.thequeendairymenu.us/dairy-queen-calculator" rel="noopener noreferrer"&gt;Dairy Queen Meal Builder &amp;amp; Nutrition Tool&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Explore the full updated price lists and menu breakdown:&lt;br&gt;
👉 &lt;a href="https://www.thequeendairymenu.us/" rel="noopener noreferrer"&gt;The Queen Dairy Menu 2026 Guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback and suggestions on additional dietary filters are welcome in the comments!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
