<?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: TahalKuta</title>
    <description>The latest articles on DEV Community by TahalKuta (@tahalkuta_wolff_b39c7d7e0).</description>
    <link>https://dev.to/tahalkuta_wolff_b39c7d7e0</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%2F4159173%2F692fb9fa-bc43-4082-8db4-a6198b13f777.png</url>
      <title>DEV Community: TahalKuta</title>
      <link>https://dev.to/tahalkuta_wolff_b39c7d7e0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tahalkuta_wolff_b39c7d7e0"/>
    <language>en</language>
    <item>
      <title>How parsing and rejecting municipal tax orders keeps city pages trustworthy</title>
      <dc:creator>TahalKuta</dc:creator>
      <pubDate>Sun, 22 Nov 2026 05:44:50 +0000</pubDate>
      <link>https://dev.to/tahalkuta_wolff_b39c7d7e0/how-parsing-and-rejecting-municipal-tax-orders-keeps-city-pages-trustworthy-4epm</link>
      <guid>https://dev.to/tahalkuta_wolff_b39c7d7e0/how-parsing-and-rejecting-municipal-tax-orders-keeps-city-pages-trustworthy-4epm</guid>
      <description>&lt;p&gt;On &lt;a href="https://nadlanfind.co.il/" rel="noopener noreferrer"&gt;nadlanfind.co.il&lt;/a&gt;, each property listing includes a calculated monthly cost, and the arnona component depends on the official municipal tax order for that area. The site runs on Astro 5 server rendering on Cloudflare Workers with a D1 (SQLite) database. A city page is opened only when that city has a parsed tax order.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the tax orders come from
&lt;/h2&gt;

&lt;p&gt;Business property tax rates come from each municipality's official tax order. The site shows official Ministry of Interior arnona rates for 145 cities. That means the parser has to ingest orders from many local authorities, and the pipeline cannot treat every source document as publishable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why name matching has to be explicit
&lt;/h2&gt;

&lt;p&gt;Municipality names are spelled differently across government datasets. The parser uses a spelling map and a regional-council map to reconcile them. For example, Atlit is billed by the Hof HaCarmel regional council.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rejecting parses instead of publishing them
&lt;/h2&gt;

&lt;p&gt;Two parses were rejected instead of published. In one order, the land rate had been copied onto every industrial line. Accepting that document would have made industrial properties show the land rate for arnona, which would be wrong. In another order, only one of two zone columns had been read.&lt;/p&gt;

&lt;p&gt;The rejection step is part of the pipeline. In any ingestion pipeline, validation gates are cheaper than correcting bad data after it has been served. A validation gate close to ingestion also prevents cascading failures: once an invalid record is stored, every downstream query, cache, and rendered view that depends on that record must either filter it or risk propagating the error. Keeping rejection at the boundary lowers the total cost of maintaining data quality across the system. This is not specific to any particular data domain; parser outputs should be rejected unless they satisfy the invariants required by downstream calculations. A cheap invariant check at ingestion turns a potentially silent data corruption into an explicit failure that engineers can act on before publishing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters for server-rendered pages
&lt;/h2&gt;

&lt;p&gt;The site is server rendered on Cloudflare Workers. That means the decision about whether a city page exists is not made in the browser; it is made when the page is generated. If a tax order fails validation, the city page simply does not render. When rendering is done on the server, the data used to decide what exists is already available at request time, so the output does not depend on a later client-side check. This makes the missing state straightforward: the route either resolves to a complete page or it does not resolve at all. It also means the response can be cached by intermediaries without worrying that a browser might later discover missing data and need to patch the DOM.&lt;/p&gt;

&lt;h2&gt;
  
  
  One canonical copy
&lt;/h2&gt;

&lt;p&gt;www and http requests are redirected with a 301 to the bare https domain, and the workers.dev address no longer serves the site. A 301 tells a browser that the resource has moved permanently, and every server-rendered URL should resolve to one location.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>astro</category>
      <category>cloudflare</category>
      <category>sqlite</category>
    </item>
    <item>
      <title>Handling Legacy Domain Requests on a Static Site with 301 and 410</title>
      <dc:creator>TahalKuta</dc:creator>
      <pubDate>Wed, 11 Nov 2026 22:10:07 +0000</pubDate>
      <link>https://dev.to/tahalkuta_wolff_b39c7d7e0/handling-legacy-domain-requests-on-a-static-site-with-301-and-410-1726</link>
      <guid>https://dev.to/tahalkuta_wolff_b39c7d7e0/handling-legacy-domain-requests-on-a-static-site-with-301-and-410-1726</guid>
      <description>&lt;h2&gt;
  
  
  An inherited set of URLs
&lt;/h2&gt;

&lt;p&gt;Imperial Seedlings Guide is a static site built with Astro 5 and served from Cloudflare Pages. The domain previously belonged to a hemp seedling store from about 2020 to 2024 and has no connection to the current guide.&lt;/p&gt;

&lt;p&gt;The old site left a split set of URLs. 74 archived blog, product and archive pages now 301 to the closest guide. 263 cart, feed, plugin and script addresses answer 410 Gone.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the two status codes mean
&lt;/h2&gt;

&lt;p&gt;A 301 is a permanent redirect. It tells the browser or other HTTP client that the resource has moved and that future requests should go to the new location. The client may update stored bookmarks and will normally use the new address on the next visit.&lt;/p&gt;

&lt;p&gt;A 410 means the resource is gone. Unlike a 404, which can mean the path never existed or the server does not want to say more, a 410 states that the resource was once there and has been removed deliberately. Clients can treat a 410 as final and do not need to retry.&lt;/p&gt;

&lt;p&gt;For a static site, this distinction is not just semantic. There is no application code running on each request to examine the URL and choose a response. The hosting platform compares the request path against a set of static files and declared redirect rules.&lt;/p&gt;

&lt;h2&gt;
  
  
  Declaring redirect rules on a static host
&lt;/h2&gt;

&lt;p&gt;Cloudflare Pages serves the files that Astro builds. When a request arrives for a path that is not an actual page, the host checks its redirect table before falling back to a 404. That table has to be written as part of the deployment configuration.&lt;/p&gt;

&lt;p&gt;The first group of old URLs has informational replacements. An archived blog or product page can be pointed to the closest guide. The redirect table includes 74 such pages. For those, a 301 is appropriate because the client should continue to the new resource.&lt;/p&gt;

&lt;p&gt;The second group consists of functional addresses: cart, feed, plugin and script paths. Those are not content pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping the rules explicit
&lt;/h2&gt;

&lt;p&gt;If a path is missing from the redirect table, the static host will return a 404. That is still a usable response, but it loses the difference between a moved page and a removed endpoint. The split between 301 and 410 makes that difference visible to clients.&lt;/p&gt;

&lt;p&gt;It does not require a running server or a database. A static host has no request-time application layer to inspect the URL and decide status codes; it can only compare the request path against static files and predeclared redirect rules. If an old path is missing from that rule set, the host falls back to a default 404, which cannot distinguish a moved page from a removed endpoint. Therefore, the redirect table must be complete at deploy time for the 301 and 410 split to remain meaningful.&lt;/p&gt;

&lt;p&gt;The current guide is available at &lt;a href="https://imperialseedlings.com/" rel="noopener noreferrer"&gt;imperialseedlings.com&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>astro</category>
      <category>cloudflare</category>
      <category>webdev</category>
      <category>http</category>
    </item>
    <item>
      <title>A publishing gate for 53,000 server-rendered pages</title>
      <dc:creator>TahalKuta</dc:creator>
      <pubDate>Fri, 16 Oct 2026 22:10:03 +0000</pubDate>
      <link>https://dev.to/tahalkuta_wolff_b39c7d7e0/a-publishing-gate-for-53000-server-rendered-pages-5hik</link>
      <guid>https://dev.to/tahalkuta_wolff_b39c7d7e0/a-publishing-gate-for-53000-server-rendered-pages-5hik</guid>
      <description>&lt;h2&gt;
  
  
  The problem with static builds
&lt;/h2&gt;

&lt;p&gt;When a site has about 53,000 possible pages and a business profile edit can change any of them, rebuilding a static site is not practical. Each edit would require regenerating a large portion of the site, and the delay between an edit and the updated page would depend on build time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Server rendering on Workers and D1
&lt;/h2&gt;

&lt;p&gt;The site runs Astro 5 with server rendering on Cloudflare Workers, using a D1 database for storage. Each request reaches a Worker that queries D1 for the current data and renders the HTML. Because rendering happens on demand, an edit to a profile is visible on the next request without a build step.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pages table as a publishing gate
&lt;/h2&gt;

&lt;p&gt;Not every record in the database is ready to be public. A separate pages table acts as a publishing gate. For a given page identifier, if there is no published row in that table, the Worker renders the page with a noindex meta tag and does not add the page to the sitemap.&lt;/p&gt;

&lt;p&gt;This pattern separates content from publication. The content rows can change at any time, and the pages table controls which of the 53,000 possible pages are actually part of the public site. When a business edits its profile, the rendered page updates immediately, but the set of published pages remains stable unless someone changes the pages table. Separating publication state from content avoids coupling content edits to index visibility, so a data change cannot accidentally expose or hide a page without an explicit publication decision. Keeping these concerns separate also reduces the blast radius of a content edit: a routine change to a profile does not require a corresponding change to the publication table, and a publication change does not require rewriting or revalidating the underlying content. The public index becomes deterministic at request time because the decision to serve a page with noindex or to include it in the sitemap is based on a single explicit row rather than on derived state. In systems where content and publication are mixed, every content update must be checked for side effects on visibility; with a gate, that check is centralized.&lt;/p&gt;

&lt;h2&gt;
  
  
  The impact on the front end
&lt;/h2&gt;

&lt;p&gt;The design system uses plain CSS tokens and primitives without a CSS framework.&lt;/p&gt;

&lt;p&gt;On &lt;a href="https://meumat.co.il/" rel="noopener noreferrer"&gt;meumat.co.il&lt;/a&gt;, each page request is handled by the Worker, which checks the pages table before returning HTML. If the page is not published, the response includes noindex and the page is omitted from the sitemap. This keeps the public index aligned with the publishing decisions, even though the underlying data changes frequently.&lt;/p&gt;

&lt;h2&gt;
  
  
  A check in code
&lt;/h2&gt;

&lt;p&gt;A simplified view of the gate looks like this:&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="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pageId&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="nf"&gt;renderPublicPage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;renderPrivatePage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;noindex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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;This is not the actual implementation, but it shows the shape: a single lookup in the pages table decides whether the page is part of the public site.&lt;/p&gt;

&lt;p&gt;The pages table is a small abstraction but a useful one when the content and the set of public pages are different concerns.&lt;/p&gt;

</description>
      <category>astro</category>
      <category>cloudflare</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
