salah@web: ~zsh

salah@web~$whoami

Salah Sennoussi — Technical Lead · Full-Stack TypeScript

Technical lead for the web platform of a CMA-licensed investment and brokerage platform. Built a clinic EHR SaaS end to end, live in about 50 clinics.

status
Technical Lead at Dinar · taking on senior full-stack and lead roles, remote.
based
Algiers, Algeria
timezone
UTC+1 · flexible hours
languages
Arabic · French · English
email
[email protected]
cv
salah-sennoussi-cv.pdf · html version
~/about.mdmarkdown

salah@web~$cat about.md

Summary

I build full-stack TypeScript products, and I am the technical lead for the web platform at Dinar.

Two things shaped how I work: a regulated financial platform where correctness and locale are non-negotiable, and a clinic SaaS I built end to end, where every architectural choice had a cost attached to it.

I'm comfortable owning a feature from the data model to the pixel, co-designing API contracts across teams, and reviewing work outside my own stack, React Native and .NET included.

Experience

~/experience/dinar11 highlights

salah@web~/experience$cat dinar.md

Technical Lead, Web Platform (full-time) — Dinar

CMA-licensed investment & brokerage platform · · Saudi Arabia · Hybrid · dinar.sa

  • Technical lead for the web platform of a CMA-licensed (Capital Market Authority) Saudi investment and brokerage platform, used by 100k+ investors: three Next.js/TypeScript apps (investor app, admin back office, marketing site).
  • Co-designed REST contracts with the backend team and reviewed across the React Native, .NET and infrastructure teams as one of the technical leads.
  • Built Saudi and US equities trading on the web: IPOs, rights issues, Nomu, market depth, watchlists and compliance-driven trading restrictions, on a WebSocket price feed with exponential-backoff reconnect and 100ms update coalescing, plus a SignalR order-status hub.
  • Built onboarding and investing for the product lines (sukuk, equity and income funds, fixed deposits, unit offerings): individual and corporate KYC/KYB with Absher, Yakeen and Wathq integrations, wallets, IBAN withdrawals and portfolio statements; added corporate accounts with approver/viewer roles and an approvals workflow for institutional clients.
  • Owned the admin back office for brokerage operations, KYC approval, AML monitoring, settlement, corporate actions and wallets; designed its fine-grained RBAC (role-based access control): route-level permission gates, per-action guards and a grouped permissions editor that lets operations teams manage access without engineering.
  • Designed a backend-for-frontend auth layer (HttpOnly cookies, server-side token decryption, correlation IDs) and app-wide security headers (CSP, HSTS, frame-ancestors, input sanitization). Every finding from the independent security assessments was resolved, and follow-up reports came back with only low-severity findings.
  • Led DevSecOps (security built into CI/CD) on Azure DevOps CI/CD to Google Kubernetes Engine (GKE): Gitleaks, Semgrep with custom rules, Trivy, Nuclei and npm audit scanning; keyless image signing (Sigstore cosign); hardened pods (non-root, read-only filesystem, seccomp).
  • Ran the apps on Kubernetes (K8s) with zero-downtime pod recycling: a memory watchdog drains pods via readiness probes before recycling them, preStop hooks, CPU-based autoscaling (HPA) and zone-spread replicas.
  • Built end-to-end observability: structured logging into Grafana Loki with a fault taxonomy (frontend, backend or infra) and PII redaction, OpenTelemetry instrumentation and browser-to-backend request correlation, so most production issues trace to their origin in under 3 minutes, down from up to a couple of hours.
  • Built a Node API gateway in front of 11 backend services (circuit breakers, per-backend concurrency caps, 3 timeout tiers), then retired it in favour of direct client calls to remove a network hop and CORS issues.
  • Rebuilt the UI on shadcn/ui and Radix with Arabic/English i18n and full RTL, removing 113 dead legacy components and adding code splitting; migrated data fetching to TanStack Query.
  • Next.js
  • React
  • TypeScript
  • Node.js
  • Tailwind CSS
  • shadcn/ui
  • TanStack Query
  • Zustand
  • i18next
  • WebSocket
  • SignalR
  • Docker
  • Kubernetes (GKE)
  • Google Cloud Platform (GCP)
  • Azure DevOps
  • OpenTelemetry
  • Grafana Loki
  • Semgrep
  • Trivy
~/experience/daoini6 highlights

salah@web~/experience$cat daoini.md

Technical Lead & Full-Stack Engineer (part-time) · Technical Advisor since May 2026 — Daoini

Clinic management / EHR SaaS, live in about 50 clinics in Algeria · · Algeria · Remote

  • Sole engineer on the product, end to end, until May 2026. I designed and built the NestJS/Fastify/PostgreSQL API, the Next.js clinician app, two React Native apps (patient booking and clinic companion), the admin portal and the marketing site, and deployed the API on AWS EC2.
  • Built SMS that goes out from each clinic's own SIM instead of a paid A2P gateway. A Postgres outbox is claimed with FOR UPDATE SKIP LOCKED and drained by a companion Android app with a native Kotlin sender. This takes per-message provider fees, the largest recurring cost per clinic, out of the design.
  • Built multi-tenancy on a shared schema scoped by clinic. A permission guard resolves the clinic on every request and checks that membership's grants: fine-grained permissions layered over role-default bundles. Branch and room scoping live in the service layer. Auth adds JWT token blacklisting and bcrypt-hashed SMS OTP.
  • Made clinic payments race-safe. Payments are signed deltas applied in one guarded UPDATE, so the database itself holds 0 ≤ paid ≤ fee. Lump-sum payments are allocated oldest-visit-first under row locks in a single transaction, and every money change writes a log row in that same transaction.
  • Shipped the clinician app trilingual (Arabic/French/English, full RTL). It includes FDI (World Dental Federation) tooth and anatomical site charting drawn from my own SVGs and validated server-side, a print-layout engine for Arabic PDF prescriptions rendered in the browser, and live queue updates with spoken waiting-room calls over Socket.IO.
  • Handed development over to a new in-house team in May 2026. I now advise weekly and on demand on architecture and code review, and handle maintenance.
  • TypeScript
  • NestJS
  • Fastify
  • PostgreSQL
  • TypeORM
  • Next.js
  • React
  • React Native
  • Expo
  • Kotlin
  • Socket.IO
  • TanStack Query
  • Zustand
  • AWS (SES, ECR, EC2)
  • Backblaze B2
  • Sentry
  • GitHub Actions
  • Python
~/experience/freelance2 highlights

salah@web~/experience$cat freelance.md

Full-Stack Developer (freelance) — Upwork & Khamsat

Freelance client work · reached Upwork Top Rated Plus, 5.0 on every rated contract · · Remote

  • Client products: a B2B supplier and buyer platform (UI and API integration), a translation agency site with Stripe payments, webhooks and Chart.js dashboards, and an ordering and delivery platform with Mapbox/Turf.js service regions and an admin panel.
  • Smaller builds: a chess site with 2D game logic and real-time Socket.IO events, a browser PDF editor (Next.js, pdf-lib) and a whitepaper/FAQ site generated from Markdown.
  • React
  • Next.js
  • Gatsby
  • Node.js
  • Socket.IO
  • Stripe
  • Mapbox
~/projects4 entries

salah@web~$ls -l projects/

Projects

Two decisions from work I would make again, and two open-source projects of my own, self-hosted on a Debian server I provisioned and run. Each one is a constraint, the call I made under it, and what it cost or saved.

SMS without a provider · Daoini

problem
Appointment reminders need SMS, and Algeria has no cost-effective A2P (application-to-person) SMS gateway. The per-message fee would have been the largest recurring cost per clinic.
call
Messages go into a Postgres outbox (pending → sending → sent | failed). A companion app (Expo plus a native Kotlin module) on one phone per clinic polls every ~30 s. It sends through SmsManager from the clinic's own SIM, multipart-aware with per-part radio confirmation, with a randomised 2–5 s gap so batches don't read as spam. Rows are claimed in one UPDATE … FOR UPDATE SKIP LOCKED … RETURNING, so concurrent polls never double-send. A row stuck in sending is reclaimed after a few minutes, accepting a rare duplicate over a missed reminder. 24 h and 2 h reminders come from a five-minute cron made idempotent by a partial unique index, so the cron needs no leader election. Each clinic registers exactly one sender phone behind a SHA-256-hashed key, and registering a new phone revokes the old one. A specialUse foreground service, a boot receiver and a 15-minute WorkManager watchdog keep it running through reboots and OEM battery managers. The Play Store restricts SEND_SMS, so the app ships as a signed APK with in-app self-update.
outcome
Per-message provider fees are gone from the cost model, with no third-party gateway.
SMS without a provider diagram
clinician app ──▶ NestJS API ──▶ sms_outbox (Postgres)
                    │ cron */5: 24 h · 2 h reminders
                    │   (partial unique index = idempotent)
                    ▼
     claim: UPDATE … FOR UPDATE SKIP LOCKED … RETURNING
                    │ x-gateway-key (SHA-256, 1 phone per clinic)
                    ▼
     companion app · Android · clinic's own SIM
     poll ~30 s · SmsManager · foreground svc · watchdog
                    │
                    ▼
              patient's phone
  • NestJS
  • PostgreSQL
  • Expo
  • Kotlin
  • Android SmsManager
  • WorkManager

Payments that can't race · Daoini

problem
Front-desk staff record payments from several screens at once. Read-then-write on a visit's paid amount could lose an update when two saves landed together. A patient paying a lump sum across several unpaid visits needed one consistent allocation, not one per screen.
call
Payments became signed deltas applied in a single UPDATE … WHERE paid + Δ BETWEEN 0 AND fee RETURNING paid. The database refuses an overpayment or over-refund instead of the app checking first. A patient payment locks that patient's unpaid visits (pessimistic_write) and allocates oldest-first inside one transaction, rejecting anything above what is owed. Every fee or payment change writes a log row in the same transaction, grouped per user gesture. Lowering a fee or reversing a payment requires a reason, and a visit with money on it cannot be deleted. Cancelled and no-show fees drop out of the balance, and money already paid on them becomes credit. A five-table invoicing model was built first and parked as more than clinics needed.
outcome
Balances come from one source of truth, and every dinar traces back to a gesture and a reason. Shipped across the API and the clinician app in Aug 2026.
Payments that can't race diagram
payment dialog ──▶ NestJS ──▶ PostgreSQL · one transaction
                     │ lock patient's unpaid visits (FOR UPDATE)
                     │ allocate oldest-first · reject overpay
                     │ UPDATE … WHERE paid+Δ ∈ [0, fee] RETURNING
                     └ session_payment_logs row, same transaction
  • NestJS
  • PostgreSQL
  • TypeORM
  • Next.js
  • TanStack Query

A ledger that cannot lose money · daftar · open-source personal project

problem
A balance check and the debit that follows it race under concurrency. In the naive version, 500 concurrent debits of 1.00 against a balance of 100 applied all 500 and created 489.00 from nothing; without the guard, the same burst overdrew the account by 59.00.
call
A play-money crypto brokerage on a double-entry PostgreSQL ledger whose invariants survive a raw psql session: a deferred constraint trigger makes every transaction's legs sum to zero, entries are append-only, and money is bigint minor units end to end. Three locking strategies were benchmarked under the same load and transaction-scoped advisory locks shipped; serializable had the best p99 only because a quarter of its orders failed. A live order book matches inside the same transaction as the money, and Kafka carries an outbox-fed event log for projections and a withdrawal saga on BullMQ.
outcome
Advisory locks: 1,718 orders/s at p99 125.7 ms with 0% errors. Sharding a hot house account 16 ways restored 7–8.7× scaling.
A ledger that cannot lose money diagram
order ──▶ Fastify ──▶ PostgreSQL · one transaction
                     │ advisory locks, sorted by account
                     │ ledger legs sum to 0 (deferred trigger)
                     │ outbox row, committed with the money
                     ▼
        relay ──▶ Kafka ──▶ positions · activity · reconciler
                    └────▶ BullMQ ──▶ withdrawal saga
  • TypeScript
  • Fastify
  • PostgreSQL
  • Drizzle
  • Kafka
  • BullMQ
  • Valkey
  • React
  • k6

A read path with no database · livemap · open-source personal project

problem
A live-event map gets its readers all at once, and they keep the page open. Reading the map from Postgres on every request topped out at 408 req/s with a 1,272 ms p95 at 500 readers, and 5× the connection pool made the tail worse.
call
A multi-tenant authoring tool for live-event maps. Editors write to Postgres one feature per row, isolated per tenant by forced row-level security the app role cannot switch off. Publishing builds an immutable, content-hashed artifact, writes it first and moves the pointer last under a per-map lock, so a crash or a slower concurrent publish never points readers backwards. Embeds poll a tiny pointer with ETags. Every feature, text included, is drawn in one ordered WebGL pass inside MapLibre.
outcome
Conditional reads: 57,676 req/s at 13 ms p95 with zero database connections, 141× the per-request Postgres path (k6, one machine).
A read path with no database diagram
editor ──▶ Fastify ──▶ Postgres · RLS per tenant     (write)
                  │
                  └──▶ publish: artifact first, pointer last
                                 │
       embed ◀── CDN ◀── content-hashed artifact          (read)
         poll pointer · If-None-Match → 304
  • TypeScript
  • Fastify
  • PostgreSQL
  • MapLibre
  • WebGL
  • React
  • k6
~/education.mdmarkdown

salah@web~$cat education.md

Education

  • Master's degree in Computer Systems — École Nationale Polytechnique d'Oran Maurice Audin (ENPO)
    Oran, Algeria · Sep 2016 - Jul 2021
~/stacktree

salah@web~$stack

Skills

core
TypeScript · JavaScript · Node.js (NodeJS) · PostgreSQL (Postgres)
frontend
Next.js · React · React Native (Expo) · TanStack Query · Zustand · Tailwind CSS · i18n & RTL
backend
NestJS · Fastify · TypeORM · REST APIs · WebSockets (Socket.IO, SignalR) · JWT auth
infra & observability
Linux (Debian, Ubuntu) · Docker · Kubernetes (GKE) · AWS (EC2, ECR, S3, SES) · GitHub Actions · CI/CD · OpenTelemetry · Sentry
testing
Vitest · Jest · Playwright
~/contactmail

salah@web~$mail -s 'hello'

Contact

built with astro · themed from my actual caelestia colour scheme · github