# Refluxo > Stateless, serverless-first workflow engine. A lightweight, powerful, and portable engine for orchestrating complex workflows in any JavaScript environment. ## Table of Contents - [@refluxo/core](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core.md) - [@refluxo/jexl-middleware](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/jexl-middleware.md) - [Class: WorkflowEngine\](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core/classes/WorkflowEngine.md): It is stateless and operates step-by-step, producing immutable snapshots. - [Conditionals and Branching](https://refluxo-engine.vitor036daniel.workers.dev/guides/conditionals.md): Workflows often require conditional logic to execute different branches based on certain criteria. The Refluxo engine handles this not by having a complex "if-node", but by using output handles on nodes and edges. - [Cookbook: API Data Aggregation](https://refluxo-engine.vitor036daniel.workers.dev/cookbook/api-aggregation.md): A common use case for a workflow engine is to orchestrate calls to multiple microservices or third-party APIs and then aggregate the results into a single, combined output. - [Cookbook: Content Approval Workflow](https://refluxo-engine.vitor036daniel.workers.dev/cookbook/content-approval.md): This recipe demonstrates how to build a practical, multi-step content approval workflow. A new blog post is submitted, a manager is notified to approve it, and depending on the decision, the post is either published or sent back to the author. - [Custom Nodes](https://refluxo-engine.vitor036daniel.workers.dev/guides/custom-nodes.md): The power of the Refluxo engine comes from its extensibility. You can define your own custom nodes to perform any action you need, from calling an API to processing data or interacting with a database. This is done by creating a `NodeDefinition`. - [Deployment: Security Best Practices](https://refluxo-engine.vitor036daniel.workers.dev/deployment/security.md): When deploying an application built with the Refluxo engine, it's important to consider the security implications of executing workflows, especially if those workflows can be defined by end-users. - [Deployment: Serverless Patterns](https://refluxo-engine.vitor036daniel.workers.dev/deployment/serverless.md): The Refluxo engine's stateless, step-by-step execution model is a perfect match for serverless environments like AWS Lambda, Google Cloud Functions, or Cloudflare Workers. These platforms are designed for short-lived, event-driven computations, which is exactly how the engine operates. - [Deployment: State Management](https://refluxo-engine.vitor036daniel.workers.dev/deployment/state-management.md): The stateless nature of the Refluxo engine means that it does not manage state persistence itself. Your application is responsible for saving and loading the `Snapshot` object. This design choice gives you complete freedom to choose the persistence strategy that best fits your infrastructure. - [Documentation](https://refluxo-engine.vitor036daniel.workers.dev/api/packages.md) - [Dynamic Schemas from External Sources](https://refluxo-engine.vitor036daniel.workers.dev/guides/dynamic-schemas.md): When building a platform on top of the Refluxo engine, you might want to store your `NodeDefinition` schemas (`input` and `output`) in an external source, like a database. Typically, these would be stored in a standard format like **JSON Schema**. - [Error Handling and Retries](https://refluxo-engine.vitor036daniel.workers.dev/guides/error-handling.md): A robust workflow must be able to handle transient failures, such as network issues or temporary API unavailability. The Refluxo engine provides a powerful, declarative `RetryPolicy` that you can attach to any `NodeDefinition` to control its behavior on failure. - [Expressions](https://refluxo-engine.vitor036daniel.workers.dev/concepts/expressions.md): To make workflows truly dynamic, the engine includes a powerful expression engine powered by **Jexl**. Expressions allow you to reference and manipulate data from previous nodes, enabling you to pass data between nodes, make dynamic configurations, and implement complex logic without writing custom code for every scenario. - [Getting Started](https://refluxo-engine.vitor036daniel.workers.dev/guides/getting-started.md): This guide will walk you through setting up and running your first workflow with the Refluxo engine. We'll create a simple workflow that takes a name as input, greets the person, and outputs the greeting. - [Handling Loops](https://refluxo-engine.vitor036daniel.workers.dev/guides/loops.md): The Refluxo engine supports loops by simply having an edge point to a node that has already been executed. The engine's design, which stores execution history in the `Context`, is built to handle this scenario gracefully without losing state. - [Handling Secrets](https://refluxo-engine.vitor036daniel.workers.dev/guides/handling-secrets.md) - [Interface: Context](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core/interfaces/Context.md) - [Interface: Edge](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core/interfaces/Edge.md) - [Interface: MiddlewareContext](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core/interfaces/MiddlewareContext.md) - [Interface: Node\](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core/interfaces/Node.md) - [Interface: NodeDefinition\](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core/interfaces/NodeDefinition.md) - [Interface: NodeResult](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core/interfaces/NodeResult.md) - [Interface: RetryPolicy](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core/interfaces/RetryPolicy.md) - [Interface: Snapshot](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core/interfaces/Snapshot.md) - [Interface: WorkflowDefinition\](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core/interfaces/WorkflowDefinition.md): Contains the nodes and edges that define the process. - [Introduction](https://refluxo-engine.vitor036daniel.workers.dev/introduction.md): Welcome to the documentation for Refluxo, a stateless, serverless-first workflow engine for JavaScript and TypeScript. - [Node Metadata](https://refluxo-engine.vitor036daniel.workers.dev/concepts/metadata.md) - [Pausing, Resuming, and Triggers](https://refluxo-engine.vitor036daniel.workers.dev/guides/external-events.md): The Refluxo engine offers a fundamental capability for managing long-running processes the ability to pause a workflow and wait for external input. This allows workflows to react to the outside world, making them highly flexible for various asynchronous scenarios. - [Refluxo 🔀⚙️🔁🛠️](https://refluxo-engine.vitor036daniel.workers.dev/api.md) - [The Context](https://refluxo-engine.vitor036daniel.workers.dev/concepts/context.md): The `Context` is the memory of your workflow. It's a key-value store within the `Snapshot` that holds the results of every node that has been executed. This allows nodes to access data produced by previous nodes, enabling complex data flows. - [The Engine](https://refluxo-engine.vitor036daniel.workers.dev/concepts/engine.md): The `WorkflowEngine` is the heart of the library. It is a stateless class responsible for orchestrating the execution of a workflow based on a given `WorkflowDefinition`. Its primary goal is to transition between states, generating a new, immutable `Snapshot` at every step. - [The Snapshot](https://refluxo-engine.vitor036daniel.workers.dev/concepts/snapshot.md): The `Snapshot` is the most critical component for achieving statelessness. It is a serializable JSON object that captures the entire state of a workflow execution at any given moment. By saving and rehydrating this object, you can pause, resume, and retry workflows, even across different processes or machines. - [Transformers](https://refluxo-engine.vitor036daniel.workers.dev/concepts/transformers.md) - [Type Alias: Middleware()](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core/type-aliases/Middleware.md) - [Type Alias: NextFunction()](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core/type-aliases/NextFunction.md) - [Type Alias: NodesDefinition](https://refluxo-engine.vitor036daniel.workers.dev/api/@refluxo/core/type-aliases/NodesDefinition.md) - [Use Cases: Building Platforms with Refluxo](https://refluxo-engine.vitor036daniel.workers.dev/concepts/use-cases.md): While the Refluxo engine is a powerful tool for orchestrating workflows directly in your code, one of its primary design goals is to serve as a foundational layer for building higher-level platforms, such as - [Workflow & Node Definition](https://refluxo-engine.vitor036daniel.workers.dev/concepts/workflow.md): A workflow is the blueprint for an execution. It's a declarative JSON structure that defines the tasks (Nodes) and the connections between them (Edges).