Orchestrating complex fulfillment flows: From manual execution to automated API pipelines.
See this project in action. Explore the full functionality and design in a live environment.


Dr. Games tackles the unique complexity of the digital gaming market where 'products' aren't just static items. They are dynamic services requiring specific user inputs (Player IDs, Region locks, Account Credentials) before purchase. The core challenge was building a backend that treats 'Manual Fulfillment' and 'API Automation' as interchangeable strategies. The system allows admins to configure a game as 'Provider-based' (injecting API keys for services like Twelve.sa) or 'Manual' (routing to an admin queue). Crucially, it enforces a strict 'Pre-purchase Resolution' flow: users cannot proceed to checkout until they resolve all required credentials specific to their chosen items, ensuring 100% valid orders and reducing operational friction. Built with Next.js SSR featuring advanced caching strategies using revalidate tags and path-based revalidation for optimal performance. Implemented multi-language support with high-performance server-side filtering and pagination, ensuring fast page loads across all locales. Integrated Google OAuth 2.0 with refresh token rotation using Passport.js for secure, persistent authentication. The platform supports multi-currency transactions with real-time exchange rate conversion and localized pricing.
Architected a 'Hybrid Fulfillment Strategy' pattern: The system dynamically routes orders. If a game is linked to a Provider, it executes via external API using encrypted keys. If Manual, it triggers a secure admin workflow.

Engineered a 'Dynamic Requirement Engine': Admins define input schemas per game (e.g., 'Player ID' for PUBG, 'Email/Pass' for Steam). The frontend dynamically renders these forms and validates user input before adding to cart.

Implemented 'Secure Credential Resolution': Sensitive user data (like account passwords for leveling services) is encrypted at rest and only exposed to authorized personnel or specific API endpoints during the fulfillment window.

Built a polymorphic database schema using Prisma to handle diverse product types (Direct ID Top-up, Gift Cards, Account Services) and Bundles within a single, unified order processing pipeline.

Integrated local payment gateways (OPay/Paymob) with a transactional 'Wallet System' that supports atomic operations (Credit/Debit/Refund) to prevent race conditions during high-traffic drops.

Developed a Real-time Notification System (WebSockets) that updates users on their order status (Processing -> Completed) the moment the external Provider API returns a success callback.

Implemented Next.js SSR caching with revalidate tags and path-based revalidation for optimal performance. Product listings, user sessions, and order data are cached intelligently with granular cache invalidation strategies, reducing server load by 60% and improving page load times.

Built a high-performance multi-language system with server-side filtering and pagination. Implemented locale-aware data fetching, optimized database queries with indexed filters, and paginated results using cursor-based pagination for infinite scroll support across all supported languages.

Integrated Google OAuth 2.0 authentication with Passport.js, implementing refresh token rotation for enhanced security. Tokens are stored securely with automatic refresh before expiration, ensuring seamless user sessions without frequent re-authentication.

Engineered multi-currency support with real-time exchange rate conversion. The system fetches live rates from currency APIs, caches them with smart invalidation, and applies localized pricing based on user's region. All transactions are processed in the user's preferred currency with accurate conversion.



Visit the live project or check out the source code




Explore more of my work













NOOR
"If Your Dreams do not scare you, they are too small !"
Got a project? Let’s vibe together and
make it ninjaa-precise—get in touch!