Skip to content

mangit955/aurel

Repository files navigation


⚑ Aurel

Visual Workflow Automation Platform
Build, trigger, and run multi-step automations with a drag-and-drop editor β€” powered by a Next.js frontend and a BullMQ job worker.


Table of Contents


Overview

Aurel is a no-code/low-code workflow automation platform. Users can visually design multi-step workflows using a drag-and-drop canvas (powered by React Flow), wire up nodes, and trigger them via webhooks. Workflows execute asynchronously through a BullMQ job queue backed by Redis, with full per-node execution logs stored in PostgreSQL.

Key capabilities:

  • πŸ–±οΈ Visual drag-and-drop workflow editor
  • πŸ”— Webhook triggers per workflow (unique secret per workflow)
  • πŸ“§ Send emails via Resend
  • 🌐 Make arbitrary HTTP requests
  • πŸ”€ Conditional branching (if node with operators: =, contains, >, <, exists)
  • πŸ“ Set and transform data between nodes
  • πŸ“Š Full execution logs with per-node status tracking
  • πŸ” OAuth authentication (GitHub & Google) via NextAuth v5

Architecture

Aurel architecture diagram showing the Next.js web app, Redis queue, worker, and PostgreSQL database.

Web requests enter through apps/web, jobs flow through Redis/BullMQ, and apps/worker executes workflows while persisting state in PostgreSQL via Prisma.


Tech Stack

Layer Technology
Frontend Framework Next.js 16 (App Router)
UI Library React 19 + shadcn/ui + Radix UI
Styling Tailwind CSS v4
Animations Framer Motion, GSAP, motion
3D / Effects Three.js, React Three Fiber, OGL
Workflow Canvas React Flow (@xyflow/react)
State Management Zustand
Data Fetching SWR
Authentication NextAuth v5 (GitHub + Google OAuth)
Job Queue BullMQ + IORedis
Database ORM Prisma
Database PostgreSQL
Email Resend
HTTP Client Axios
Package Manager pnpm (Workspaces)
Language TypeScript 5

Workflow Nodes

Each node in a workflow has a type and configurable data. The worker resolves them at execution time.

Node Type Description
trigger / webhook Entry point of a workflow. Workflows expose a unique POST /api/webhooks/:id endpoint that queues a job with the request body as triggerData.
email Sends an HTML email via the Resend API. Supports template interpolation from previous node outputs ({{field.path}}).
http Makes an arbitrary HTTP request (GET, POST, PUT, PATCH, DELETE) and passes the response body to the next node.
if Conditional branching. Evaluates a field on the current data payload against a value using operators: =, contains, >, <, exists. Routes to true or false branches.
set Sets or transforms data fields on the payload before passing it to the next node.

Data Models

model User {
  id        String     @id @default(cuid())
  email     String     @unique
  name      String?
  image     String?
  workflows Workflow[]
  createdAt DateTime   @default(now())
}

model Workflow {
  id            String      @id @default(cuid())
  name          String
  userId        String
  nodes         Json        // React Flow nodes array
  edges         Json        // React Flow edges array
  active        Boolean     @default(false)
  webhookSecret String      @default(cuid())
  executions    Execution[]
  createdAt     DateTime    @default(now())
  updatedAt     DateTime    @updatedAt
}

model Execution {
  id         String    @id @default(cuid())
  workflowId String
  status     String    // "queued" | "running" | "success" | "failed"
  input      Json      // trigger payload
  logs       Json      // per-node results array
  startedAt  DateTime  @default(now())
  endedAt    DateTime?
}

Local Development

Prerequisites

  • Node.js β‰₯ 20
  • pnpm β‰₯ 10 β€” npm install -g pnpm
  • Docker (for local Postgres + Redis)

1. Clone & Install

git clone https://github.com/your-org/aurel-monorepo.git
cd aurel-monorepo
pnpm install

2. Start Infrastructure

Start local PostgreSQL and Redis using Docker Compose:

docker compose up -d

Stop services:

docker compose down

Stop and remove all data volumes:

docker compose down -v

3. Configure Environment Variables

Copy and fill in the required variables (see Environment Variables):

# For the web app
cp apps/web/.env.local.example apps/web/.env.local

# For the worker
cp apps/worker/.env.example apps/worker/.env

# For the database package
cp packages/db/.env.example packages/db/.env

4. Run Migrations & Generate Prisma Client

pnpm db:migrate:deploy
pnpm db:generate

5. Start Dev Servers

Run the web app and worker in separate terminals:

# Terminal 1 β€” Next.js web app
pnpm dev:web

# Terminal 2 β€” BullMQ background worker
pnpm dev:worker

Environment Variables

apps/web β€” Web App

Variable Description
DATABASE_URL PostgreSQL connection string
REDIS_URL Redis connection string (e.g. redis://localhost:6379)
REDIS_HOST Redis host (alternative to REDIS_URL)
REDIS_PORT Redis port (default: 6379)
REDIS_PASSWORD Redis password (optional)
NEXTAUTH_SECRET Secret for signing NextAuth session tokens
NEXTAUTH_URL Canonical URL of the app (e.g. http://localhost:3000)
GITHUB_ID GitHub OAuth App Client ID
GITHUB_SECRET GitHub OAuth App Client Secret
GOOGLE_CLIENT_ID Google OAuth 2.0 Client ID
GOOGLE_CLIENT_SECRET Google OAuth 2.0 Client Secret

apps/worker β€” Background Worker

Variable Description
DATABASE_URL PostgreSQL connection string
REDIS_URL Redis connection string
REDIS_HOST Redis host (alternative to REDIS_URL)
REDIS_PORT Redis port
REDIS_PASSWORD Redis password (optional)
RESEND_API_KEY Resend API key for sending emails
RESEND_FROM_EMAIL Default sender address (e.g. noreply@yourdomain.com)

Database Migrations

Run Prisma migrations against the configured DATABASE_URL:

# Apply pending migrations
pnpm db:migrate:deploy

# Regenerate Prisma client after schema changes
pnpm db:generate

When making schema changes, create a new migration:

pnpm --filter @aurel/db exec prisma migrate dev --name <migration-name>

Deployment (Render)

Deploy two separate services from this monorepo on Render.

Managed Dependencies (create first)

  1. Render PostgreSQL β€” copy the internal connection string as DATABASE_URL
  2. Render Redis β€” copy the internal REDIS_URL

Service 1 β€” Web App

Setting Value
Type Web Service
Root Directory (repo root)
Build Command pnpm install --frozen-lockfile && pnpm run db:generate && pnpm --filter web build
Start Command pnpm --filter web start
Environment Variables See Web App env vars

Service 2 β€” Background Worker

Setting Value
Type Background Worker
Root Directory (repo root)
Build Command pnpm install --frozen-lockfile && pnpm run db:generate
Start Command pnpm --filter worker start
Environment Variables See Worker env vars

Pre-deploy: Run Migrations

Add a pre-deploy job or run once manually:

pnpm --filter @aurel/db exec prisma migrate deploy

Project Structure

aurel-monorepo/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/                     # Next.js 16 App Router frontend
β”‚   β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”‚   β”œβ”€β”€ api/             # API routes (workflows, executions, webhooks, emails)
β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/       # Dashboard page
β”‚   β”‚   β”‚   β”œβ”€β”€ editor/          # Visual workflow editor (React Flow)
β”‚   β”‚   β”‚   β”œβ”€β”€ executions/      # Execution history & logs viewer
β”‚   β”‚   β”‚   └── docs/            # Documentation pages
β”‚   β”‚   β”œβ”€β”€ components/          # Shared UI components (shadcn/ui)
β”‚   β”‚   β”œβ”€β”€ store/               # Zustand stores
β”‚   β”‚   └── lib/                 # Utility functions
β”‚   β”‚
β”‚   └── worker/                  # BullMQ background worker
β”‚       β”œβ”€β”€ engine/              # Core workflow execution engine
β”‚       β”œβ”€β”€ executors/           # Node executors (email, http, if, set, webhook)
β”‚       β”œβ”€β”€ utils/               # Helpers (e.g. template resolution)
β”‚       └── index.ts             # Worker entry point
β”‚
└── packages/
    └── db/                      # Shared Prisma DB package (@aurel/db)
        └── prisma/
            └── schema.prisma    # Database schema (User, Workflow, Execution)

Built with ❀️ using Next.js, BullMQ, Prisma, and React Flow.

About

Aurel is a visual workflow automation engine that allows users to design and execute event-driven backend automations through a node-based interface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors