M87
Promptchainer - AI Workflow Automation
SaaS Development

Promptchainer - AI Workflow Automation

Built a full visual AI workflow builder from pivot to $2k MRR - a 13-package monorepo with a custom graph execution engine, async worker pool, and multi-tenant RAG. Early to AI workflow automation before it was mainstream.

Client

Promptchainer

Niche

AI / SaaS

Timeline

6 months

Key Result$2k MRR - early to AI workflow automation

The Brief

A second-time founder - whose first business, a PR agency, had succeeded - wanted to build a SaaS product. His background was in PR, SEO, and affiliate marketing. He connected with M87 through a mutual contact and brought Daniel on as CTO.

The original idea was a Wix-inspired widget builder for affiliate network websites: a SaaS where site owners could manage offers across multiple sites, with a custom widget builder for styling and deploying offer displays. The team built it, but the product struggled to gain traction - and then ChatGPT launched.

The timing changed everything. With AI tools suddenly exploding, the team pivoted to what would become Promptchainer: a visual workflow automation platform for composing and executing AI prompt chains. The original widget builder's drag-and-drop UX experience directly informed the new product's visual editor - the pivot wasn't starting over, it was redirecting the technical foundation toward a much larger market.

What We Built

Promptchainer was a no-code platform for building AI workflows visually. Users designed prompt chains by dragging nodes onto a canvas, connecting them, and running complex multi-step AI workflows - no code required.

The Visual Editor

Built on ReactFlow, the editor supported seven node types: variables (input parameters), actions (LLM calls with configurable model, temperature, and token limits), image generation (DALL-E), code execution (custom JavaScript), context nodes (RAG/vector search), conditional logic (branching), and output collection. Users could wire any combination into sophisticated AI pipelines.

The Execution Engine

Under the hood, a custom graph traversal engine resolved node dependencies, interpolated variables across the chain, cached intermediate results, and propagated outputs step by step. This wasn't a toy - it handled complex branching workflows with real error handling and timeout management.

The Architecture

The codebase was a Yarn monorepo with 13 packages, orchestrated by Turbo:

  • Web client (Next.js 13) - the visual editor, auth, subscription management, and a published workflow marketplace
  • API server (Express) - REST endpoints, a JobManager polling system, and flow compilation services
  • Worker pool (Express + BullMQ) - horizontally scalable workers consuming model-specific Redis queues for async execution
  • Shared packages - a graph execution engine, model configurations, Zod schemas, a credit calculation system, S3 integration, Prisma database layer, and shared UI components

The full codebase: 721 TypeScript files, ~41,000 lines of code, 14 database models.

Key Technical Features

  • Multi-tenant RAG - users uploaded documents, embedded them with OpenAI's embedding models, and stored vectors in Pinecone for knowledge-grounded prompting
  • Chain compilation - GPT-4 could transform multi-step chains into optimized single prompts
  • Token-level credit metering - tracked prompt and completion tokens per call for subscription billing via LemonSqueezy
  • BYOK (Bring Your Own Key) - users could plug in their own OpenAI API keys
  • Publish & share - a marketplace where users could publish, version, fork, and like workflows
  • Bot framework - Telegram integration for triggering workflows from chat
  • API keys - programmatic access for developers who wanted to call workflows from their own apps

The Result

Promptchainer ramped quickly to $2k MRR, driven by visibility on AI tool aggregators and directories - the early movers in cataloging the explosion of AI products in 2023. The platform attracted users who wanted to build multi-step AI workflows without writing code, from content generation pipelines to RAG-powered research assistants.

This was one of the earliest visual AI workflow builders on the market - before tools like Langflow, Flowise, or n8n's AI nodes existed. The architecture, the speed of execution from pivot to paying users, and the bet on AI workflow automation as a category all proved right.

Technologies Used

Next.jsReactReactFlowExpress.jsTypeScriptMySQLPrismaRedisBullMQOpenAI APILangChainPineconeMonaco EditorLemonSqueezyRedux ToolkitTurborepoAWS

Tell us what you need.

Whether it's a product, a team transformation, or a developer - we'll get back to you with an honest answer on whether we're the right fit.