# Fluxify > Draw your backend. Ship it as code. Build APIs and background jobs on a visual canvas. Fluxify turns what you draw into fast JavaScript and runs it for you. ## Table of Contents ### For AI Agents (read first) - [Docs for AI Agents](https://docs.fluxify.rest/agents.md): Facts and recipes written for AI agents that build in Fluxify through its tools, with no UI steps. - [App config reference for agents](https://docs.fluxify.rest/agents/app-config.md): Fields, encryption rules, errors and JSON examples for project settings and secrets saved with save_app_config. - [Canvas guide for agents](https://docs.fluxify.rest/agents/canvas.md): How a canvas runs (entrypoint, blocks, response), block handles and edges, how to read block schemas, how to edit with edit_canvas, errors, and saving a block output to a variable. - [Custom block reference for agents](https://docs.fluxify.rest/agents/custom-block.md): Fields, inputs, usage kinds, errors and JSON examples for creating a custom block with save_custom_block and writing its code on its canvas. - [Dynamic values and js expressions in block inputs](https://docs.fluxify.rest/agents/expressions.md): How a block text input becomes a dynamic value with the js prefix, what names it can read, which fields accept it, and the mistakes to avoid. - [Integration reference for agents](https://docs.fluxify.rest/agents/integration.md): Groups, variants, config fields, the cfg reference for secrets, errors and JSON examples for connecting a database, KV store, AI provider or queue with save_integration. - [Middleware reference for agents](https://docs.fluxify.rest/agents/middleware.md): Fields, run order, limits, errors and JSON examples for building a middleware chain with save_middleware. - [Recipe - composed flows](https://docs.fluxify.rest/agents/recipes/composed-flows.md): Canvas patterns with exact edit_canvas ops, check then update or 404, retry around a flaky call, an error handler that returns JSON 500, and a response status set at run time. - [Recipe - debug and fix a route or workflow](https://docs.fluxify.rest/agents/recipes/debug-and-fix.md): Step by step tool calls that find why a route or workflow fails (debug error, system logs, recording) and fix it with edit_canvas. - [Recipe - route with JWT auth](https://docs.fluxify.rest/agents/recipes/route-jwt-auth.md): Step by step tool calls that build a route which accepts only requests with a valid JWT and answers 401 otherwise. - [Recipe - use an integration in a canvas](https://docs.fluxify.rest/agents/recipes/use-integration-in-canvas.md): Step by step tool calls that save a database integration with its secret in app config, test it and read from it in a route. - [Recipe - validate a request](https://docs.fluxify.rest/agents/recipes/validate-request.md): Check request input with the route's body, query and params schemas (types, rules, formats, custom JS) instead of regex in a JS Runner block. - [Recipe - workflow with a cron trigger](https://docs.fluxify.rest/agents/recipes/workflow-cron-trigger.md): Step by step tool calls that create a background workflow and a cron schedule trigger that starts it every night. - [Recipe - write and run a test suite](https://docs.fluxify.rest/agents/recipes/write-and-run-test-suite.md): Step by step tool calls that save a test suite for a route and a workflow, run it, read the result and trace a failure to its block. - [Referring to resources in chat](https://docs.fluxify.rest/agents/references.md): How an agent points at an existing route, workflow, trigger or other resource in its reply so the chat shows a link. - [Route reference for agents](https://docs.fluxify.rest/agents/route.md): Fields, defaults, limits, errors and JSON examples for creating and updating an HTTP route with save_route. - [Test suite reference for agents](https://docs.fluxify.rest/agents/test-suite.md): Fields, assertions, hooks, limits, errors and JSON examples for route and workflow test suites saved with save_test_suite and run with run_test_suite. - [Trigger reference for agents](https://docs.fluxify.rest/agents/trigger.md): Fields, defaults, limits, errors and JSON examples for cron schedules and queue triggers created with save_trigger. - [Workflow reference for agents](https://docs.fluxify.rest/agents/workflow.md): Fields, defaults, limits, errors and JSON examples for creating and updating a background workflow with save_workflow. ### Getting Started - [Getting Started](https://docs.fluxify.rest/getting-started.md): A complete introduction to Fluxify — what it is, how it works, and how to get up and running quickly. - [Basics & Core Concepts](https://docs.fluxify.rest/getting-started/basics.md): The fundamental concepts you need to understand to build with Fluxify — Routes, Workflows, Blocks, Edges, Context, and Integrations. - [Routing & Request Validation](https://docs.fluxify.rest/getting-started/routing.md): How Fluxify maps incoming requests to your API workflows, validates request data, and returns errors to clients. - [Connect an AI Agent](https://docs.fluxify.rest/getting-started/ai-agents.md): Connect Claude, Cursor or another AI agent to Fluxify through its MCP server, sign in with OAuth or an access token, and see every tool and the project role it needs. - [Contributing to Fluxify](https://docs.fluxify.rest/getting-started/contributing.md): How to contribute to Fluxify — where to find the full contributor guide, what kinds of contributions are welcome, and how to get help. - [Local Testing Guide](https://docs.fluxify.rest/getting-started/local-testing.md): How to run the full Fluxify stack locally for development and testing. ### Concepts - [Concepts](https://docs.fluxify.rest/concepts.md): The mental model for building, executing, and operating Fluxify routes. - [App Config](https://docs.fluxify.rest/concepts/app-config.md): Store project-wide settings and secrets, then read them safely from routes and integrations. - [Blocks](https://docs.fluxify.rest/concepts/blocks.md): The focused units of work that turn a request into a response. - [Edges](https://docs.fluxify.rest/concepts/edges.md): The explicit connections that define a route's execution order and data flow. - [Environments](https://docs.fluxify.rest/concepts/environments.md): What production and development workers are, how to start a development worker, and how the two are kept apart. - [Execution Context](https://docs.fluxify.rest/concepts/context.md): The request-scoped data and helpers available while a compiled Fluxify route runs. - [Execution Engine](https://docs.fluxify.rest/concepts/execution-engine.md): The core system that runs your workflows block by block, manages the execution context, and handles errors. - [Execution Recording](https://docs.fluxify.rest/concepts/execution-recording.md): Keep a copy of each run of a route or workflow, with every block's input, output and result, and replay it on the canvas to debug it. - [Globals](https://docs.fluxify.rest/concepts/globals.md): Shared state across the application. - [HTTP Client](https://docs.fluxify.rest/concepts/http-client.md): Call external HTTP APIs from a route with the HTTP Request block or JavaScript helper. - [Conditions and Evaluators](https://docs.fluxify.rest/concepts/evaluators.md): Build route decisions and database filters with conditions. - [Middlewares](https://docs.fluxify.rest/concepts/middlewares.md): Build a check or step once, like an API key guard or request logging, and run it before or after any route. - [Sandbox](https://docs.fluxify.rest/concepts/sandbox.md): A private scratch canvas you can call over HTTP with any method and body, or run as a workflow, on development data and always recorded. - [Workflows](https://docs.fluxify.rest/concepts/workflows.md): Background work built on a canvas like a route, started by a trigger, a schedule or by hand instead of a URL. - [Triggers](https://docs.fluxify.rest/concepts/triggers.md): What starts a workflow, what the workflow receives in trigger.data, and how batching and queue triggers work. - [Schedules](https://docs.fluxify.rest/concepts/schedules.md): Run a workflow on the clock with intervals, cron expressions or a one-off time. - [Telemetry Configuration](https://docs.fluxify.rest/concepts/telemetry-configuration.md): Configure project-wide destinations for logs, traces, and metrics. ### Blocks - [Blocks Overview](https://docs.fluxify.rest/blocks.md): Blocks are the building pieces of a Fluxify flow. Learn what they are, how the pages are organized, and which block to reach for. - [How Blocks Work](https://docs.fluxify.rest/blocks/how-they-work.md): Understanding the execution model of Fluxify blocks. - [List of Blocks](https://docs.fluxify.rest/blocks/list-of-blocks.md): Every Fluxify block, grouped by what it does, with a one-line summary and a link to its page. ### Logic & Flow - [Entrypoint](https://docs.fluxify.rest/blocks/entrypoint.md): The block every workflow starts from. It hands the incoming data to the first real block. - [If Condition](https://docs.fluxify.rest/blocks/if-condition.md): Send the flow down one path when a check is true and another when it is false. - [Switch](https://docs.fluxify.rest/blocks/switch.md): Send the flow down one of several paths, picked by conditions checked in order, with an optional default path. - [For Loop](https://docs.fluxify.rest/blocks/for-loop.md): Repeat a chain of blocks a set number of times. - [For Each Loop](https://docs.fluxify.rest/blocks/foreach-loop.md): Run a chain of blocks once for every item in a list. - [Orchestrator](https://docs.fluxify.rest/blocks/orchestrator.md): Run several chains of blocks at the same time and continue with all their results. - [Retry](https://docs.fluxify.rest/blocks/retry.md): Run a chain of blocks again when it fails, with a wait between tries. - [Error Handler](https://docs.fluxify.rest/blocks/error-handler.md): Choose what happens when any block in the flow fails. - [Response](https://docs.fluxify.rest/blocks/response.md): Send the final answer back to the caller and end the flow. ### Data - [Set Variable](https://docs.fluxify.rest/blocks/set-var.md): Save a value under a name so later blocks can read it. - [Get Variable](https://docs.fluxify.rest/blocks/get-var.md): Read back a value that was saved earlier in the same request. - [Array Operations](https://docs.fluxify.rest/blocks/array-operations.md): Add items to, remove items from, or filter a list kept in a variable. - [Transformer](https://docs.fluxify.rest/blocks/transformer.md): Reshape an object into a new one, by renaming fields or with JavaScript. - [JS Runner](https://docs.fluxify.rest/blocks/js-runner.md): Write your own JavaScript for anything the other blocks don't cover. - [JS Runner examples](https://docs.fluxify.rest/blocks/js-runner-examples.md): Ready-to-copy examples for the JS Runner block. ### HTTP - [HTTP Request](https://docs.fluxify.rest/blocks/http-request.md): Call an external web service or API and use its answer. - [Get HTTP Param](https://docs.fluxify.rest/blocks/get-http-param.md): Read a value from the URL, either a query parameter or a path parameter. - [Get HTTP Header](https://docs.fluxify.rest/blocks/get-http-header.md): Read one header from the incoming request. - [Get HTTP Request Body](https://docs.fluxify.rest/blocks/get-http-request-body.md): Read the body of the incoming request, as JSON, form fields or files. - [Set HTTP Header](https://docs.fluxify.rest/blocks/set-http-header.md): Add a header to the response that goes back to the caller. - [Get Request Cookie](https://docs.fluxify.rest/blocks/get-request-cookie.md): Read one cookie from the incoming request. - [Set HTTP Cookie](https://docs.fluxify.rest/blocks/set-http-cookie.md): Send a cookie to the caller's browser with the response. ### Database - [DB Get All](https://docs.fluxify.rest/blocks/db-get-all.md): Fetch a list of records from a database table, with filters, sorting and paging. - [DB Get Single](https://docs.fluxify.rest/blocks/db-get-single.md): Fetch exactly one record from a database table, like a lookup by id or email. - [DB Row Exists](https://docs.fluxify.rest/blocks/db-row-exists.md): Check whether a record exists and send the flow down a success or failure path. - [DB Count](https://docs.fluxify.rest/blocks/db-count.md): Count the records that match your conditions. - [DB Insert](https://docs.fluxify.rest/blocks/db-insert.md): Add one new record to a database table, or update it if it already exists. - [DB Insert Bulk](https://docs.fluxify.rest/blocks/db-insert-bulk.md): Add a list of records to a table in one operation. - [DB Update](https://docs.fluxify.rest/blocks/db-update.md): Change values in the records that match your conditions. - [DB Delete](https://docs.fluxify.rest/blocks/db-delete.md): Permanently remove the records that match your conditions. - [DB Transaction](https://docs.fluxify.rest/blocks/db-transaction.md): Run several database changes as one unit, so they all succeed or none of them are saved. - [Rollback Transaction](https://docs.fluxify.rest/blocks/db-rollback.md): Cancel the enclosing DB Transaction and undo everything it changed. - [DB Native](https://docs.fluxify.rest/blocks/db-native.md): Run your own SQL or database commands from JavaScript, when the other DB blocks can't express the query. - [DB Conditions](https://docs.fluxify.rest/blocks/db-conditions.md): How to filter records in the DB blocks, with operators, groups, optional filters and custom conditions. - [DB Joins](https://docs.fluxify.rest/blocks/db-joins.md): Combine records from related tables in one query, with inner, left, right and full joins. - [DB Sorting and Paging](https://docs.fluxify.rest/blocks/db-paging-sorting.md): Order records and read them page by page with limit, offset or cursor paging. ### Key-Value - [KV Operations](https://docs.fluxify.rest/blocks/kv-operations.md): Read, write or delete a single key in a key-value store like Redis or Memcached. - [KV Raw Connection](https://docs.fluxify.rest/blocks/kv-raw.md): Run any command against the key-value store with your own JavaScript. ### Message Queues - [Send Message](https://docs.fluxify.rest/blocks/send-message.md): Publish one message or a list of them to Kafka, NATS JetStream, Amazon SQS, RabbitMQ or a Redis stream. ### Logging - [Console Log](https://docs.fluxify.rest/blocks/console-log.md): Print a message to the server logs, for debugging and simple monitoring. - [Cloud Logs](https://docs.fluxify.rest/blocks/cloud-logs.md): Send a log message to an external log service such as Loki or OpenTelemetry. ### Utility - [Trigger Workflow](https://docs.fluxify.rest/blocks/trigger-workflow.md): Start a workflow from a route or another workflow. - [Sticky Note](https://docs.fluxify.rest/blocks/sticky-note.md): A note on the canvas that explains your flow. It never runs. ### Custom Blocks - [Custom Blocks](https://docs.fluxify.rest/blocks/custom-blocks.md): Build your own reusable block from other blocks, and use it in any route or workflow in your project. - [Tutorial: Build a Custom Block](https://docs.fluxify.rest/blocks/custom-blocks-tutorial.md): Build a reusable "Notify Team" block that posts a message to a webhook, then use it in a route. ### Scripting - [Introduction to Scripting](https://docs.fluxify.rest/scripting.md): Extend Fluxify functionalities with custom JavaScript. - [Scripting Context](https://docs.fluxify.rest/scripting/context.md): Complete reference for all global variables, functions, and objects available inside JS Runner, Transformer, and js: expression fields. - [Where Your Code Runs](https://docs.fluxify.rest/scripting/environments.md): Every place you can write JavaScript in Fluxify, and which names are available in each one. - [How Scripting Works](https://docs.fluxify.rest/scripting/how-it-works.md): The execution model of Fluxify scripts. - [JavaScript API Reference](https://docs.fluxify.rest/scripting/javascript-api.md): Typed reference for the JavaScript APIs available in Fluxify workflows. - [Key Considerations & Common Pitfalls](https://docs.fluxify.rest/scripting/key-considerations.md): Important limits, pitfalls, and behaviors that can cause 500 errors or crash API routes. - [Imports & Libraries](https://docs.fluxify.rest/scripting/imports.md): Use import statements in your scripts, and the libraries available to every script without one. ### Testing - [Test Suites](https://docs.fluxify.rest/testing.md): Check that a route does what you expect, every time you change it, without calling it by hand. - [Your First Test Suite](https://docs.fluxify.rest/testing/first-suite.md): Create a test suite, describe the request, add a check, and run it. - [Checking the Response](https://docs.fluxify.rest/testing/checks.md): Simple checks for status, body, headers and duration, and custom checks written in JavaScript with t.expect. - [Hooks](https://docs.fluxify.rest/testing/hooks.md): Change what a block receives or returns during a test, or skip it and use made-up data, so you can test one route without real databases or services. - [Setup and Teardown](https://docs.fluxify.rest/testing/setup-and-teardown.md): Add test data before a test suite runs and clean it up afterwards, using custom blocks made only for testing. - [Overrides](https://docs.fluxify.rest/testing/overrides.md): Run a test suite against a test database or with different settings, without changing the route. - [Testing Workflows](https://docs.fluxify.rest/testing/workflows.md): Run a workflow with test input, once or once per case, and check how it ends. - [Reading Results](https://docs.fluxify.rest/testing/results.md): What each test suite result means, how to find out why a suite failed, and how to fix common problems. ### Integrations - [Integrations](https://docs.fluxify.rest/integrations.md): Connect with 3rd party services. - [Database Integrations](https://docs.fluxify.rest/integrations/databases.md): Connect your application to external databases. - [KV Stores](https://docs.fluxify.rest/integrations/kv-stores.md): Integrate Key-Value (KV) stores like Redis and Memcached into Fluxify workflows. - [Observability Integrations](https://docs.fluxify.rest/integrations/observability.md): Monitor your logs and application health. - [AI Integrations](https://docs.fluxify.rest/integrations/ai-models.md): Leverage the power of Large Language Models (LLMs). - [Trace the AI Assistant with Phoenix](https://docs.fluxify.rest/integrations/agent-tracing.md): See every AI assistant run, model call and tool call, with timings and token counts, in Phoenix or any OpenInference viewer. - [Message Queue Integrations](https://docs.fluxify.rest/integrations/message-queues.md): Start workflows from messages on a Kafka topic, a NATS JetStream stream, an AWS SQS queue or a RabbitMQ queue, and send messages to them from a workflow. ### Deployments - [Self-Hosting Fluxify](https://docs.fluxify.rest/deployments.md): Overview and decision guide for self-hosting Fluxify. Choose between the all-in-one Kit image for quick trials and the scale-out Admin + Workers topology for production, with shared setup steps and secret key generation. - [Quick Run with the Kit Image](https://docs.fluxify.rest/deployments/kit.md): Run all of Fluxify in a single container using the fluxify-kit image — for prototypes and testing only, never production. Includes a batteries-included single command and a Docker Compose stack. - [Production Setup (Admin + Workers)](https://docs.fluxify.rest/deployments/production.md): Deploy Fluxify for production with a separate control plane and replicated request workers behind Traefik. Includes a ready-to-use Docker Compose stack. - [Deploy with a Coding Agent](https://docs.fluxify.rest/deployments/coding-agent.md): Let a coding agent such as Claude Code, Cursor or Codex deploy Fluxify for you from llms.txt, with copy-paste prompts, a checklist to check its work, and safety rules. - [Editions and Licensing](https://docs.fluxify.rest/deployments/editions.md): Which Fluxify features are free (Community) and which need an Enterprise license, how to pick your edition from the admin UI or LICENSE_KEY, what non-commercial means, and exactly what happens when a license expires. - [Licenses and Contributions](https://docs.fluxify.rest/deployments/licensing.md): Which parts of Fluxify are Apache 2.0 and which are under the Enterprise Edition License, who can use each for free, and what contributing to each part means. - [Self-Signed Enterprise Licenses (pre-1.0)](https://docs.fluxify.rest/deployments/self-signed-license.md): Until Fluxify 1.0 there is no license issuer, so signed enterprise keys are minted against a keypair you generate yourself. How to mint one, how to point admin at it, how to test expiry and the grace period, and what changes at 1.0. ### Kubernetes - [Install on Kubernetes](https://docs.fluxify.rest/deployments/kubernetes/install.md): Install Fluxify on a Kubernetes cluster step by step, from an empty cluster to signing in, including everything the cluster needs first. - [Chart settings](https://docs.fluxify.rest/deployments/kubernetes/helm-values.md): Every setting of Fluxify's Helm chart, what it does and its default, with example values files for common setups. - [Logs and monitoring](https://docs.fluxify.rest/deployments/kubernetes/observability.md): Send Fluxify's own logs from a Helm install to a dashboard such as OpenObserve, and where your projects' logs, traces and metrics are set up instead. - [How it works on Kubernetes](https://docs.fluxify.rest/deployments/kubernetes.md): What Fluxify creates in your Kubernetes cluster for each claim, how workers are sized and autoscaled, and how to change claims with kubectl or GitOps. - [Develop against a local cluster](https://docs.fluxify.rest/deployments/kubernetes/local.md): For people changing Fluxify's code. Run Fluxify from a checkout and its workers on a local k3d cluster, step by step, and the four mistakes that look like something else. ### Architecture - [Architecture](https://docs.fluxify.rest/architecture.md): How Fluxify turns a saved flow into JavaScript once and runs it on every request, for self-hosters and the curious. - [Request Lifecycle](https://docs.fluxify.rest/architecture/request-lifecycle.md): Follow one route from building and saving it, through compiling and loading on workers, to a user calling it. - [The Orchestrator](https://docs.fluxify.rest/architecture/orchestrator.md): How the orchestrator starts and keeps the worker containers running on a production stack, and why it works the way it does. - [Performance](https://docs.fluxify.rest/architecture/performance.md): Benchmark results showing what compiling a flow once at save time is worth compared with interpreting it on every request. ### Development - [NPM Packages](https://docs.fluxify.rest/development/npm-packages.md): External libraries used in the platform core.