Compiling n8n Workflow JSONs into Standalone Fastify/TypeScript Microservices (Open-Source + Client-Side Playground) A developer released n8n-to-fastify, an open-source ahead-of-time compiler that converts exported n8n workflow JSON into standalone Fastify and TypeScript microservices, resolving the workflow DAG, node dependencies and n8n expressions into idiomatic TypeScript modules rather than interpreting nodes at runtime. On a compiled Lead Intake plus subworkflow validation pipeline, the generated service handled 1,885 requests per second at 2.77 ms average latency, with 0.530 ms and 0.742 ms reported for the subworkflow path. The tool covers a subset of n8n's 400-plus community nodes, emitting typed TODO stubs for unsupported ones, maps credentials to environment variables, and is available via CLI and an in-browser playground. n8n is fantastic for prototyping and visual orchestration. You can wire up webhooks, databases, and LLM calls in minutes. The pain starts when a workflow grows into critical production infrastructure: To solve this without rewriting everything by hand, I built n8n-to-fastify — an Ahead-of-Time AOT compiler that converts exported n8n workflow JSONs into standalone Fastify + TypeScript microservices. Instead of interpreting JSON nodes dynamically at runtime, n8n-to-fastify parses the workflow DAG, resolves node dependencies and n8n expressions, and emits clean, idiomatic TypeScript modules workflow.ts + routes/index.ts . Webhook , Respond to Webhook IF / Filter , Switch , Merge , Split Out , Aggregate , Wait Set / Edit Fields , Code / Function HTTP Request , PostgreSQL , OpenAI / Gemini Execute Workflow compiled to an in-memory WorkflowRegistry zero network round-trip between subworkflows On a compiled Lead Intake + Subworkflow validation pipeline bun run benchmark : 2.77 ms 1,885 req/s 0.530 ms 0.742 ms It does not cover all 400+ n8n community nodes yet. When the compiler encounters an unsupported node, it generates a typed TODO stub in the output TypeScript so you can drop in your own SDK or handler cleanly. Credentials are mapped to environment variables process.env . Paste any exported n8n workflow JSON into the in-browser playground https://www.rogeriomaciel.com.br/en/n8n-to-fastify/ or clone the CLI: git clone https://github.com/rogeriomaciel/n8n-to-fastify cd n8n-to-fastify bun install bun test If a real-world workflow from your stack breaks on a specific node or expression $json , $ 'Node' , etc. , open an issue on GitHub https://github.com/rogeriomaciel/n8n-to-fastify — and if you find the approach useful, a Star helps a lot