About this project

FlowCraft is an open-source visual workflow builder designed for AI-powered content generation using Google's Gemini AI models. It enables users to create complex, multi-modal workflows by connecting different types of nodes through an intuitive drag-and-drop interface, ultimately generating text, images, and videos. **Core Capabilities** The platform features a visual workflow builder powered by @xyflow/react, allowing users to design scalable AI workflows without writing code. It offers first-class integration with Google's generative AI models including Gemini 3 Pro and 3 Flash for text generation, Nano Banana Pro (Gemini 3 Pro Image Preview) and Gemini 2.5 Flash Image for image generation, and Veo 3.1 for video generation. Workflows can be executed in real-time with visual feedback and progress tracking, and the parallel processing engine automatically resolves dependencies and determines smart execution paths. **Built-in Node Types** FlowCraft ships with a comprehensive set of built-in nodes: - **LLM (Agent) Node**: Gemini-powered text generation supporting text and file inputs, configurable tools, system instructions, strict JSON output, and a visual schema builder. - **Image Node**: Generates images using Gemini 3 Pro Image Preview or Gemini 2.5 Flash Image with configurable aspect ratios, referencing, and resolutions. - **Video Node**: Powered by Veo 3.1 (Fast and Pro models), generates videos of 4, 6, or 8 seconds from text prompts, optionally using first/last frames or reference images from connected nodes. - **File Node**: Manages and previews files including PDFs, images, and videos, connectable to LLM and Vision nodes via Google Cloud Storage URIs. - **Text Node**: Simple multi-line text input for prompts and instructions. - **Upscale Node**: Upscales generated images up to 4x using Imagen 4.0. - **Resize Node**: Intelligently resizes or crops images to new aspect ratios. - **Custom Workflow Node**: Embeds previously saved flows as modular, reusable custom nodes. - **Input/Output Nodes**: Define data boundaries for custom workflows. **Advanced Features** The workflow engine (workflow-engine.ts) handles execution graphs recursively with parallel processing. A dynamic configuration panel allows users to tweak parameters like generation model, system instructions, video duration, and media resolution in real-time from the sidebar. Built-in authentication uses Google OAuth via next-auth, and a media viewer enables reviewing generated assets directly within the graph. **Technology Stack** Frontend: Next.js 16.1 (App Router), React 19, TypeScript, Tailwind CSS 4.1.18, @xyflow/react 12.10, shadcn/ui (Radix UI + Tailwind), and Zustand for client-side state management. Backend: Node.js with Next.js serverless functions, Google GenAI SDK for Vertex AI interactions, Terraform for infrastructure as code, Google Cloud Run for containerized hosting, Google Cloud Storage for artifact storage, Google Cloud Firestore for real-time NoSQL database, and Winston for standardized logging. **Supported AI Models** - Text: gemini-3.1-pro-preview, gemini-3.5-flash, gemini-3.1-flash-lite - Image: imagen-4.0-upscale-preview, gemini-2.5-flash-image, gemini-3-pro-image, gemini-3.1-flash-image, gemini-3.1-flash-lite-image - Video: veo-3.1-lite-generate-001, veo-3.1-fast-generate-001, veo-3.1-generate-001, gemini-omni-flash-preview **Deployment** The project uses Terraform to provision and manage Google Cloud infrastructure. A deployment script (scripts/deploy.sh) orchestrates Terraform initialization, build planning, and application to provision GCP resources, build Docker images via Cloud Build, and deploy to Cloud Run. Prerequisites include Node.js 18+, a Google Cloud Project with Vertex AI enabled, Firebase/Firestore database, and a GCS bucket. **Use Cases** FlowCraft supports complex multi-modal workflows such as chaining a Gemini text brainstorming agent into an Imagen 4.0 image generation block, resizing a 16:9 image to 9:16 for TikTok and passing it as a first frame into Veo 3.1 video generation, or providing a long PDF to a custom Summarizer Node that internally executes map-reduce sub-flows. The project is licensed under Apache 2.0 and welcomes contributions through the standard fork-branch-commit-PR workflow.