<?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: Hatem Gheta</title>
    <description>The latest articles on DEV Community by Hatem Gheta (@hatemgheta).</description>
    <link>https://dev.to/hatemgheta</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%2F4232319%2Fcc96b976-a1c5-4995-b363-e205e527345a.jpeg</url>
      <title>DEV Community: Hatem Gheta</title>
      <link>https://dev.to/hatemgheta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hatemgheta"/>
    <language>en</language>
    <item>
      <title>Before You Build a Dashboard, Understand the Business Workflow</title>
      <dc:creator>Hatem Gheta</dc:creator>
      <pubDate>Thu, 19 Nov 2026 16:43:57 +0000</pubDate>
      <link>https://dev.to/hatemgheta/before-you-build-a-dashboard-understand-the-business-workflow-3lo9</link>
      <guid>https://dev.to/hatemgheta/before-you-build-a-dashboard-understand-the-business-workflow-3lo9</guid>
      <description>&lt;p&gt;One of the most expensive mistakes in business software development is starting with the interface before understanding how the business actually operates.&lt;/p&gt;

&lt;p&gt;A company asks for a dashboard.&lt;/p&gt;

&lt;p&gt;The developer starts designing cards, charts, tables, and navigation menus.&lt;/p&gt;

&lt;p&gt;A few weeks later, the application looks impressive. But the team still relies on spreadsheets, phone calls, and WhatsApp messages to complete its daily work.&lt;/p&gt;

&lt;p&gt;The problem is not necessarily the technology.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The problem is that we designed the screens before understanding the workflow.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My background in sales, digital marketing, and business development has shaped how I approach software engineering. Working with business processes teaches you something that isn't always obvious from a technical specification: what management wants to see and what employees actually need to do are often two different things.&lt;/p&gt;

&lt;p&gt;Here are five principles I believe make business software more useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Start with decisions, not features
&lt;/h2&gt;

&lt;p&gt;A typical requirements document might look like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customer management&lt;/li&gt;
&lt;li&gt;Order tracking&lt;/li&gt;
&lt;li&gt;Employee dashboard&lt;/li&gt;
&lt;li&gt;Analytics and reporting&lt;/li&gt;
&lt;li&gt;Notifications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are features. They don't explain the business problem.&lt;/p&gt;

&lt;p&gt;A more useful starting point is asking:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What decisions does this system need to support?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For example, in a delivery operation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who should handle the next order?&lt;/li&gt;
&lt;li&gt;What happens if a driver rejects an assignment?&lt;/li&gt;
&lt;li&gt;When is an order considered delivered?&lt;/li&gt;
&lt;li&gt;Who can approve a financial adjustment?&lt;/li&gt;
&lt;li&gt;How does a manager identify an unresolved delivery problem?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each question leads to a workflow, a business rule, and eventually a technical requirement.&lt;/p&gt;

&lt;p&gt;Instead of designing five screens, you begin by understanding five operational decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Model the actual workflow
&lt;/h2&gt;

&lt;p&gt;Consider a simplified delivery order:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Created
   |
   v
Pending Assignment
   |
   v
Assigned
   |
   v
Out for Delivery
   |
   +------&amp;gt; Failed Attempt
   |             |
   |             v
   |          Reassigned
   |             |
   +-------------+
   |
   v
Delivered
   |
   v
Financial Settlement
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an illustrative workflow, not a universal design for every delivery business.&lt;/p&gt;

&lt;p&gt;It immediately introduces questions that a dashboard mockup might miss.&lt;/p&gt;

&lt;p&gt;Can a completed order return to an active state?&lt;/p&gt;

&lt;p&gt;Can two drivers accept the same assignment?&lt;/p&gt;

&lt;p&gt;What happens when an API request is retried?&lt;/p&gt;

&lt;p&gt;Who is allowed to change a financial settlement?&lt;/p&gt;

&lt;p&gt;What records should remain available after a correction?&lt;/p&gt;

&lt;p&gt;These questions affect the database, permissions, APIs, background jobs, and audit records.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A business workflow is also a technical architecture problem.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Translate business rules into system invariants
&lt;/h2&gt;

&lt;p&gt;A business rule is useful only when the system can enforce it.&lt;/p&gt;

&lt;p&gt;Suppose an order can have only one active driver assignment at a time.&lt;/p&gt;

&lt;p&gt;That rule shouldn't exist only in a product requirements document.&lt;/p&gt;

&lt;p&gt;It needs enforcement at the data layer or within a properly synchronized transaction.&lt;/p&gt;

&lt;p&gt;For example, a PostgreSQL partial unique index can express that constraint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;UNIQUE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt;
    &lt;span class="n"&gt;one_active_assignment_per_order&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;driver_assignments&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'active'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the database rejects a second active assignment for the same order, even if two requests arrive concurrently.&lt;/p&gt;

&lt;p&gt;The application still needs to handle that rejection gracefully and explain the outcome to the user.&lt;/p&gt;

&lt;p&gt;This is an important distinction:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The interface communicates business rules. The backend enforces them.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Both matter.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Design for operational failures
&lt;/h2&gt;

&lt;p&gt;Real businesses don't operate under perfect conditions.&lt;/p&gt;

&lt;p&gt;People double-click buttons.&lt;/p&gt;

&lt;p&gt;Connections fail.&lt;/p&gt;

&lt;p&gt;Customers change their minds.&lt;/p&gt;

&lt;p&gt;Employees make mistakes.&lt;/p&gt;

&lt;p&gt;External systems respond slowly.&lt;/p&gt;

&lt;p&gt;Imagine a delivery-completion request that times out.&lt;/p&gt;

&lt;p&gt;The client doesn't know whether the server processed it, so it retries.&lt;/p&gt;

&lt;p&gt;Without proper safeguards, that retry might duplicate a financial operation or trigger an unwanted notification.&lt;/p&gt;

&lt;p&gt;One approach is to use an idempotency key for operations that must not be repeated.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="no"&gt;POST&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;orders&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;123&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;complete&lt;/span&gt;
&lt;span class="nc"&gt;Idempotency&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nc"&gt;Key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;completion&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;123&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;v1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The backend can record the key and its outcome, and return the previously recorded result for an equivalent retry.&lt;/p&gt;

&lt;p&gt;But an idempotency key alone isn't enough. The implementation must also handle concurrent first requests safely, define the key's scope, and perform the state transition and idempotency recording atomically.&lt;/p&gt;

&lt;p&gt;This is not an optional edge case when money or operational state is involved.&lt;/p&gt;

&lt;p&gt;It is part of designing a dependable business system.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Build dashboards from trustworthy operations
&lt;/h2&gt;

&lt;p&gt;Dashboards are valuable.&lt;/p&gt;

&lt;p&gt;But their value depends on the quality of the data beneath them.&lt;/p&gt;

&lt;p&gt;A chart showing completed orders means little unless everyone agrees on what "completed" means.&lt;/p&gt;

&lt;p&gt;Does it mean the driver marked the order as delivered?&lt;/p&gt;

&lt;p&gt;That the customer confirmed receipt?&lt;/p&gt;

&lt;p&gt;That the merchant accepted the result?&lt;/p&gt;

&lt;p&gt;Or that the financial settlement was finalized?&lt;/p&gt;

&lt;p&gt;Each definition can produce a different number.&lt;/p&gt;

&lt;p&gt;The same problem appears in sales and marketing.&lt;/p&gt;

&lt;p&gt;A lead, a qualified lead, an opportunity, and a closed sale are not interchangeable metrics.&lt;/p&gt;

&lt;p&gt;If those definitions aren't consistent across teams, even a technically correct report can mislead management.&lt;/p&gt;

&lt;p&gt;Before building analytics, define:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The business event being measured&lt;/li&gt;
&lt;li&gt;The source of truth&lt;/li&gt;
&lt;li&gt;The timestamp used&lt;/li&gt;
&lt;li&gt;The ownership of the data&lt;/li&gt;
&lt;li&gt;How corrections and reversals are handled&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reliable reporting starts with reliable operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where AI fits into this process
&lt;/h2&gt;

&lt;p&gt;AI can make software development faster, but speed doesn't replace business understanding.&lt;/p&gt;

&lt;p&gt;Generating forms, APIs, or components is useful.&lt;/p&gt;

&lt;p&gt;Understanding whether a workflow is correct is a different challenge.&lt;/p&gt;

&lt;p&gt;For AI-assisted development, I believe the most valuable input isn't simply a list of requested features.&lt;/p&gt;

&lt;p&gt;It is a structured description of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The business goals&lt;/li&gt;
&lt;li&gt;The actors and their responsibilities&lt;/li&gt;
&lt;li&gt;The workflows and permitted transitions&lt;/li&gt;
&lt;li&gt;The rules that must never be violated&lt;/li&gt;
&lt;li&gt;The expected behavior when things go wrong&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The clearer those inputs become, the easier it is to evaluate the software that AI or a human developer produces.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thought
&lt;/h2&gt;

&lt;p&gt;My experience in sales and digital marketing taught me to ask what drives a business forward.&lt;/p&gt;

&lt;p&gt;Software engineering taught me to turn those requirements into systems.&lt;/p&gt;

&lt;p&gt;Today, as the founder of BASMA OS and Founder and CEO of BASGRO, that combination continues to influence how I think about digital products.&lt;/p&gt;

&lt;p&gt;A business doesn't need another dashboard simply because dashboards are easy to demonstrate.&lt;/p&gt;

&lt;p&gt;It needs software that helps people complete real work, make better decisions, and operate with fewer unnecessary obstacles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good business software starts with understanding the business.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What is the most important business rule you've discovered only after starting development?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Hatem Gheta is an entrepreneur and software engineer based in Dubai, and the founder of &lt;a href="https://basmaos.com" rel="noopener noreferrer"&gt;BASMA OS&lt;/a&gt;. He works at the intersection of business development, digital marketing, and software engineering.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>programming</category>
      <category>architecture</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Bilingual SEO for an Arabic-first website: what actually mattered</title>
      <dc:creator>Hatem Gheta</dc:creator>
      <pubDate>Sat, 07 Nov 2026 15:05:20 +0000</pubDate>
      <link>https://dev.to/hatemgheta/bilingual-seo-for-an-arabic-first-website-what-actually-mattered-39nj</link>
      <guid>https://dev.to/hatemgheta/bilingual-seo-for-an-arabic-first-website-what-actually-mattered-39nj</guid>
      <description>&lt;p&gt;I recently shipped a bilingual (Arabic + English) profile page on our company site, &lt;a href="https://basmaos.com/en/hatem-gheta" rel="noopener noreferrer"&gt;basmaos.com&lt;/a&gt;. Arabic is the default language, English lives under &lt;code&gt;/en&lt;/code&gt;, and the whole site is a small PHP app with no framework.&lt;/p&gt;

&lt;p&gt;Most bilingual SEO guides assume English first and treat right-to-left as an afterthought. Here is what actually mattered when Arabic comes first, including two caching surprises I didn't expect.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Pick one URL scheme and keep it
&lt;/h2&gt;

&lt;p&gt;Our site already served Arabic at the root and English under &lt;code&gt;/en&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://basmaos.com/hatem-gheta      ← Arabic (default)
https://basmaos.com/en/hatem-gheta   ← English
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It was tempting to add &lt;code&gt;/ar/...&lt;/code&gt; for symmetry. I didn't, because two URLs for the same Arabic page means duplicate content and split signals. Instead, &lt;code&gt;/ar/...&lt;/code&gt; is a single permanent redirect to the root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$path&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'/ar'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;str_starts_with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'/ar/'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;$target&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;substr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nv"&gt;$target&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$target&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="nv"&gt;$target&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="o"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;rtrim&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$target&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="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;redirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$target&lt;/span&gt;&lt;span class="mf"&gt;.&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$query&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="mf"&gt;.&lt;/span&gt;&lt;span class="nv"&gt;$query&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="mi"&gt;301&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;People still guess &lt;code&gt;/ar/&lt;/code&gt; when they share links, so the redirect catches them in one hop, with no chains and no loops. Trailing slashes get the same treatment: one &lt;code&gt;301&lt;/code&gt; to the canonical form.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. hreflang: every page lists every language, including itself
&lt;/h2&gt;

&lt;p&gt;Each language version carries the full set, plus &lt;code&gt;x-default&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"canonical"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://basmaos.com/en/hatem-gheta"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"alternate"&lt;/span&gt; &lt;span class="na"&gt;hreflang=&lt;/span&gt;&lt;span class="s"&gt;"ar"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://basmaos.com/hatem-gheta"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"alternate"&lt;/span&gt; &lt;span class="na"&gt;hreflang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://basmaos.com/en/hatem-gheta"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"alternate"&lt;/span&gt; &lt;span class="na"&gt;hreflang=&lt;/span&gt;&lt;span class="s"&gt;"x-default"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://basmaos.com/hatem-gheta"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three rules I check in tests:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The canonical points at itself.&lt;/strong&gt; Never point the English page's canonical at the Arabic page; that tells Google to drop the English one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The links are reciprocal.&lt;/strong&gt; If the Arabic page lists the English one, the English page must list the Arabic one back.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;x-default&lt;/code&gt; is the Arabic version&lt;/strong&gt;, because that is what someone with no language preference should land on.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The sitemap repeats the same alternates with &lt;code&gt;xhtml:link&lt;/code&gt;, so Google sees one consistent story everywhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. RTL is more than &lt;code&gt;dir="rtl"&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"ar"&lt;/span&gt; &lt;span class="na"&gt;dir=&lt;/span&gt;&lt;span class="s"&gt;"rtl"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That attribute is the easy part. The issues show up in the details:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use logical CSS properties.&lt;/strong&gt; &lt;code&gt;margin-left&lt;/code&gt; is wrong in one of your two languages. &lt;code&gt;margin-inline-start&lt;/code&gt;, &lt;code&gt;padding-inline-start&lt;/code&gt; and &lt;code&gt;inset-inline-end&lt;/code&gt; flip automatically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.product-points&lt;/span&gt; &lt;span class="nt"&gt;li&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="py"&gt;padding-inline-start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.product-points&lt;/span&gt; &lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="nd"&gt;::before&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="py"&gt;inset-inline-start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&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;&lt;strong&gt;Isolate mixed-direction text.&lt;/strong&gt; An Arabic page that shows an English name, or an English page that shows an Arabic one, needs both &lt;code&gt;lang&lt;/code&gt; and &lt;code&gt;dir&lt;/code&gt; on that element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;
  Hatem Gheta
  &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"ar"&lt;/span&gt; &lt;span class="na"&gt;dir=&lt;/span&gt;&lt;span class="s"&gt;"rtl"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;حاتم غيته&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without that, punctuation and brand names such as "BASMA OS" end up in the wrong place.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Watch alignment inside grids.&lt;/strong&gt; My first version put the Arabic name at the far edge of the English hero, because an RTL span inside an LTR grid aligned to its own start. &lt;code&gt;justify-self: start&lt;/code&gt; fixed it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Arrows and icons need flipping.&lt;/strong&gt; An arrow that means "go" points right in English and left in Arabic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;dir&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;"rtl"&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="nc"&gt;.arrow&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;scaleX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;-1&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;h2&gt;
  
  
  4. Structured data: one person, two pages
&lt;/h2&gt;

&lt;p&gt;The page describes a real person, so it uses &lt;code&gt;ProfilePage&lt;/code&gt; with a &lt;code&gt;Person&lt;/code&gt; as &lt;code&gt;mainEntity&lt;/code&gt;. The important decision was the &lt;code&gt;@id&lt;/code&gt;:&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="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Person"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://basmaos.com/hatem-gheta#person"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Hatem Gheta"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"alternateName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"حاتم غيته"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://basmaos.com/hatem-gheta"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"worksFor"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"@id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://basmaos.com/#organization"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"sameAs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"https://www.linkedin.com/in/hatemgheta/"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The same &lt;code&gt;@id&lt;/code&gt; and &lt;code&gt;url&lt;/code&gt; on both language pages.&lt;/strong&gt; It is one person, not two. My first version set &lt;code&gt;url&lt;/code&gt; to the current language's page, which quietly told search engines there were two different &lt;code&gt;url&lt;/code&gt;s for the same entity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The name in the other script goes in &lt;code&gt;alternateName&lt;/code&gt;.&lt;/strong&gt; On the Arabic page the order is reversed: Arabic &lt;code&gt;name&lt;/code&gt;, English &lt;code&gt;alternateName&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;sameAs&lt;/code&gt; lists only profiles that are definitely mine.&lt;/strong&gt; It is tempting to add every link you have. Don't: an unrelated or closed profile there does more harm than good.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Everything in the JSON-LD is also visible on the page.&lt;/strong&gt; Structured data that says things the page doesn't is a fast way to lose trust.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Accessibility caught a brand-color bug
&lt;/h2&gt;

&lt;p&gt;Running axe-core on both languages flagged our brand gold, &lt;code&gt;#b8913f&lt;/code&gt;, as text on a light background: a contrast ratio of 2.7:1, well below the 4.5:1 that WCAG AA requires. It was already used across the whole site, not just the new page.&lt;/p&gt;

&lt;p&gt;The fix was a separate token used only for text:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;--gold&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;#b8913f&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;       &lt;span class="c"&gt;/* buttons, borders, lines */&lt;/span&gt;
&lt;span class="nt"&gt;--gold-text&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="err"&gt;#86671&lt;/span&gt;&lt;span class="nt"&gt;f&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;  &lt;span class="c"&gt;/* text on light backgrounds: 4.85:1 */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Buttons and decoration kept the original color; only text changed. Visually you barely notice, and the audit went from failing to 0 violations.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. The surprise: LinkedIn caches preview images by URL
&lt;/h2&gt;

&lt;p&gt;After the launch I changed the title on the page and regenerated the Open Graph image. The page updated. LinkedIn's Post Inspector picked up the new title… and kept showing the &lt;strong&gt;old image&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Debugging this took a detour, because the image hash from the live URL didn't match the file on disk either:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;file on server:  4666015a…  (79,405 bytes)
served via CDN:  fd7df16f…  (78,080 bytes)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CDN header said &lt;code&gt;cache-status: MISS&lt;/code&gt;, and a cache-busting query string returned the same bytes. So it wasn't serving a stale copy: the CDN re-compresses images on the fly. That explained the hash mismatch, but not LinkedIn.&lt;/p&gt;

&lt;p&gt;The real cause: &lt;strong&gt;LinkedIn caches the preview image by its URL&lt;/strong&gt;, and re-scraping the page doesn't necessarily re-fetch an image whose URL hasn't changed. The fix was simply a new file name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;- &amp;lt;meta property="og:image" content="https://basmaos.com/basmaos-assets/hatem-gheta-og.jpg"&amp;gt;
&lt;/span&gt;&lt;span class="gi"&gt;+ &amp;lt;meta property="og:image" content="https://basmaos.com/basmaos-assets/hatem-gheta-og-2.jpg"&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One more inspection and the new card appeared. Lesson: &lt;strong&gt;version your OG image file names&lt;/strong&gt;, the same way you version CSS.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Arabic text in images needs real shaping
&lt;/h2&gt;

&lt;p&gt;The Open Graph card has the name in both scripts. Many image libraries draw Arabic letters disconnected and left-to-right. I rendered the card as HTML in headless Chromium and took a screenshot, which gives correct Arabic shaping for free.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Test the boring parts
&lt;/h2&gt;

&lt;p&gt;The whole site is checked by a plain PHP test script that calls the router directly, with no web server. For this page it verifies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;200&lt;/code&gt; for both languages; &lt;code&gt;301&lt;/code&gt; for &lt;code&gt;/ar/...&lt;/code&gt; and trailing slashes&lt;/li&gt;
&lt;li&gt;one &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;, one &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt;, one meta description per page&lt;/li&gt;
&lt;li&gt;a self-referencing canonical and the complete hreflang set&lt;/li&gt;
&lt;li&gt;the page appears in the sitemap with alternates&lt;/li&gt;
&lt;li&gt;the JSON-LD parses, the Person &lt;code&gt;@id&lt;/code&gt; is identical in both languages, and &lt;code&gt;sameAs&lt;/code&gt; contains only the expected profile&lt;/li&gt;
&lt;li&gt;no &lt;code&gt;noindex&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of it is clever, but each check is something I have seen go wrong on a real site.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it stands
&lt;/h2&gt;

&lt;p&gt;Deployed, crawlable, in the sitemap, and submitted through Search Console. Indexing is up to Google, and I'll update this post once both pages are indexed.&lt;/p&gt;

&lt;p&gt;If you are building for Arabic, Hebrew, Persian or Urdu audiences, I'd like to hear what tripped you up. The RTL details are where I learned the most.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>i18n</category>
      <category>php</category>
    </item>
  </channel>
</rss>
