Skip to content
View malikad778's full-sized avatar
💭
Coding Solutions
💭
Coding Solutions

Highlights

  • Pro

Block or report malikad778

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.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. 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
malikad778/readme.md

Adnan Haider

Senior Backend Engineer  ·  Distributed Queues  ·  Multitenant SaaS  ·  AST Static Analysis

Six years of engineering high throughput backend infrastructure, resilient distributed queues, and multitenant architectures. Specialized in the load bearing layers of production software: the webhook that cannot return a 502, the queue that must never drop a paid event, the migration that would take an exclusive table lock at peak traffic, and the static analyzers that keep teams from introducing silent failures.

Founder of The Regret Index (backed by Google Cloud for Startups & MongoDB for Startups). Author of 11 open source packages. 450+ delivered commercial projects.


Portfolio LinkedIn The Regret Index Packagist npm Email



6+ Years Experience 450+ Projects Delivered 11 Packages 5.0 Star Rating


Architecture Case Studies

1. Multitenant Proposal SaaS

Turning a delivered single tenant document engine into a zero leak multitenant platform

Originally shipped as a single tenant proposal studio: GrapesJS visual canvas, a ~900 line server renderer, headless Chrome PDF generation via Spatie Browsershot, and cryptographic HMAC sealing. The challenge was converting it into a true multitenant SaaS without compromising security or breaking backward compatibility.

Tenancy is not a database query filter; it is an impenetrable security boundary. Every B2B data leak postmortem reveals the same root cause: someone treated tenant isolation as an optional query scope instead of an architectural invariant that queries cannot escape.

flowchart TD
    C["Company<br/><i>tenant · billing entity</i>"]
    T["Team<br/><i>grouping inside a company</i>"]
    U["User<br/><i>1 company · 0..n teams</i>"]
    R1["Owner · Admin · Member"]
    R2["team_admin · member"]

    C -->|"SECURITY BOUNDARY<br/>never removed"| T
    T -->|"VISIBILITY FILTER<br/>layered on top"| U
    U -.company role.-> R1
    U -.team role.-> R2

    classDef sec fill:#132E5C,stroke:#1F6FEB,stroke-width:2px,color:#F0F6FC
    classDef vis fill:#2A1B4D,stroke:#8957E5,stroke-width:2px,color:#F0F6FC
    classDef ent fill:#161B22,stroke:#30363D,color:#C9D1D9
    classDef role fill:#0D1117,stroke:#21262D,color:#8B949E
    class C sec
    class T vis
    class U ent
    class R1,R2 role
Loading

Important

CompanyScope applies no filter at all when no tenant resolves in context. That sounds counterintuitive, but it is deliberate so that background workers, migrations, and CLI maintenance commands function seamlessly. It is safe for exactly one architectural reason: users.company_id is defined as NOT NULL. An authenticated user session can never resolve to null and view global records. Make that column nullable, and the boundary collapses into a critical vulnerability.

Five Invariants Defended with Automated Tests

Invariant System Failure Prevented
Scope narrows, never swaps Team visibility is built strictly by layering on top of company scope, never by replacing it. Prevents cross tenant leaks.
Fails open, deliberately Console commands and system queues continue running safely while users.company_id remains NOT NULL.
Roles are per company Spatie's team_foreign_key explicitly targets company_id. Pointing it at teams.id causes permissions to bleed across tenants.
Authorisation self scopes User::can() automatically binds to the user's active tenant, preventing silent false denials inside queues.
Two distinct locale axes users.locale controls the sender's dashboard chrome; proposals.locale governs the legal rendered document (25 locales supported).

Concurrency Hardening & Cryptographic Sealing

Proposals become quasi legal contracts the second a client signs. To guarantee immutability:

  • HMAC-SHA256 Document Sealing: Upon acceptance, the rendered HTML, CSS AST, signature bitmap, and client IP/user agent are serialized and cryptographically hashed with APP_KEY. Any manual database alteration invalidates the seal.
  • Queued PDF Pre Warming: Headless Chrome rendering is isolated to asynchronous background queues (SendProposalEmailJob), pre warming the document cache upon status change so public downloads execute in milliseconds without spinning up headless Chrome on the web request thread.
157 tests, 413 assertions PHPStan Max composer audit clean Laravel 12 Browsershot 5 25 locales

Solo Founder & Platform Architect · Backed by Google Cloud for Startups & MongoDB for Startups

A high scale decision journaling platform that quantifies decision quality, revisits outcomes on an automated schedule, and helps individuals calibrate intuition.

flowchart LR
    subgraph INGESTION["Multi Subreddit Ingestion"]
        CRON["GCP Cloud Scheduler"] --> RUN["GCP Cloud Run Worker"]
        RUN --> REDDIT["75+ Decision Subreddits<br/><i>9 Categories</i>"]
        REDDIT --> CHUNK["Semantic Chunker & Sanitizer"]
    end

    subgraph AI_PIPELINE["Dual Auditor AI Pipeline"]
        CHUNK --> V3["Vertex AI Gemini 3<br/><i>gemini-3.8-flash</i>"]
        V3 --> FACT["Fact-Checking & Claim Verification"]
        FACT --> IMAGEN["Vertex AI Imagen 3"]
    end

    subgraph STORAGE["Edge & Data Layer"]
        IMAGEN --> R2["Cloudflare R2 Storage"]
        FACT --> ATLAS["MongoDB Atlas<br/><i>22 Collections</i>"]
        USER["Web Client / Next.js 15"] --> UPSTASH["Upstash Redis<br/><i>Sliding Window</i>"]
        UPSTASH --> ATLAS
    end

    classDef c1 fill:#132E5C,stroke:#1F6FEB,stroke-width:1px,color:#F0F6FC
    classDef c2 fill:#2A1B4D,stroke:#8957E5,stroke-width:1px,color:#F0F6FC
    classDef c3 fill:#161B22,stroke:#30363D,color:#C9D1D9
    class INGESTION c1
    class AI_PIPELINE c2
    class STORAGE c3
Loading

Architectural Highlights

  • Vertex AI Gemini 3 Migration: Migrated the core reasoning pipeline from retiring Gemini 2.5 to GA Gemini 3 (gemini-3.8-flash for high throughput draft synthesis and gemini-3.1-flash-image for multimodal context extraction).
  • Automated Social Signal Ingestion: Orchestrates GCP Cloud Scheduler and Cloud Run endpoints to systematically ingest and index decision outcomes across 75+ specialized subreddits in 9 categories, bypassing Cloudflare bot challenges through direct service networking.
  • Async Background Polling: Implemented an asynchronous polling engine with sentence completion safeguards to prevent Cloudflare 524 gateway timeouts on deep analytical drafts up to 8,192 tokens.
  • Edge Storage & Caching: Automated image synthesis via Vertex AI Imagen 3 with fallback SVG pipelines, stored in Cloudflare R2 and served through an Upstash Redis sliding window rate limiter.
Next.js 15 TypeScript MongoDB Atlas Vertex AI Upstash Redis Cloudflare R2 Stripe

3. Meta Lead Ads to WhatsApp Cloud Engine

Zero drop webhook ingestion with cryptographic verification & cronless queue draining

Meta does not wait for slow downstream queue workers. If an ingestion endpoint takes longer than a few hundred milliseconds, Meta marks the webhook unhealthy and throttles live advertising campaigns. Real work must never execute on the request thread.

sequenceDiagram
    autonumber
    participant M as Meta Lead Ads
    participant W as Webhook Endpoint
    participant D as MySQL / InnoDB
    participant Q as Redis Queue Worker
    participant A as WhatsApp Cloud API

    M->>W: POST lead payload
    W->>W: verify X-Hub-Signature-256 via hash_equals()
    W->>D: INSERT (unique meta_leadgen_id)
    Note over D: Replays collide here at schema level,<br/>not in mutable application code
    W-->>M: 200 OK (< 50ms)
    W->>Q: Dispatch FetchLeadDataJob + SendWhatsAppJob
    Q->>A: Send templated WhatsApp message
    A--xQ: 5xx Transient Error / Rate Limit
    Q->>Q: Time bounded exponential backoff
    Q->>A: Retry dispatch
    A-->>Q: 200 Delivered & Logged
Loading

Key Engineering Decisions

  • Two Independent Integrity Gates: The HMAC SHA-256 signature verification validates payload authenticity. A unique database index on meta_leadgen_id guarantees that webhook replays are rejected by the MySQL storage engine, where race conditions cannot bypass application logic.
  • Cronless Queue Draining (DrainQueueAfterResponse): For environments where system level cron daemons or supervisor instances are restricted, an HTTP terminable middleware triggers background job processing immediately after the fast response is flushed to Meta.
  • Automatic Graph API Pagination: Built into PageManager to transparently fetch high volume ad lead forms with System User token renewal safeguards.
  • Filament 3 Operational Hub: Admin configurable campaign-to-recipient mappings, round robin lead allocation, and real time session health widgets.
Meta Graph WhatsApp Cloud API Laravel 11 Filament 3 Redis

Open Source Packages & Developer Tooling

Active packages built to solve structural problems in production and published to Packagist, npm, and GitHub.

npm version Packagist version CI status SARIF

Cross-boundary static security analyzer and Row Level Security (RLS) auditor for Next.js, TanStack Start, Lovable (Vite), and Supabase apps. Correlates TypeScript AST with SQL migrations to catch critical vulnerabilities before deploy.

  • 18 high-precision rules (SG001–SG018) detecting cookie spoofing, service_role leaks, SECURITY DEFINER RPCs, unindexed FKs, and RLS gaps
  • Automated --fix engine generating TypeScript refactors and safe SQL migrations
  • Ships with Model Context Protocol (MCP) server, SARIF 2.1.0 reporter, and GitHub Action

TypeScript AST  Supabase / Postgres  RLS Auditor  MCP Server

CI status license rules

Zero-bootstrap static AST security analyzer and reliability linter for Laravel queues, Horizon, and background jobs. Prevents database connection exhaustion, money-losing non-idempotent retries, and race conditions before deploy.

  • 9 specialized detectors (QG001–QG009) catching HTTP calls in DB transactions, financial retries, missing SerializesModels, and Horizon timeout drift
  • Automated --fix safe code transforms and @queue-safe granular docblock exemptions
  • Standalone CLI, PHPStan 2.x extension, SARIF 2.1.0, and GitHub Action annotations

AST static analysis  Laravel Horizon  Distributed Queues  PHPStan 2.x

CI status license

Zero overhead static analysis and AST security scanner for multitenant Laravel SaaS applications. Prevents cross tenant data leaks across database queries, unique validation rules, cache collisions, Filament resources, queued jobs, and route bindings.

  • 6 core security rules detecting raw DB queries, cache collisions, unisolated jobs, and unscoped routes
  • Emits GitHub Action PR annotations, SARIF v2.1.0, and JSON reports
  • Includes standalone zero bootstrap CLI and PHPStan 2.x extension

AST static analysis  Multitenant SaaS  PHPStan 2.x

Packagist downloads stars

Catches dangerous, table locking, or destructive database migrations in CI before they reach production. The strong_migrations equivalent for Laravel. Uses nikic/php-parser for AST analysis. Zero configuration required.

  • Detects AddColumnNotNull, unindexed foreign keys, column type changes, and table drops
  • Emits GitHub Action PR annotations, JSON, and CLI reports
  • Runtime safety listener intercepts accidental execution

AST static analysis  CI safety gate  nikic/php-parser

Packagist downloads stars

Passive API contract monitoring for strictly typed PHP 8.3+. Silently samples live HTTP payloads via Guzzle middleware, infers deep JSON Schema structures probabilistically, locks a hardened baseline, and alerts when upstream providers introduce breaking schema drift.

  • Detects removed fields, type mutations, nullable drift, and enum additions
  • Alerts via PSR-3 loggers and PSR-14 events before production code crashes
  • Native integrations for Laravel, Symfony, and pure PHP CLI

PHP 8.3+  Schema drift detection  Probabilistic inference

Packagist downloads stars

Unified, driver based Laravel package for multi channel inventory and catalog synchronization across Shopify, WooCommerce, Amazon SP-API, and Etsy.

  • Drop in Composer package with zero third party SaaS dependency
  • Custom AwsV4Signer implementation for Amazon SP-API compliance
  • Token bucket rate limiting preventing channel API quota exhaustion
  • Livewire monitoring dashboard with dead letter queue recovery

Laravel 10 to 12  Amazon SP-API  Token bucket  Webhooks

stars last commit

Enterprise notification microservice and domain package built for Laravel 12 & PHP 8.4. Provides unified dispatching across 7 channels (Email, SMS, Push, Slack, WhatsApp, Reverb WebSockets, Database).

  • Dual architecture: Standalone microservice or embeddable domain package
  • Intelligent fallback routing: Tripping circuit breakers reroute messages to backup channels
  • Custom Laravel Pulse telemetry cards monitoring delivery throughput

Laravel 12  PHP 8.4  Circuit breaker  Laravel Pulse

Packagist downloads stars

Static analysis for WordPress hooks. Detects orphaned listeners, unheard hooks, and typo ridden actions/filters by analyzing source code AST directly without booting WordPress.

  • Runs fast enough to execute on every pre commit hook
  • Detects dynamic hook patterns and generates comprehensive hook maps
  • Ships with native WP-CLI package support (wp hook-check audit)

WordPress  Static analysis  WP-CLI  Zero bootstrap

license last commit

Decoupled, high performance authentication and registration engine for WooCommerce and WordPress multisite.

  • 3 Phase Transient Pipeline: Gating registration before database insertion so spam bots never populate wp_users
  • Multi identifier login (Email, Username, or Verified Phone)
  • Defends against SMS pumping & Artificially Inflated Traffic (AIT) fraud
  • WooCommerce checkout field locking prevents post auth identity tampering

WooCommerce  Fraud defense  Transient pipeline  Multisite

license last commit

Static accessibility analyzer for Laravel Blade & Livewire views enforcing 73 WCAG 2.1 AA rules aligned with the European Accessibility Act (EAA).

  • Parses Blade template directives without executing the rendering engine
  • Ships with a baseline configuration system to prevent CI failure on legacy views
  • Zero runtime dependencies

WCAG 2.1 AA  EAA compliance  Blade linter  Baseline system

license last commit

Comprehensive concurrency and throughput benchmark comparing modern PHP runtimes (RoadRunner, Swoole, PHP-FPM 8.3) against idiomatic Go under high concurrency.

  • Measures p50, p95, p99 latency distributions, memory ceilings, and context switching
  • Tests realistic real world workloads: JSON serialization, DB connection pooling, and hashing

High concurrency  Performance  RoadRunner  Go


AI Agents & Model Context Protocol (MCP)

Building production systems that connect LLMs, autonomous agents, and real world tools via the Model Context Protocol (MCP).

flowchart LR
    AGENT["AI Agent / Claude / Assistant"] -->|"Model Context Protocol<br/>JSON-RPC / SSE"| MCP_HUB{"MCP Server Layer"}
    
    MCP_HUB --> UPWORK["Upwork MCP Agent<br/><i>Job matching, scoring & WhatsApp alerts</i>"]
    MCP_HUB --> LINKEDIN["LinkedIn MCP Server<br/><i>Profile, company & job queries</i>"]
    MCP_HUB --> WP["WordPress AI MCP<br/><i>Semantic chunking & llms.txt</i>"]
    
    UPWORK --> WA["Meta WhatsApp Cloud API"]
    UPWORK --> AI["Vercel AI SDK<br/><i>Proposal synthesis</i>"]
Loading

Systems in Production

  • Job Alert Upwork MCP: Full stack monorepo (@job-radar/web + @job-radar/jobs) connecting directly to Upwork's official MCP server via @modelcontextprotocol/sdk and OAuth 2.1 Dynamic Client Registration. Evaluates jobs against strict criteria with a 0 to 100 matching engine, triggers automated proposal generation via the Vercel AI SDK, and delivers alerts to WhatsApp in real time. 100% TOS compliant zero scraping architecture.
  • LinkedIn MCP Server: Open source MCP server giving AI agents direct tool calling access to professional profiles, companies, jobs, and communication channels. Dockerized with uv, Python, and AWS Bedrock support.
  • WordPress AI MCP: Exposes any WordPress site to AI search agents over REST with semantic content chunking, FAQ extraction, media indexing, llms.txt, and full MCP manifests.
  • Self Hosted vLLM GPU Cloud Infrastructure: Automated AWS EC2 lifecycle tooling managing GPU instances running vLLM inference server for open weights models (e.g., Qwen-Coder 30B), optimizing compute costs with automated elastic IP attachment and instance hibernation.

Stealth Automation, Daemons & Extensions

Long running browser automation and system level telemetry engineered for stability, evasion, and zero leak operations.

  • Resilient Session Keepalive Daemon: Stealth browser automation daemon operating under Linux systemd and Xvfb on AWS EC2. Built with Python, Playwright, and asyncio. Features state machine CAPTCHA resolution, Fernet encrypted session cookie storage, humanized jittered mouse/scroll behavioral simulations, and memory managed Chromium lifecycle recycling.
  • Consular Service Appointment Monitor: Manifest V3 Chrome extension providing real time visa wait time calculation and tracking directly on diplomatic consular candidate portals with local only DOM parsing and zero external data transmission.
  • Network Telemetry & Fiber Health Monitor: Multi threaded PowerShell system tray widget running in background STA runspaces with C# P/Invoke. Polls LAN HTTP router diagnostic endpoints to track live optical fiber health (Rx/Tx dBm, optical temperature, line latency) with zero WAN bandwidth impact.

Cross Platform & Commercial Systems

  • Chapter Link Log: Cross platform web and native iOS application built with TanStack Start (SSR), TanStack Router, TanStack Query, Tailwind CSS v4, Capacitor iOS, and Supabase.
  • Pure Korea: Korean skincare e-commerce platform built with Next.js, Firebase Firestore live sitemaps, JSON-LD rich schema markup, and Cloudflare Web Analytics.
  • European SME Enterprise Web Architecture: Delivered production platforms and bespoke digital systems for precision craftsmanship, gastronomy, and retail businesses across European commercial markets.
  • Client Track Record: 450+ completed projects across international clients on Upwork, top freelance platforms, and direct enterprise contracts with a verified 5.0★ rating.

Stack

COREPHPLaravelFilamentLivewireTypeScriptPython
DATAMySQLPostgreSQLMongoDB AtlasRedis and HorizonUpstash
INFRADockerCloud RunCloudflare R2AWSGitHub Actions
FRONTNext.jsReactTanStackTailwindAlpine.jsGrapesJS
AI & MCPMCPVertex AIOpenAIvLLMVercel AI
TESTPHPUnitnikic/php-parserPHPStanPestPlaywright

Engineering Philosophy

A test that never disagrees with you is decoration. Write the test that fails when the invariant breaks, not the one that passes today. In a multitenant system, the tests worth having are the ones that go red the second someone collapses two tenant axes into one.

Fail loudly at the boundary, gracefully in the middle. Reject a malformed payload at ingestion where validation is cheap and full request context exists. The alternative is a half written row three services deep that a customer finds for you next week.

Write down the deviation and the reason. Specifications and plans are always incomplete in places. Six months later, the useful artefact is not the original plan; it is knowing why the implementation diverged and what constraints governed the choice.

Comments explain why. Code explains what. If a block needs a comment to explain what it does, rewrite the block. Reserve comments for non obvious constraints you cannot deduce from syntax, such as an upstream provider bug that presents as an auth timeout.


Open to backend and platform roles

Laravel · PHP · Distributed Queues · Multitenant SaaS · AI & MCP Infrastructure

Based in Pakistan  ·  Working remotely with teams worldwide

adnanhaider0347@gmail.com  ·  codebyadnan.tech  ·  LinkedIn  ·  The Regret Index

Pinned Loading

  1. notification-center notification-center Public

    Enterprise-grade multi-channel notification engine for Laravel 12 with parallel dispatching, smart routing, and real-time monitoring

    PHP 8 1

  2. Laravel-migration-guard Laravel-migration-guard Public

    Catch dangerous Laravel migrations before they reach production. Static analysis, zero config. The strong_migrations equivalent for Laravel.

    PHP 18

  3. php-sentinel php-sentinel Public

    Passive API Contract Monitoring for PHP 8.3+. Detects breaking changes, json schema drift, and unexpected structural modifications in third-party REST APIs via probabilistic inference.

    PHP 18

  4. nexus-inventory nexus-inventory Public

    The ultimate Laravel package for multi-channel inventory synchronization. Connect Shopify, WooCommerce, Amazon, and Etsy to Laravel with real-time webhooks, job queues, and a unified API.

    PHP 30 6

  5. wp-hook-check wp-hook-check Public

    Static analysis for WordPress hooks. Detect orphaned listeners, unheard hooks, and typos in actions and filters without running WordPress. Faster, safer WP development.

    PHP 10

  6. blade-access blade-access Public

    Static accessibility analyzer for Laravel Blade & Livewire - 73 WCAG 2.1 AA rules, CI integration, baseline system, zero runtime dependency.

    PHP