~/blog $ ls
Notes from production.
مدوّنة
How I design, secure, and run software that has to work: architecture, authorization, infrastructure, and AI in Arabic-first products.
Building an Arabic-first, multi-tenant legal platform
How Nibras is put together: one .NET image in two roles, a request pipeline where order is security, firm isolation in the data layer, authorization that fails closed, background work that never charges twice, and an AI assistant that has to ask first.
architecture / multi-tenancy / security / AI / .NET / PostgreSQL
Arabic legal RAG on PostgreSQL and pgvector, in .NET
How the legal assistant in Nibras finds Jordanian law: Arabic normalization, statute-aware chunking, an exact-article path before any vector search, debounced indexing, firm-scoped retrieval in SQL, and a rule that a legal answer without a source does not get generated.
AI / RAG / PostgreSQL / pgvector / Arabic / .NET
Fatoora: one product, three architectures
An Arabic invoice maker built three times in three weeks: a localStorage-first static page with optional Supabase sync, then two Next.js versions on Neon and Clerk. What moved where, why, and which shortcuts were deliberate.
architecture / next.js / postgresql / arabic / rtl / side project
Hand-tracked VFX with MediaPipe, OpenCV, and Pygame
A webcam effect that puts a glowing orb, particles, and a holographic HUD on your fingertips, and fires a burst when your hands meet. How the real-time loop works, how the gesture is read from landmarks, where the frame time goes, and the PyInstaller path bug that hides your model file.
computer vision / Python / MediaPipe / OpenCV / Pygame / PyInstaller
Ratcheting architecture rules in a modular monolith
How I keep module boundaries honest in a large .NET and React codebase without a big-bang cleanup: a generated module manifest, an import and cycle checker in CI, a recorded baseline of existing violations, and a build that fails only on new ones.
architecture / CI/CD / .NET / React / TypeScript / refactoring
Shipping a paywalled ML model with Flask
How a scikit-learn car-price model became a small paid web product: loading the artifacts without taking the site down, carrying form state across a payment redirect, and being honest about what a return URL proves.
python / flask / machine learning / payments / deployment
The tenant came from a header: EF Core query filters and the value behind them
EF Core global query filters made tenant isolation in my HR prototype look solved. The filters were fine. The value feeding them fell back to a request header and a hard-coded default. How I traced it, and how to fix it.
multi-tenancy / security / .NET / EF Core / ASP.NET Core
Working with contractors without handing over the codebase
How I designed a shared development server where developers get a full private copy of the code, run tests and open pull requests themselves, and still never reach production, take the source home, or touch real data.
security / platform engineering / devops / Linux / CI/CD