




Sophie Callander Consulting
British Columbia, Canada
Professional website for a mediator in Canada, in seven languages with right-to-left support, featuring services, credentials, CMS-managed articles and contact. It includes SEO and structured data tailored to each language and page.
Includes7 languagesRight-to-leftMultilingual SEO



Overview
The challenge
Links
Private — client project
System architecture
A server-rendered, statically prerendered Next.js 16 App Router application built around a single localized route tree serving seven locales. The central decision is that almost nothing runs on the client: dictionaries, content assembly, structured data and metadata all resolve on the server, and the client bundle carries only five interactive components. Content is split by volatility — durable copy lives in typed TypeScript dictionaries compiled into the build, while blog articles come from a headless CMS through ISR, so the client can publish without a deploy while marketing copy stays under version control and type checking.
Application Architecture
- A single localized route tree with static params emitting one static variant per locale.
- Default locale served prefix-less through an internal rewrite, so English and localized routes share one implementation.
- Server shell and client island pattern: the header resolves all data server-side and passes resolved props to its interactive child.
- A content assembly layer joins translated copy with untranslated structure — stable slug identifiers used as URL anchors and icon keys are explicitly never translated.
- Presentational primitives compose every page, with SCSS Modules scoped per component and no UI framework.
Internationalization
- Seven locales with per-locale language tag, social locale, formatting locale and writing direction in one metadata record.
- Persian drives right-to-left on the document root, carried through 62 CSS logical-property declarations.
- Dictionaries lazy-imported per request so only the active locale reaches the server, and never the client.
- Native internationalization APIs for plural counts and dates, with dates pinned to UTC so a late-night publish does not display the previous day in negative offsets.
- The language switcher renders real anchors with language and direction attributes, working without JavaScript.
Data Model
- No database, no ORM and no persistence layer — the site is read-only by design.
- Strapi 5 REST filtered by a project slug tenant key so one CMS serves multiple sites.
- A mapping layer converts every CMS response into site-owned types; the UI never touches the API shape.
- Derived server-side: reading time from body word count, related posts ranked by shared category, and a nesting-aware parser that strips the CMS’s duplicated takeaways block.
- CMS failures degrade to an empty list rather than propagating — an outage costs the blog, not the site.
SEO & Answer-Engine Layer
- hreflang × 7 + x-default
- Per-route canonical
- JSON-LD @graph
- ProfessionalService
- FAQPage
- BreadcrumbList
- Article
- Generated sitemap
- Generated robots
- llms.txt route
- AI crawler allowlist
Infrastructure & deployment
Deployed as a self-hosted Docker container behind nginx on a Linode VPS in Toronto rather than a managed platform — a choice that follows from the server already hosting roughly thirteen projects. Development and production are two independent clones of the same repository on the same machine, parameterized entirely through environment variables so neither can collide with the other's container name or port.
Containers & Build
- Three-stage Dockerfile on node:22-alpine, running as a non-root user.
- Standalone output so the runtime image ships only the dependencies actually used.
- Compose healthcheck polling the app every 30 seconds with a start period.
- The public site URL is passed as a build arg, not just runtime env — it is baked at compile time because it signs canonicals, hreflang and the sitemap.
CI/CD
- Bitbucket Pipelines, with pull requests running the same verification step as main.
- Gate order is install, type-check, lint, build — with type checking ahead of the build so locale key errors surface first.
- Push to main deploys to development, then production, via a remote script that resets to origin, rebuilds, restarts and prunes stale images.
- A documented pipeline gotcha: the production script path is quoted because the CI masks every occurrence of a secured variable’s value in the command string, which was corrupting the path.
Environments & Edge
- Development and production coexist on one host with distinct directories, container names and ports.
- Development serves a noindex robots header at the nginx layer so it can never compete with production for rankings.
- nginx terminates TLS and forces HTTPS and apex canonicalization with permanent redirects.
- A Cloudflare real-IP snippet restores visitor IPs from the forwarding header, trusted only from published ranges — shipped and documented ahead of enabling the proxy.
Observability
- Analytics mounted only when a measurement ID is configured — with none set, the site loads nothing from the provider and sets no cookie.
- CMS fetch failures logged server-side with status and URL.
Built with
A complete seven-language marketing site delivered to production with its deployment pipeline, server configuration and a written technical audit.
Application Surfaces
- Home, Services, About, FAQ, Contact, Reflections, Blog index and Blog detail — eight route types across seven locales.
- Header with mobile panel, skip-to-content link and language switcher; footer with full navigation.
- Blog detail with cover image, reading time, key-takeaways block, related posts and per-post CMS-driven metadata.
- Narrative About page with journey timeline, credentials including an explicitly separated in-progress group, and an animated portrait strip.
- Contact page with email, phone and an external booking link.
Integrations
- Strapi 5 headless CMS for blog content, tenant-filtered.
- An embedded chat widget in Shadow DOM, loaded from the CMS origin with a tenant attribute.
- External booking scheduler and conditionally-mounted analytics.
Infrastructure & Documentation
- Dockerfile, Compose file, remote deploy script and CI pipeline configuration.
- nginx server blocks for both environments plus the Cloudflare real-IP snippet.
- A written SEO and answer-engine audit documenting five corrected defects with before and after evidence, a phase-by-phase verification table, Lighthouse results, explicitly tagged unverifiable claims, and open questions for the client.
- A runbook for enabling the Cloudflare proxy, including measured latency justification and the required ordering of steps.