Back to Selected Works
Live$29/mo flat

OpenClaw

AI Chatbot Deployment SaaS

StackNext.js 16Supabase RealtimeDockerOracle CloudLemonSqueezy

The Product & Mission

OpenClaw is a highly-optimized SaaS wrapper allowing non-technical users to deploy complex open-source AI assistants to Telegram, Discord, or WhatsApp in under 60 seconds without ever touching a terminal.

Target Audience

Business owners, marketers, and community managers who desperately want autonomous customer service bots but completely lack the DevOps skills to provision cloud servers.

The Core Problem

Deploying AI bots natively requires VPS configuration, Docker orchestration, and command-line interfaces. This SaaS abstracts the entire DevOps layer, taking the user's BYOK (Bring Your Own Key) credentials and autonomously provisioning the runtime environment on Oracle Cloud.

Architectural Deep Dive

Supabase Realtime Payment Synchronization

Renderless React Components

Engineered a zero-latency, polling-free payment confirmation system ensuring an instantaneous transition from the loading screen to the deployment wizard.

  • WebSocket Listeners: Built a renderless `<RealtimeProfileSync />` component injected into the root layout that actively listens to PostgreSQL row changes over WebSockets.
  • Instant Funneling: When the Lemon Squeezy webhook successfully triggers a `has_paid = true` mutation, the Realtime listener catches the database update and auto-redirects the user in milliseconds, completely abandoning traditional wasteful HTTP polling architectures.

Edge-Compatible Payment Middleware

HMAC-SHA256 Verification

Architected an impenetrable 162-line Next.js Middleware guarding the entire application state.

  • Central Routing Guard: The middleware synchronously validates the user's Auth Token, `has_paid` status, and `onboarded` boolean flags, forcefully redirecting users through the rigorous 'Pay-First' conversion funnel.
  • Edge-Runtime Checkout: Rewrote traditional Lemon Squeezy checkout URL generation logic to completely avoid Node.js `crypto` dependencies, allowing the billing logic to run securely and instantaneously on Vercel's global Edge network.

BYOK & Oracle Cloud Orchestration

Minimalist Dependency Engineering

Designed a multi-table database schema capable of managing discrete cloud deployments and remote API configurations securely.

  • Secure Handshake: Designed the `bots` and `deployments` tables to securely store user API keys and cleanly map them directly to provisioned Oracle Cloud IP addresses and Docker Container IDs.
  • Minimalist Architecture: Achieved full SaaS functionality—authentication, complex recurring billing, and real-time database bridging—using exactly 5 NPM dependencies, vastly reducing the application's attack surface and build time.

Generative Engine Optimization (GEO) & SEO Architecture

AI-Native Indexing

Implemented a future-proof SEO strategy designed to capture traffic not just from Google, but from the next generation of AI-driven search engines.

  • Advanced robots.txt Architecture: Configured a strategic crawler authorization system specifically inviting Foundation Models (GPTBot, ClaudeBot, PerplexityBot) to index the bot-building platform.
  • Dynamic Metadata Generation: Engineered a custom metadata extraction system that ensures every landing page component is perfectly social-shareable and indexable by LLM citations.
  • Middle-Ware Funnel Engineering: Utilized the 162-line middleware to not only protect auth states but to strategically manage SEO crawler routing, ensuring high-value pages are prioritized for indexing.

Mastery & Skills Acquired

Generative Engine Optimization (GEO)Advanced robots.txt AI-Crawler ArchitectureSupabase Realtime (WebSocket Architecture)Edge-Runtime Next.js Middleware RoutingHMAC-SHA256 Recurring Webhook VerificationOracle Cloud VPS & Remote Docker Orchestration

Post-Mortem: What I Learned

OpenClaw taught me the immense financial power of UX abstraction. The core AI execution technology already existed, but the barrier to entry was DevOps. By wrapping complex Oracle VPS provisioning and Docker automation inside an incredibly rapid Next.js UI, I transformed a highly technical open-source tool into a friction-free, high-converting $29/mo consumer SaaS.

Notes for Technical Recruiters

This projects completely validates my ability to handle sophisticated third-party billing synchronization and infrastructure mapping. The intentional use of Renderless Realtime WebSocket components instead of inefficient HTTP polling proves a deep, fundamental understanding of application performance and modern state synchronization.

Let's Make It Happen

always open to new opportunities, collaborations, and creative challenges. Let's work together to bring your ideas to life

Get In Touch
© 2026 M M Afraz. All rights reserved.

M M AFRAZ