BUILDING A DISTRIBUTED AI PLATFORM ON A UNIFIED FINANCIAL BACKBONE
Orchestrating a complex distributed system: From centralized financial governance to decentralized AI processing nodes.
The problem worth engineering
This project demonstrates a masterclass in distributed system design, connecting two independent powerhouses: 'DesignRev.io' (The Product) and the 'Unified Payment Gateway' (The Infrastructure). DesignRev is an AI-powered platform that critiques UI/UX designs using a multi-stage analysis pipeline (Gemini, Anthropic, OpenAI).
The architectural challenge was to decouple the heavy AI processing from the user-facing application while maintaining a seamless financial state across different technologies. I engineered a solution where the Payment Gateway acts as the 'Financial Source of Truth' (MySQL/Prisma), creating and managing Service Plans, while DesignRev (Supabase/Postgres) consumes these plans via API to create local credit-based entities.
The AI workload is offloaded to a dedicated VPS Worker system managed by Upstash Redis for job queueing, ensuring the Next.js frontend remains responsive during long-running (10+ minute) analysis tasks. The system features real-time status updates via Webhooks, allowing the decoupled worker to communicate progress back to the user interface instantly.
- Architected a 'Distributed Microservices' pattern: The system is split into three distinct autonomous zones: The Payment Gateway (Node.js/Prisma), The DesignRev App (Next.js/Supabase), and The AI Worker Node (Python/Docker on VPS). This separation ensures that heavy AI computations never block the financial or user interface threads.
- Engineered a 'Cross-Platform Plan Synchronization' engine: DesignRev dynamically fetches 'ServicePlans' from the centralized Payment Gateway API. It maps these external financial plans to internal 'Credit Entities' in Supabase, allowing for a flexible credit-based consumption model that is legally decoupled from the payment processor.
- Implemented a 'Long-Running Job Orchestration' system using Upstash Redis: To handle the 8-stage AI analysis (taking up to 10 minutes), I built a robust queueing system. Users submit designs, and a detached worker picks up the job, executing chains of prompts across multiple LLMs (Gemini, Claude, GPT-4) without timing out the serverless frontend.
How it was built, system by system

Interface documentation
Click any screen to inspect it full size.
Related Projects
Explore more of my work

Goods&U | Full-Stack Bilingual (Arabic-RTL) E-Commerce Platform

Polary | Cinematic 3D Narrative Landing Experience

Diagnostics Elite | Cinematic Bilingual MedTech Platform (WebGL + Sanity)

Fix Vision | Interactive High-Performance Creative Agency Platform

IQ Academy | Full-Stack Arabic EdTech Learning Platform

TMT Eye | Enterprise Intelligent Transport Operating System

Goods&U | Full-Stack Bilingual (Arabic-RTL) E-Commerce Platform

Polary | Cinematic 3D Narrative Landing Experience

Diagnostics Elite | Cinematic Bilingual MedTech Platform (WebGL + Sanity)

Fix Vision | Interactive High-Performance Creative Agency Platform

IQ Academy | Full-Stack Arabic EdTech Learning Platform

