Weavy-Clone is a node-based AI workflow platform that lets creators, designers, and developers visually compose powerful AI pipelines — connecting models like Gemini, Llama, Qwen, and FFmpeg processing — all within a stunning, drag-and-drop canvas.
- 🎨 Node-Based Editor: Drag-and-drop visual workflow builder with infinite canvas, powered by React Flow.
- 🤖 LLM Integration: Execute complex prompts with Google Gemini, Groq (Llama, Qwen), and more.
- 🖼️ Image Processing: Smart cropping and optimization pipelines.
- 🎬 Video Analysis: Extract frames and process video content via FFmpeg.
- 🔗 Visual Pipelines: Connect nodes to build complex AI workflows with input chaining.
- ⚡ Real-Time Execution: See nodes light up and pulse as they process data in real-time.
- ✅ React Flow Integration: Industry-standard node editor with smooth pan/zoom and mini-map.
- ✅ Trigger.dev Background Tasks: serveless, long-running processes for reliable AI execution.
- ✅ Clerk Authentication: Secure, seamless user management and route protection.
- ✅ PostgreSQL Storage: Persistent workflow saving, history tracking, and user data via Prisma.
- ✅ Responsive Design: Fully responsive UI working on desktop, tablets, and mobile.
- ✅ Dark Theme: Beautiful, modern dark UI designed for focus and creativity.
- Architecture
- Prerequisites
- Installation
- Quick Start
- Node Types
- Configuration
- API Documentation
- Troubleshooting
- Project Structure
- Deployment
- Contributing
Galaxy.ai follows a modern, scalable architecture:
| Layer | Name | Technology | Responsibility |
|---|---|---|---|
| UI | The Canvas | React + React Flow | Visual node editor, state management (Zustand) |
| Logic | The Orchestrator | Next.js API | Graph interpretation, CRUD operations, Authentication |
| Compute | The Engine | Trigger.dev | Long-running tasks (LLM calls, FFmpeg processing) |
| Service | Port | Tech Stack | Key Dependencies |
|---|---|---|---|
| Frontend | 3000 | Next.js, React | @xyflow/react, Tailwind CSS, Framer Motion |
| Database | 5432 | PostgreSQL | Prisma ORM |
| Task Queue | - | Trigger.dev | @trigger.dev/sdk, FFmpeg, Gemini SDK |
graph TD
User[User] -->|Interacts| Client[Next.js Client]
Client -->|Auth| Clerk[Clerk Auth]
Client -->|API Calls| Server[Next.js API Routes]
Server -->|Persist| DB[(PostgreSQL)]
Server -->|Queue Task| Trigger[Trigger.dev Cloud]
Trigger -->|Execute| Worker[Background Worker]
Worker -->|Call| Gemini[Gemini API]
Worker -->|Call| Groq[Groq API]
Worker -->|Process| Transloadit[Transloadit/FFmpeg]
Worker -->|Update| DB
- Node.js 18+
node --version # Should be 18.x or higher - PostgreSQL 14+ (Local or Cloud like Supabase/Neon)
- Git
- Clerk: For authentication.
- Trigger.dev: For background task execution.
- Google AI Studio: For Gemini models.
- Groq: For high-speed LLM inference.
- Transloadit: For file upload handling.
-
Clone the Repository
git clone https://github.com/ShreyasUrade1123/Weavy-Clone-Version1.git cd Weavy-Clone-Version1 -
Install Dependencies
npm install
-
Database Setup Ensure your
DATABASE_URLis set in.env(see Configuration), then run:npx prisma generate npx prisma db push
-
Configure Environment Duplicate
.env.exampleto.envand fill in your keys.
Start all services to get the application running locally.
Terminal 1 - Dev Server (Frontend + API):
npm run dev
# ✅ App running on http://localhost:3000Terminal 2 - Trigger.dev Agent (Background Worker):
npx trigger.dev@latest dev
# ✅ Connected to Trigger.dev cloud, listening for tasksAccess the app at http://localhost:3000.
Galaxy.ai provides a library of specialized nodes to build your workflows:
| Node | Description | Output |
|---|---|---|
| Text | Manual text input for prompts and system instructions | Text string |
| Upload Image | Drag & drop image upload (via Transloadit) | Image URL |
| Upload Video | Video file upload support | Video URL |
| Node | Description | Inputs → Output |
|---|---|---|
| LLM | Run prompts against models like Gemini 1.5 or Llama 3 | System Prompt + User Message + Images → Text |
| Crop Image | Smart cropping using FFmpeg | Image + Dimensions → Cropped Image URL |
| Extract Frame | Extract a specific frame from a video | Video URL + Timestamp → Image URL |
Create a .env file in the root directory with the following variables:
| Variable | Description | Required |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | ✅ |
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY |
Clerk public key | ✅ |
CLERK_SECRET_KEY |
Clerk secret key | ✅ |
TRIGGER_SECRET_KEY |
Trigger.dev secret key | ✅ |
NEXT_PUBLIC_TRIGGER_PUBLIC_API_KEY |
Trigger.dev public key | ✅ |
TRIGGER_PROJECT_ID |
Trigger.dev project ID | ✅ |
GOOGLE_GENERATIVE_AI_API_KEY |
Google Gemini API key | ✅ |
GROQ_API_KEY |
Groq API key | ✅ |
NEXT_PUBLIC_TRANSLOADIT_AUTH_KEY |
Transloadit public key | ✅ |
TRANSLOADIT_AUTH_SECRET |
Transloadit secret | ✅ |
NEXT_PUBLIC_APP_URL |
Base URL of the app (e.g., http://localhost:3000) | ✅ |
GET /api/workflows: List all workflows for the current user.POST /api/workflows: Create a new workflow.GET /api/workflows/:id: Get full workflow details.PUT /api/workflows/:id: Update workflow nodes/edges.DELETE /api/workflows/:id: Delete a workflow.
POST /api/workflows/execute: Trigger a workflow run (delegates to Trigger.dev).POST /api/upload/params: Generate signed parameters for secure client-side file uploads to Transloadit.
Trigger.dev tasks not running?
- Ensure
npx trigger.dev@latest devis running in a separate terminal. - Check that your
TRIGGER_SECRET_KEYis correct in.env.
Database errors?
- Verify
DATABASE_URLis reachable. - Run
npx prisma db pushto ensure schema is synced.
File uploads failing?
- Check usage limits on your Transloadit account.
- Verify
NEXT_PUBLIC_TRANSLOADIT_AUTH_KEYandTRANSLOADIT_AUTH_SECRET.
src/
├── app/ # Next.js App Router (Pages & API)
│ ├── (auth)/ # Authentication routes
│ ├── (protected)/ # Dashboard & Editor routes
│ └── api/ # API Endpoints
├── components/ # React Components
│ ├── landing/ # Landing page UI
│ ├── nodes/ # Custom React Flow Nodes
│ ├── workflow/ # Editor Components (Canvas, Sidebar)
│ └── ui/ # Shared UI (Buttons, Inputs, etc.)
├── lib/ # Utilities (DB, Validation)
├── stores/ # Zustand State Stores
├── trigger/ # Trigger.dev Task Definitions
└── types/ # TypeScript Types- Push your code to GitHub.
- Import the project into Vercel.
- Add all environment variables from
.env. - Deploy!
- Create a project on Trigger.dev.
- Connect your GitHub repo.
- Trigger.dev will automatically detect and deploy your tasks.
Contributions are welcome!
- Fork the repository.
- Create a feature branch:
git checkout -b feature/amazing-feature. - Commit changes:
git commit -m 'Add amazing feature'. - Push to branch:
git push origin feature/amazing-feature. - Open a Pull Request.
This project is licensed under the ISC License.
Built with ❤️ by Shreyas Urade