A visual, node-based AI workflow builder that allows users to connect Text, Image, and LLM nodes to generate intelligent outputs using Google Gemini. The platform supports authentication, workflow persistence, and real-time AI execution through a clean and scalable architecture built with Next.js.
- Next.js (App Router)
- React
- React Flow – visual workflow canvas
- Zustand – global state management
- Tailwind CSS – UI styling
- Next.js API Routes
- MongoDB + Mongoose
- Zod – runtime schema validation
- Google Gemini API – multimodal LLM (text + image)
-
Authentication
- User signup and login
- Basic credential-based authentication
-
Visual Workflow Builder
- Drag-and-drop canvas
- Connectable nodes using React Flow
-
Node Types
- Text Node – text input or AI output
- Image Node – upload or capture images
- LLM Node – process connected inputs using Gemini
-
Multimodal AI Support
- Text + Image inputs sent together to Gemini
- Cleaned, human-readable output
-
Workflow Persistence
- Save workflows (nodes + edges) to MongoDB
- Load the most recent workflow on page load
-
Global State Management
- Centralized node & edge management using Zustand
- Toast notifications for user feedback
-
Modern UI
- Dark-themed interface
- Minimal and focused design using Tailwind CSS
The following diagram illustrates how the backend APIs, database, and Gemini AI interact with each other.
Flow Summary:
- React UI makes API calls to Next.js backend routes
- Auth routes handle login/signup
- Gemini route processes text + image inputs
- Workflow routes persist and restore graph state from MongoDB
app/
├── api/
│ ├── auth/
│ │ ├── login/route.ts
│ │ └── signup/route.ts
│ ├── gemini/route.ts
│ └── workflow/
│ ├── save/route.ts
│ └── load/route.ts
├── login/page.tsx
├── signup/page.tsx
└── page.tsx
components/
├── flow/
│ ├── nodes/
│ │ ├── TextNode.tsx
│ │ ├── ImageNode.tsx
│ │ └── LLMNode.tsx
│ └── FlowCanvas.tsx
├── Sidebar.tsx
├── Toolbar.tsx
├── Toast.tsx
└── ToastContainer.tsx
lib/
└── mongodb.ts
models/
├── User.ts
└── Workflow.ts
store/
├── flowStore.ts
└── toastStore.ts
.env.local- email: User email (unique)
- password: User password
- createdAt / updatedAt
- name: Workflow name
- nodes: Array of React Flow nodes
- edges: Array of React Flow edges
- createdAt / updatedAt
POST /api/auth/login– Login userPOST /api/auth/signup– Register new user
-
- Accepts structured text & image inputs
- Calls Google Gemini API
- Returns cleaned AI-generated text
POST /api/workflow/save– Save workflow stateGET /api/workflow/load– Load latest workflow
- User logs in or signs up
- User creates a workflow by adding and connecting nodes
- LLM Node collects inputs from connected Text/Image nodes
- Gemini API is called with structured multimodal data
- Output is returned and rendered as a new Text Node
- Workflow can be saved and later restored
Create a .env.local file in the root directory:
MONGODB_URI=your_mongodb_connection_string
GEMINI_API_KEY=your_google_gemini_api_keygit clone https://github.com/yourusername/ai-workflow-builder.gitnpm installnpm run devhttp://localhost:3000
- Password hashing (bcrypt)
- JWT-based authentication
- User-specific workflows
- Workflow versioning
- Autosave support
- Support for multiple LLM providers
For any questions or collaboration:
📧 Email: ydamit5840@gmail.com 🔗 GitHub: https://github.com/stalin670 🔗 LinkedIn: https://www.linkedin.com/in/stalin67/





