Skip to content
View MahmoudBakr23's full-sized avatar
🌍
Available for hire
🌍
Available for hire
  • Microverse
  • Egypt
  • 21:04 (UTC +03:00)
  • LinkedIn in/m-bakr

Block or report MahmoudBakr23

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
MahmoudBakr23/README.md


Senior backend engineer with 5+ years building production-grade Ruby on Rails APIs. Currently at Tadarab owning payment architecture, subscription systems, and B2B SaaS infrastructure for a growing EdTech platform in Kuwait.

What I specialize in:

  • 🤖 AI-native engineering — agentic coding workflows, LLM tool/MCP orchestration, and multi-agent system design integrated into daily practice to accelerate delivery and reduce cognitive overhead
  • 🏗️ Designing backend systems for scale and long-term maintainability — explicit service layers, state machines, partitioned schemas — built to stay comprehensible as teams and traffic scale
  • ⚡ API performance engineering — query optimization, caching, async job architecture — with systems designed to scale and correctness guarantees that hold under load (~95% reduction in failed transactions)
  • 🧠 Architectural decision-making grounded in actual NFRs — strong consistency where money is involved, eventual consistency where fan-out allows it, trade-offs made explicit, not discovered in production
  • 💳 Financial infrastructure correctness — multi-gateway integrations, double-entry ledgers, idempotency guarantees, HMAC-signed webhook delivery — shipped across 7 payment providers in production
  • 📦 Subscription and growth systems — referral programs, upsell flows — ~55% upsell boost and ~40% improvement in subscriber retention in production
  • 🔧 Automation over manual toil — converting high-frequency repetitive processes into parameterized async services and background pipelines, cutting resolution time by up to 90% and freeing teams to focus on what can't be automated
  • 🧪 Quality before shipping — comprehensive unit and integration suites, cross-environment validation (staging → production), and agentic testing with tools like Playwright MCP to catch regressions before they reach users

Former Senior Technical Mentor at Microverse — reviewed code and mentored 100+ developers worldwide across Ruby on Rails and JavaScript.


Featured Project — Paygate

A production-grade payment gateway — built as a complete, multi-repo system

Paygate is a full-stack payment infrastructure portfolio: a REST API, merchant dashboard, developer documentation site, and a drop-in JavaScript SDK (@paygater/js) published on npm. Engineered with financial-grade patterns: double-entry ledger, idempotency, HMAC-signed webhook delivery, and a charge state machine.

paygate-api paygate-dashboard paygate-docs paygate-js
Role Core API & billing engine Merchant UI Developer docs Client-side JS SDK
Stack Rails 8.1 · PostgreSQL · Sidekiq Next.js 15 · TypeScript · shadcn/ui Next.js 15 · Fumadocs · MDX TypeScript · Stripe.js
Deployed Fly.io Vercel Vercel npm · jsDelivr CDN
Live OpenAPI Spec ↗ Dashboard ↗ Docs ↗ npm ↗

Architecture

POST /v1/charges
       │
       ▼
AuthenticateRequest       ← API key (sk_test_xxx) or JWT session
       │
       ▼
IdempotencyService        ← Redis 24h lock per Idempotency-Key header
       │
       ▼
PaymentRouterService      ← Strategy pattern: routes by payment_method + environment
       │
       ├── StripeAdapter       → Visa / Mastercard / Apple Pay
       └── CheckoutAdapter     → Mada
       │
       ▼
ChargeService             ← State machine · double-entry ledger · audit log
       │
       ▼
WebhookDispatcherService  → Sidekiq → HMAC-SHA256 signed · exponential retry (5 attempts)

Charge lifecycle: PENDING → AUTHORIZED → CAPTURED → REFUNDED / FAILED / VOIDED

Key design rules:

  • Business logic lives in app/services/ — controllers call one service and render
  • Financial data is never cached — always read live from the database
  • Every financial state change writes a double-entry LedgerEntry
  • Every merchant action writes an immutable AuditLog
  • No PAN, CVV, or raw card data ever touches the server — client-side tokenization only

API Stack

Layer Technology
Framework Rails 8.1 (API mode)
Database PostgreSQL — charges table range-partitioned by created_at
Cache / Queues Redis + Sidekiq 8.1
Auth bcrypt API keys + JWT sessions + Rack::Attack rate limiting
Payment adapters Stripe 13 (Visa/MC/Apple Pay) · Checkout.com REST (Mada)
Serialization Blueprinter
Logging Lograge — structured JSON, no PAN
API spec rswag — OpenAPI 3.0.1, 260 request examples
Deployment Fly.io (web + worker machines)

Tech Stack

Backend

Ruby Rails PostgreSQL Redis Sidekiq GoodJob Action Cable Pundit Blueprinter Lograge

Auth & Security

Devise JWT OAuth 2.0 SAML 2.0 bcrypt Rack::Attack HMAC

Payment & Integrations

Stripe Checkout.com HyperPay PayPal Tap Tamara Apple Pay Deema

Cloud & DevOps

AWS ECS S3 RDS SQS Docker GitHub Actions Kamal Fly.io Vercel

Monitoring & Observability

New Relic Sentry Brakeman

Testing & Quality

RSpec FactoryBot Capybara RuboCop OpenAPI

Frontend (supporting)

React Next.js TypeScript TailwindCSS shadcn/ui WebRTC


Writing

Technical deep-dives on backend engineering, distributed systems, and production architecture.

Article Topic
Idempotency in Distributed Systems: 5 Patterns Every Backend Engineer Should Know Distributed systems · Payments
Webhooks: How External Systems Talk Back to Yours — Securely Webhooks · HMAC · Event-driven
The Complete Software Architecture Walkthrough System design · Rails architecture
When the Cloud Burns: Why RTO and RPO Aren't Just Buzzwords Disaster recovery · Infrastructure
Boosting API Performance with Caching in Rails Rails · Performance · Caching

GitHub Stats


Building things that process real money, serve real users, and stay up.

Pinned Loading

  1. Chatterly Chatterly Public

    Real-time chat & voice/video calling app — built for scale with Rails 8, PostgreSQL, Redis, WebRTC, and Next.js.

    Ruby

  2. chatterly-client chatterly-client Public

    Chatterly client-side web application built with NextJs and Typescript

    TypeScript

  3. paygate-api paygate-api Public

    Payment gateway API — Rails 8 · Visa/MC · Mada · Apple Pay

    Ruby

  4. paygate-dashboard paygate-dashboard Public

    Payment gateway merchant dashboard — Next.js 15

    TypeScript

  5. paygate-docs paygate-docs Public

    Payment gateway API documentation — Fumadocs

    MDX

  6. paygate-js paygate-js Public

    Client-side JavaScript SDK for embedding Paygate payment forms — Visa, Mastercard, Apple Pay, and Mada from a single mount() call

    TypeScript