Skip to content
View MahmoudBakr23's full-sized avatar
🌍
Available for hire
🌍
Available for hire
  • Microverse
  • Egypt
  • 04:04 (UTC +02: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:

  • 💳 Payment gateway integrations — Checkout.com, HyperPay, Deema, PayPal, Tap, Tamara, Apple Pay/IAP — reduced billing failures by 80%
  • 📦 Subscription, wallet & referral engines — 25% upsell boost, 50% improvement in subscriber retention
  • 🏗️ Multi-tenant B2B SaaS with org-scoped access control & automated AWS Amplify provisioning
  • ⚡ Real-time systems — Action Cable, Redis pub/sub fan-out, WebRTC signaling

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