hadihz.me
PersonalHard

hadihz.me

This very website you are visiting right now, focusing purely on aesthetic, visuals, and performance, with a minimal JavaScript footprint, built with Astro 7, backed by Strapi 5!

— Overview

Architecture Overview

AWS

apps/admin · Strapi 5

apps/web · Astro 7, built statically

generated client

prerendered HTML

media

contact form, sign-in

Content loaders
sync phase, four locales

Astro content store

Pages + React 19 islands

REST API + typed client

PostgreSQL

S3

CloudFront

Visitor

This is the site you are reading: a four-language portfolio (English, Arabic, French and German, right to left in Arabic) built with Astro and fed by a Strapi CMS. It is meant to look good and load fast, so every page is prerendered HTML served from a CDN, with JavaScript only where an interaction needs it.

The site also documents itself. This website shows the repository's file tree, generated from git ls-files at build time, with notes on the paths that matter written in the CMS in all four languages. This page is the shorter tour.

Static by construction

The Astro config sets no adapter, and that one omission shapes everything else. There is no server at request time, so every read happens at build time, in a sync phase that runs once before any page renders.

S3 + CloudFrontContent storeStrapiGenerated clientAstro buildContent loaders run onceFetch every collection, four localesTyped documentsValidate and storePages read the store, never StrapiUpload the prerendered HTML
  • Content edits need a rebuild, which is why the CMS has a Deploy button: a small Strapi plugin that starts the web deploy and shows its runs in the admin.
  • Secrets never reach a browser, because the build is the only process that holds them. The CMS token is a server-only Astro environment variable.
  • Two exceptions, both without secrets. The contact form posts to the CMS and is defended by a honeypot and a rate limiter instead of a token, and it answers the visitor by email in the language they wrote in. The optional sign-in, by email and password or with GitHub, keeps its credential in an httpOnly cookie on the CMS origin and its short-lived access token in memory, never in storage.
  • Measured, not assumed. Dark mode used to flash the light palette for a measured 532 ms before a class landed; it is now a prefers-color-scheme media query that resolves before first paint, which deleted code instead of adding it.

Inside the web app

apps/web/src is four layers, and the direction between them is the point.

features/
15 domain modules: projects, blogs, about, contact, search...

shell/
header, footer, SEO, analytics

design-system/
primitives + patterns, no domain knowledge

core/
controllers, Strapi client, loaders

  • File names are roles. Inside a feature, repository.ts is the fetch layer a content loader calls and service.ts reads the result back from the content store; one feature reaches another only through its service.ts. A file that is hard to name is usually doing two things.
  • No barrels, by design. A test follows every static and dynamic import from each browser entry point and fails if one reaches astro:content or a server-only variable, so a server module can never slip into a bundle.
  • Four languages, one page directory. An in-repo Astro integration walks src/pages/ and injects a /{locale} route for every non-default locale, with translated slugs from one manifest that also drives Paraglide's URL patterns. English stays unprefixed, and a link to a renamed page is a compile error.
  • Search is a static file per locale, assembled at build time from projects, posts, timeline entries and tags. Open Graph images are rendered per page at build time too.

The CMS

Strapi 5 runs as its own app on its own React stack and shares nothing with the site but data.

apps/admin

Deploy button

19 content types
projects, blogs, timeline, file notes...

Plugins
AI translate, web deploy, email designer

pnpm generate
typed client

apps/web

GitHub Actions

  • One generated contract. pnpm --filter admin generate reads the schema from a running Strapi and writes a typed client into the web app. Change a content type, regenerate, and the type errors say what to fix.
  • Built for four languages. strapi-plugin-ai-translate, a package in this repository, translates an entry into the other locales through an LLM from the edit view, with the prompt and model set in the admin. Its ten email templates, the contact replies among them, are written by hand.
  • Content that runs the site: projects, posts, the experience and education timeline, testimonials, GitHub contribution data and the file notes behind the self-documenting page.

CI/CD

Changes land on dev through pull requests, and a pull request from dev to master ships them. Checks and deploys are separate workflows, and that one split is what keeps both simple.

From branch to CDN

admin changed

Feature branch

PR into dev

Checks

dev

PR into master

Checks

master

Deploy workflow

CMS deploy

Web deploy

The life of a pull request

S3 + CloudFrontDeploy workflowTurborepo cacheChecks jobGitHubDeveloperOpen the PR1Run on the merge commit2Repo tree fresh, Prettier3lint, typecheck, test, replay what passed4Build the whole site5One required check6Merge, then ship dev to master7Push to master8Sync the build, invalidate the cache9The site answers 20010
  • One check job, on purpose. It used to be three jobs plus a gate, and each paid a full install of both Astro and Strapi. One job pays it once, while Turborepo still runs lint, typecheck and tests side by side inside it, with --continue so every failure shows in one run.
  • Prettier runs first, and the order matters. It reads only its own ignore file, so it must run before anything writes generated files into the working tree.
  • The whole site is built on every pull request, because type checking never renders a page: a component that throws on a missing CMS field passes the check and fails the build. The CMS is not built there, because that would hand its production secrets to every pull request.
  • CI runs on pull requests only. A pull request is checked on its merge with the base, so the tree that lands on master is the tree already checked; branch protection keeps the base from moving under it.
  • The web deploy is never filtered. The self-documenting page is built from every tracked file in the repository, so a commit that only touches the docs still changes a published page. The CMS deploy, a 1 GB image and a restart, runs only when its paths change.
  • Caching at three levels: the pnpm store, Turborepo's remote cache with signed artifacts, and Astro's build cache. Renovate opens dependency updates only once a release is a week old.

Shipping

Web deploy

CMS deploy

fails

Build the Strapi image

Ship it over SSH
to a forced command

Recreate the container

Health check

Previous image back

astro build

Sync to S3
hashed assets first

Invalidate CloudFront

200 within 40 s?

  • The CMS ships as a container to a VPS, with a key that can run only the deploy script, beside its own PostgreSQL, which is backed up every night. A failed health check puts the previous image back.
  • The web deploy runs after the CMS, so a build never reads a schema the CMS doesn't serve yet. It uploads the hashed assets before the HTML that references them, invalidates CloudFront and fails unless the site answers within 40 seconds.

Built with AI agents

The repository is set up for coding agents as much as for people.

  • Docs that route. A short root AGENTS.md points to a guide per app and to six skills written for this repository: feature-modules (where code goes), client-controllers (browser behaviour), design-system, output-neutral-refactor (refactors that must not change the rendered HTML), cms-annotations (keeping the file notes in step with the tree) and draft-content.
  • Content drafted by an agent, published by a person. draft-content researches a repository or a topic, drafts a project page or blog post in four languages and saves it to the CMS as unpublished drafts through Strapi's built-in MCP endpoint; this page was written that way and reviewed before publishing.
  • Design and motion skills. Sixteen of Emil Kowalski's skills on animation, interaction and polish are pinned in a lockfile.

Key Features:

  • Four languages with translated URLs, right to left in Arabic, and English unprefixed
  • Prerendered pages on S3 and CloudFront, with JavaScript only in islands that need it
  • View transitions, dark mode with no flash, and a globe of where projects happened
  • A self-documenting page: the live repository tree with notes from the CMS
  • Static search and per-page Open Graph images, both generated at build time
  • A contact form that answers in the visitor's language, and an optional sign-in with email or GitHub
  • A Strapi admin with AI translation and a Deploy button that rebuilds the site

Tech Stack:

  • Web: Astro 7, React 19, Tailwind v4, Paraglide, TypeScript, Embla, Mermaid, Shiki
  • CMS: Strapi 5, PostgreSQL, Resend, OpenRouter for translation
  • Infrastructure: AWS S3 and CloudFront, Docker on a VPS, nightly backups to Cloudflare R2
  • Tooling: Turborepo, pnpm, ESLint, Prettier, Vitest, Renovate, GitHub Actions

By the numbers (November 2026): about 980 commits since April 2026, 151 merged pull requests, 61 test files, 15 feature modules, 19 content types and 5 GitHub Actions workflows.

— Stack
AstroStrapiDevOpsTurborepo