<?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: Pooja</title>
    <description>The latest articles on DEV Community by Pooja (@pooja_81f6602822dfcd89806).</description>
    <link>https://dev.to/pooja_81f6602822dfcd89806</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%2F4263698%2Fee36aaf5-e8a1-4a50-81d6-112f25fd53a1.jpg</url>
      <title>DEV Community: Pooja</title>
      <link>https://dev.to/pooja_81f6602822dfcd89806</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pooja_81f6602822dfcd89806"/>
    <language>en</language>
    <item>
      <title>Building a 160-Page Regional-Language Exam Prep Site with Astro 5, Tailwind v4, and Firebase Hosting</title>
      <dc:creator>Pooja</dc:creator>
      <pubDate>Wed, 25 Nov 2026 02:51:53 +0000</pubDate>
      <link>https://dev.to/pooja_81f6602822dfcd89806/building-a-160-page-regional-language-exam-prep-site-with-astro-5-tailwind-v4-and-firebase-hosting-2m3n</link>
      <guid>https://dev.to/pooja_81f6602822dfcd89806/building-a-160-page-regional-language-exam-prep-site-with-astro-5-tailwind-v4-and-firebase-hosting-2m3n</guid>
      <description>&lt;p&gt;Most Indian exam-preparation websites targeting tier-2 and tier-3 towns suffer from the same problem: heavy client-side JavaScript bundles, intrusive ad networks, slow hydration on budget Android phones, and broken regional-language (Devanagari/Marathi) typography.&lt;/p&gt;

&lt;p&gt;While building &lt;strong&gt;&lt;a href="https://jijaee.in" rel="noopener noreferrer"&gt;Jijaee&lt;/a&gt;&lt;/strong&gt; — an independent Marathi preparation platform and Android app for Maharashtra Police Bharti aspirants — we wanted the web companion to load almost instantly on 4G mobile data while still supporting 160+ static pages, interactive practice quizzes, a physical-test score calculator, and district-wise cutoff datasets.&lt;/p&gt;

&lt;p&gt;Here is the architecture we chose and five real-world engineering bugs we ran into (and fixed) along the way.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Why Astro 5 Static SSG + Firebase Hosting?
&lt;/h2&gt;

&lt;p&gt;Our pages fall into three buckets:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Evergreen study hubs &amp;amp; tools:&lt;/strong&gt; syllabus, 90-day plans, zero-login MCQ practice hubs, and a 50-mark physical test calculator.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Programmatic data pages:&lt;/strong&gt; 93 district-wise previous-year question paper (PYQ) previews and district cutoff tables.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Editorial Marathi articles:&lt;/strong&gt; guides, recruitment status updates, and comparative breakdowns.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With &lt;strong&gt;Astro 5 (&lt;code&gt;output: "static"&lt;/code&gt;) + Tailwind CSS v4&lt;/strong&gt;, the entire 161-page site builds in &lt;strong&gt;~6–9 seconds&lt;/strong&gt;, ships almost zero client JS by default (only tiny inline scripts for interactive quizzes and calculators), and deploys cleanly to Firebase Hosting with aggressive CDN caching (&lt;code&gt;Cache-Control: public, max-age=31536000, immutable&lt;/code&gt; on &lt;code&gt;/_astro/**&lt;/code&gt;).&lt;/p&gt;




&lt;h2&gt;
  
  
  2. The Trailing-Slash Trap Between Astro and Firebase Hosting
&lt;/h2&gt;

&lt;p&gt;One subtle technical SEO bug bit us early:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;firebase.json&lt;/code&gt; had &lt;code&gt;"cleanUrls": true&lt;/code&gt; and &lt;code&gt;"trailingSlash": false&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Astro's default &lt;code&gt;@astrojs/sitemap&lt;/code&gt; integration emitted URLs &lt;strong&gt;with&lt;/strong&gt; trailing slashes (&lt;code&gt;/cutoff/&lt;/code&gt;, &lt;code&gt;/ground/&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That created a silent redirect mismatch across all 150+ URLs: Googlebot read &lt;code&gt;/cutoff/&lt;/code&gt; from &lt;code&gt;sitemap-0.xml&lt;/code&gt;, requested it, and hit a &lt;code&gt;301&lt;/code&gt; redirect from Firebase Hosting to &lt;code&gt;/cutoff&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix was two lines:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Set &lt;code&gt;trailingSlash: 'never'&lt;/code&gt; in &lt;code&gt;astro.config.mjs&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Normalize canonical URLs in a shared helper:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;canonicalUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pathname&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;clean&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pathname&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'/'&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s1"&gt;'/'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;pathname&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;\&lt;span class="o"&gt;/+&lt;/span&gt;$&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="no"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;clean&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'https://jijaee.in'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;href&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After rebuilding, every single URL in &lt;code&gt;sitemap-0.xml&lt;/code&gt;, &lt;code&gt;&amp;lt;link rel="canonical"&amp;gt;&lt;/code&gt;, and internal &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; tags matched &lt;code&gt;200 OK&lt;/code&gt; with zero redirect hops.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Off-by-One Date Bugs When Building in Non-IST Timezones
&lt;/h2&gt;

&lt;p&gt;Our Marathi blog posts and daily current-affairs pages store dates as &lt;code&gt;YYYY-MM-DD&lt;/code&gt;. When we built the static site from a machine in &lt;code&gt;America/New_York&lt;/code&gt; (&lt;code&gt;UTC-5&lt;/code&gt;), calling &lt;code&gt;new Date('2026-11-17')&lt;/code&gt; parsed it as UTC midnight — which shifted backward to &lt;strong&gt;November 16&lt;/strong&gt; in local time!&lt;/p&gt;

&lt;p&gt;Instead of relying on the build host's system timezone, we parsed calendar dates directly and forced &lt;code&gt;Asia/Kolkata&lt;/code&gt; (&lt;code&gt;+05:30&lt;/code&gt;) for full timestamps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;MONTHS_MR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="s1"&gt;'जानेवारी'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'फेब्रुवारी'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'मार्च'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'एप्रिल'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'मे'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'जून'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s1"&gt;'जुलै'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'ऑगस्ट'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'सप्टेंबर'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'ऑक्टोबर'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'नोव्हेंबर'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'डिसेंबर'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;fmtDateMr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;/^&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;\&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;\&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;\&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;$&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sb"&gt;`${Number(m[3])} ${MONTHS_MR[Number(m[2]) - 1]} ${m[1]}`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ist&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mf"&gt;5.5&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sb"&gt;`${ist.getUTCDate()} ${MONTHS_MR[ist.getUTCMonth()]} ${ist.getUTCFullYear()}`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple, deterministic, and completely immune to whether CI runs in &lt;code&gt;UTC&lt;/code&gt;, &lt;code&gt;EST&lt;/code&gt;, or &lt;code&gt;IST&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Cleaning 15,600+ Marathi MCQs Without Breaking SSR
&lt;/h2&gt;

&lt;p&gt;Our question bank powers SSR-rendered previews (so users and search engines see real practice questions without logging in). Auditing the rendered HTML surfaced three messy real-world data issues:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Diagram-dependent questions without images:&lt;/strong&gt; ~31 reasoning questions asked &lt;em&gt;"खालील आकृतीत किती त्रिकोण आहेत?"&lt;/em&gt; ("How many triangles are in the figure below?") with no image attached. We added a lightweight filter at build time to exclude image-dependent stems from text-only previews.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Raw Markdown &amp;amp; simple LaTeX inside explanations:&lt;/strong&gt; Thousands of explanations contained raw &lt;code&gt;**bold**&lt;/code&gt; markers, duplicate emojis, or &lt;code&gt;\frac{a}{b}&lt;/code&gt; / &lt;code&gt;\sqrt{x}&lt;/code&gt; snippets. A pure TypeScript formatter safely escapes HTML first and then converts bold, line breaks, and basic math notation into clean markup with zero runtime JS overhead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive without a framework:&lt;/strong&gt; For our &lt;strong&gt;&lt;a href="https://jijaee.in/ground" rel="noopener noreferrer"&gt;50-mark Physical Ground Score Calculator&lt;/a&gt;&lt;/strong&gt; (1600m/800m run, 100m sprint, and shot put slabs for Male &amp;amp; Female candidates) and inline practice quizzes, plain vanilla &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; islands kept total page JS under 3 KB gzipped.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  5. Parsing Official Government PDFs for Structured Cutoff Data
&lt;/h2&gt;

&lt;p&gt;Maharashtra Police recruitment is decentralized — every district police unit publishes its own selection and cutoff PDFs on separate &lt;code&gt;.gov.in&lt;/code&gt; portals. Many third-party exam blogs mistakenly mix &lt;strong&gt;50-mark physical ground cutoffs&lt;/strong&gt; with &lt;strong&gt;100-mark written exam marks&lt;/strong&gt; or &lt;strong&gt;150-mark final merit totals&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To fix this on our &lt;strong&gt;&lt;a href="https://jijaee.in/cutoff" rel="noopener noreferrer"&gt;Maharashtra Police Bharti district cutoff hub&lt;/a&gt;&lt;/strong&gt;, we wrote Python scripts using &lt;strong&gt;PyMuPDF (&lt;code&gt;fitz&lt;/code&gt;)&lt;/strong&gt; to parse official selection lists and 1:10 ground shortlist PDFs directly from &lt;code&gt;.gov.in&lt;/code&gt; portals, separating:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ground cutoff (&lt;code&gt;/50&lt;/code&gt; for Constable, &lt;code&gt;/100&lt;/code&gt; for SRPF)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Final selection cutoff (&lt;code&gt;/150&lt;/code&gt;)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Category &amp;amp; gender breakdowns&lt;/strong&gt; (&lt;code&gt;OPEN&lt;/code&gt;, &lt;code&gt;OBC&lt;/code&gt;, &lt;code&gt;SEBC&lt;/code&gt;, &lt;code&gt;SC&lt;/code&gt;, &lt;code&gt;ST&lt;/code&gt;, &lt;code&gt;EWS&lt;/code&gt;, &lt;code&gt;NT-A/B/C/D&lt;/code&gt;, &lt;code&gt;SBC&lt;/code&gt; — Male &amp;amp; Female)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One edge case in official PDF tables: rows where the optional &lt;code&gt;NCC Marks&lt;/code&gt; column is blank collapse from 4 numeric tokens (&lt;code&gt;Physical, Written, NCC, Total&lt;/code&gt;) to 3 tokens (&lt;code&gt;Physical, Written, Total&lt;/code&gt;). Validating &lt;code&gt;total === physical + written + ncc&lt;/code&gt; caught that immediately and prevented missing ~35% of candidates during extraction.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Static-first wins for regional Indian audiences:&lt;/strong&gt; Shipping ~2–3 KB of JS instead of a 400 KB SPA makes a massive difference on budget mobile devices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit your build output, not just your source code:&lt;/strong&gt; Running quick Python assertions over &lt;code&gt;dist/&lt;/code&gt; after every build caught canonical mismatches, timezone shifts, and broken question stems before they ever hit production.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured data &amp;amp; instant indexing matter:&lt;/strong&gt; Pairing clean JSON-LD (&lt;code&gt;FAQPage&lt;/code&gt;, &lt;code&gt;Dataset&lt;/code&gt;, &lt;code&gt;BlogPosting&lt;/code&gt;, &lt;code&gt;BreadcrumbList&lt;/code&gt;) with automated IndexNow pings gets new pages discovered within hours instead of weeks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're building a regional-language web app or static content platform with Astro, happy to answer questions in the comments!&lt;/p&gt;

</description>
      <category>astro</category>
      <category>webdev</category>
      <category>seo</category>
      <category>firebase</category>
    </item>
  </channel>
</rss>
