On this page8
Part of my work on Counselling Platform. By Mohammad Javad Dastouri, full-stack and AI engineer.
The engineering behind a bilingual counselling site: the decisions that keep two languages, two reading directions and German privacy rules working together.
At a glance
- Area
- Web platforms and migration
- My role
- Sole engineer: design, build, deploy and run
- Built with
- Node.js 22, PostgreSQL, TipTap, Nginx
- Area
- Web platforms and migration
- My role
- Sole engineer: design, build, deploy and run
- Built with
- Node.js 22, PostgreSQL, TipTap, Nginx
What it does
Routing
One clean address per language, locked by a contract test
Direction
Right-to-left and left-to-right from the same styles
Consent
Wording and categories stored as data, every decision logged
SEO
Database-driven rules that score both languages
Routing
One clean address per language, locked by a contract test
Direction
Right-to-left and left-to-right from the same styles
Consent
Wording and categories stored as data, every decision logged
SEO
Database-driven rules that score both languages
One clean address per language
I used clean locale paths, a language cookie that causes exactly one 302 and then a 200, and a 301 for old ?lang= links. A shell contract test locks it in.
What the shell contract test checks
- Every internal link carries a locale prefix, and no ?lang= appears.
- Form actions point to the correct language.
- Sign-in works end to end.
- The chosen language is remembered with no flash.
- Old ?lang= links return a 301 to the clean address.
Two reading directions, one set of styles
The category tree and custom dropdowns mirror correctly in right-to-left and left-to-right using CSS logical properties, with no per-direction overrides.
Consent built on European guidance
The consent system follows EDPB and German DSK guidance. Reject all sits on the first layer with the same weight as Accept all, and every decision is logged in its own table.
SEO scoring for two scripts
Scoring
21 database-driven rules score each page.
Length
title and description are measured by estimated pixel width, not character count.
Readability
German-specific Amstad constants, with a documented fallback for Persian, which has no usable syllable count.
Scoring
21 database-driven rules score each page.
Length
title and description are measured by estimated pixel width, not character count.
Readability
German-specific Amstad constants, with a documented fallback for Persian, which has no usable syllable count.
One source for structured data
A JSON-LD graph builder reads from one settings row, so the footer and the structured data come from the same source and cannot drift apart.
Hiring someone to turn business problems into tools?
Tell me about the role, or go back to the project: the client site this engineering delivered.
- Section
- Web platforms and migration
- Updated
- November 9, 2026
- Reading time
- 2 min read
Hiring for this kind of work?
Tell me about the role and I will reply by email.
Discuss a role with me
