I build production multi-tenant SaaS platforms end to end β from an empty repo to live product.
I'm a backend engineer with 3 years of experience designing and shipping production multi-tenant SaaS platforms end to end. I work primarily in Node.js, NestJS and TypeScript, across both SQL (PostgreSQL, MySQL) and NoSQL (MongoDB), and I've delivered systems for e-commerce marketplaces, EdTech / school management, dental clinics, booking, and point-of-sale.
I'm drawn to the parts most people avoid: multi-tenancy & RBAC, payment and WhatsApp/SMS integrations, real-time systems (WebSockets / SSE), message queues, caching strategies, and secure, well-documented REST & GraphQL APIs built for high traffic.
π¦· I'm a licensed dentist (B.D.S.) who taught myself to code and pivoted into software engineering β so when I build a dental-clinic SaaS, I understand the domain from the inside.
- ποΈ Shipped 6+ production SaaS backends end to end β architecture, data modeling, APIs, queues, deployment and CI
- π§± Flagship is a 45,000-line multi-tenant dental SaaS: 200+ endpoints, 48 entities, 1,340+ tests across 74 Jest suites
- π Integrated payments (Kashier), SMS, Google OAuth, and the Meta WhatsApp Cloud API into live products
- βοΈ Comfortable across real-time (WebSockets/SSE), BullMQ queues, Redis caching, multi-tenant RBAC and Swagger-documented APIs
- β‘ Performance work: cut a dropshipping platform's login from ~6s β <1s and improved API response times ~40%
- π§© 9 merged contributions to TypeORM and Mongoose β fixes for relation data loss, connection and cursor cleanup, composite keys, tree relations, query locks, and reliable batch-save retries (details below)
9 merged contributions: 6 to TypeORM and 3 to Mongoose.
TypeORM
- Preserve unloaded relations: Fixed a data-loss regression where batch
save()silently deleted many-to-many junction rows for entities whose relations were not loaded. Added a regression test; merged for the 2.0 milestone β PR #12711 Β· Issue #12710 - Prevent initialization connection leaks: Guarded overlapping
DataSource.initialize()calls and cleaned up database/cache connections when initialization fails β PR #12704 - Fix CockroachDB shutdown hangs: Released every tracked query runner before closing the connection pool, avoiding skipped connections when releasing runners mutates the tracking array β PR #12891
- Keep composite-key entities distinct: Fixed grouping-key collisions that could drop entities or mix their related records while converting query results into entities β PR #12905
- Fix closure-table branch moves: Read primary values through column metadata so moving a tree branch correctly removes old ancestor links when property and database column names differ β PR #12907
- Release SQL Server locks after subscriber errors: Ensured failed query hooks release the runner's lock so subsequent queries do not wait indefinitely β PR #12939
Mongoose
- Preserve failed bulk-save state: Fixed
bulkSave()marking unattempted inserts and updates as saved after an ordered batch error. Preserved pending document state for retries while retaining unordered-write behavior β PR #16533 - Await query-cursor cleanup: Made stream destruction wait for the database driver's cursor cleanup and route cleanup failures through the existing stream error handler β PR #16562
- Reject failed cursor initialization: Made
getDriverCursor()reject with the stored initialization error instead of waiting indefinitely when called after initialization has already failed β PR #16563
- Intelladent β Founder & Engineer. Multi-tenant, multi-clinic dental SaaS (NestJS Β· Next.js Β· TypeORM Β· PostgreSQL Β· Redis Β· Bull). 200+ REST endpoints, 7-role RBAC, subscription billing, a 5-channel notification engine (WebSocket / Web Push / email / SMS / WhatsApp), AI-assisted clinical features, and 1,340+ automated tests.
- MasrMart β A multi-vendor e-commerce marketplace SaaS for Egyptian sellers (NestJS 11 Β· Prisma Β· PostgreSQL 16 Β· Next.js 15): 215+ endpoints, vendor subscriptions & payout ledgers, localized payments (Cash on Delivery, InstaPay, Vodafone Cash), SSE + Redis real-time, and BullMQ transactional-email flows.
- Simbel AI β Marketing-AI SaaS backend: rebuilt a production Python/CrewAI platform from scratch in NestJS 11 Β· TypeORM Β· PostgreSQL (pgvector) β 189 endpoints, 46 entities, an LLM router with tiered fallback chains and per-agent cost accounting, RAG over pgvector embeddings, Stripe billing with usage metering, and a web/worker Docker split for independent scaling.
- Pupilera β Multi-tenant K-12 school-management platform (NestJS 11 Β· TypeORM Β· PostgreSQL Β· Redis Β· Bull): 404 endpoints, 78 entities, per-school subdomain tenancy, 14-role RBAC with per-school custom roles, a gradebook with at-risk detection, finance with a double-entry ledger, real-time chat, and 1,229 unit tests plus e2e against real Postgres/Redis in CI.
- The Cooking School β E-commerce + culinary-education backend (NestJS 11 Β· MariaDB Β· Redis): 94+ endpoints, Kashier payments, SMS OTP, course-booking with tiered refund policies, and Arabic-aware invoice PDFs.
- POS Platform (Taqdum) β Multi-tenant point-of-sale backend (TypeScript Β· Express.js Β· PostgreSQL/Sequelize): 3-tier RBAC (Organization β Market β Users), real-time inventory, automated VAT, invoice refund/rebuy, supplier management, thermal-receipt printing (80mm/A4), and Excel-based cross-market migration; deployed on Dokploy with JWT, Helmet, and rate limiting.
- EndahQR β A WhatsApp-driven QR-sticker system for vehicles β scan a windshield code to message the owner (NestJS 10 Β· PostgreSQL/Prisma Β· Redis Β· BullMQ). Integrates the Meta WhatsApp Cloud API with HMAC-verified webhooks, Redis-backed idempotency, a conversation state machine, 24-hour messaging-window handling with approved-template fallback, durable inbound-event queueing, and plain-language send-failure surfacing with dead-letter management.
- Auto Drop β Dropshipping backend integrating 4+ marketplaces (Salla, Zid, AliExpress) with real-time order sync via WebSockets and webhooks; optimized MongoDB to cut login from ~6s to under 1s.
- Nugttah β Backend RESTful APIs for a Saudi platform serving thousands of users (Node.js Β· MongoDB/Mongoose): designed well-structured schemas and refactored legacy APIs to modern async/await, improving maintainability and performance.
Languages & Frameworks
Databases & ORM
Infrastructure & Tools
Testing
- πΌ LinkedIn: ibrahim-hafez
- π« Email: [email protected]
- π± Phone / WhatsApp: +20 101 109 4565
- π Based in Egypt Β· open to backend / Node.js opportunities
Backend Β· Multi-tenant SaaS Β· System Design Β· Payments Β· Real-time Β· API Integration



