A modern workflow automation platform built with Next.js, tRPC, and AI integrations
- ๐ NodeBase n8n
- ๐ Table of Contents
- โจ Features
- ๐ Architecture
- ๐ Quick Start
- ๐ Documentation
- ๐จ UI/UX Design
- ๐งช Testing
- ๐ Performance
- ๐ Security
- ๐ฎ Interactive Demo
- ๐ง Configuration
- ๐ Deployment
- ๐ค Contributing
- ๐ Roadmap
- ๐ License
- ๏ฟฝ๐ Acknowledgments
- ๐ Support
- ๐ Thank You for Your Interest!
| Feature | Description | Technology |
|---|---|---|
| ๐ Workflow Automation | Create, manage, and execute powerful automation workflows with visual node-based editor | React Flow + Custom Engine |
| ๐จ Visual Workflow Builder | Intuitive drag-and-drop interface for building complex workflows | React DnD + React Flow |
| ๐ค AI-Powered Integrations | Built-in support for Google AI, Mistral, Anthropic, and other AI providers | AI SDK + Custom Adapters |
| ๐ฅ Real-time Collaboration | Work together with your team in real-time with live updates | WebSockets + CRDTs |
| ๐ Advanced Analytics | Comprehensive workflow execution analytics and performance metrics | Recharts + Custom Dashboard |
| ๐ Extensible Plugin System | Build and integrate custom nodes and connectors | Plugin Architecture |
| โก High-Performance Execution | Parallel workflow execution with intelligent resource management | Worker Threads + Queue System |
- ๐ก๏ธ Modern Auth Stack - Built with Better Auth for secure, session-based authentication
- ๐ Multi-provider Support - Email/password, OAuth (Google, GitHub, Discord), and SAML
- ๐ Enterprise-Grade Security - JWT tokens, CSRF protection, rate limiting, and audit logs
- ๐ค Role-Based Access Control - Granular permissions with custom roles and policies
- ๐ Data Encryption - End-to-end encryption for sensitive workflow data
- ๐ซ Advanced Threat Protection - Bot detection, IP whitelisting, and anomaly detection
- ๐ฐ Polar.sh Integration - Seamless payment processing and subscription management
- ๐ณ Multiple Payment Methods - Support for Stripe, PayPal, and cryptocurrency payments
- ๐ Subscription Management - Handle recurring billing, plan upgrades, and proration
- ๐ซ Usage-Based Billing - Pay-per-execution model with detailed usage tracking
- ๐ข Enterprise Plans - Custom pricing for large organizations with SLA guarantees
- ๐ท Type-Safe APIs - Full-stack type safety with tRPC and Zod validation
- ๐๏ธ Database Management - PostgreSQL with Prisma ORM for reliable data persistence
- โก Background Jobs - Inngest for reliable background workflow execution
- ๐ก Error Monitoring - Sentry integration for comprehensive error tracking and performance monitoring
- ๐จ Modern UI - Beautiful, responsive interface with Radix UI and Tailwind CSS
- ๐ CDN Integration - Global content delivery for optimal performance
- ๐ Auto-scaling - Horizontal scaling with load balancing and health checks
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ CDN & Edge Network โ
โ (CloudFlare + Vercel Edge) โ
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ Next.js Frontend โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโ โ
โ โ Dashboard โ โ Workflow โ โ Analytics โ โ Settings โ โ
โ โ UI โ โ Builder โ โ Dashboard โ โ Panel โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ง API Gateway & Backend โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโ โ
โ โ tRPC API โ โ Auth Layer โ โ Background โ โ Webhook โ โ
โ โ Router โ โ Better Auth โ โ Jobs โ โ Handler โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐๏ธ Data & Storage Layer โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโ โ
โ โ PostgreSQL โ โ Redis Cache โ โ File Storageโ โ Search โ โ
โ โ Primary DB โ โ Sessions โ โ (S3/Blob) โ โ Engine โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Next.js 16 - React framework with App Router for optimal performance
- React 19 - Latest React with concurrent features and Suspense
- TypeScript 5 - Type-safe development with advanced inference
- Tailwind CSS v4 - Utility-first CSS with custom design system
- Radix UI - Unstyled, accessible component primitives
- React Flow - Visual workflow node editor
- Zustand - Lightweight state management
- TanStack Query - Server state management and caching
- tRPC v11 - End-to-end type-safe APIs with React Query integration
- Better Auth - Modern authentication with session management
- Prisma v7 - Type-safe database ORM with migrations
- Inngest - Reliable background job processing and workflows
- Sentry - Error tracking and performance monitoring
- Zod - Runtime type validation and schema definitions
- PostgreSQL - Primary relational database with full-text search
- Redis - Caching, session storage, and job queues
- AWS S3/Azure Blob - File storage for workflow assets and logs
- Elasticsearch - Advanced search and analytics capabilities
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Client โโโโโบโ Next.js โโโโโบโ tRPC โโโโโบโ PostgreSQL โ
โ Browser โ โ Server โ โ Router โ โ Database โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ โ โ โ
โ โ โ โ
โผ โผ โผ โผ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ React โ โ Server โ โ Auth โ โ Prisma โ
โ Query โ โ Components โ โ Middlewareโ โ Client โ
โ Cache โ โ (SSR) โ โ (Better โ โ (ORM) โ
โ โ โ โ โ Auth) โ โ โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ก๏ธ Security Layers โ
โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ WAF/CDN โ โ Rate โ โ Auth โ โ Data โ โ
โ โ Protection โ โ Limiting โ โ Layer โ โ Encryptionโ โ
โ โ (CloudFlare)โ โ (Redis) โ โ (JWT/Session)โ โ (AES-256)โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Requirement | Minimum Version | Recommended | Installation |
|---|---|---|---|
| Node.js | 18.0.0 | 20.0.0+ | nodejs.org |
| PostgreSQL | 14.0 | 15.0+ | postgresql.org |
| Redis | 6.0 | 7.0+ | redis.io |
| Bun | 1.0.0 | Latest | bun.sh |
| Git | 2.30 | Latest | git-scm.com |
# Using HTTPS
git clone https://github.com/yourusername/nodebasen8n.git
cd nodebasen8n
# Using SSH (recommended)
git clone git@github.com:yourusername/nodebasen8n.git
cd nodebasen8n# Using Bun (recommended - 3x faster)
bun install
# Using npm
npm install
# Using Yarn
yarn install
# Using pnpm
pnpm install# Copy environment template
cp .env.example .env.local
# Edit with your preferred editor
code .env.local
# or
vim .env.localComplete Environment Configuration:
# ===================================================================
# ๐๏ธ Database Configuration
# ===================================================================
DATABASE_URL="postgresql://username:password@localhost:5432/nodebasen8n"
REDIS_URL="redis://localhost:6379"
# ===================================================================
# ๐ Authentication Configuration
# ===================================================================
BETTER_AUTH_SECRET="your-super-secret-key-min-32-chars"
BETTER_AUTH_URL="http://localhost:3000"
BETTER_AUTH_TRUSTED_ORIGINS="http://localhost:3000"
# OAuth Providers (Optional)
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
GITHUB_CLIENT_ID="your-github-client-id"
GITHUB_CLIENT_SECRET="your-github-client-secret"
# ===================================================================
# ๐ค AI Provider Configuration
# ===================================================================
# Google AI (Gemini)
GOOGLE_AI_API_KEY="your-google-ai-api-key"
# Mistral AI
MISTRAL_API_KEY="your-mistral-api-key"
# Anthropic Claude
ANTHROPIC_API_KEY="your-anthropic-api-key"
# ===================================================================
# ๐ณ Payment Configuration
# ===================================================================
POLAR_API_KEY="your-polar-api-key"
STRIPE_SECRET_KEY="your-stripe-secret-key"
STRIPE_PUBLISHABLE_KEY="your-stripe-publishable-key"
# ===================================================================
# ๐ก External Services
# ===================================================================
# Sentry (Error Monitoring)
SENTRY_DSN="your-sentry-dsn"
SENTRY_AUTH_TOKEN="your-sentry-auth-token"
# Email Service (Resend)
RESEND_API_KEY="your-resend-api-key"
RESEND_FROM_EMAIL="noreply@yourdomain.com"
# File Storage
AWS_ACCESS_KEY_ID="your-aws-access-key"
AWS_SECRET_ACCESS_KEY="your-aws-secret-key"
AWS_REGION="us-east-1"
AWS_S3_BUCKET="your-s3-bucket"
# ===================================================================
# ๐ง Development Configuration
# ===================================================================
NEXT_PUBLIC_APP_URL="http://localhost:3000"
NEXT_PUBLIC_API_URL="http://localhost:3000/api"# Install Prisma CLI (if not installed)
npm install -g prisma
# Generate Prisma client
npx prisma generate
# Run database migrations
npx prisma migrate dev --name init
# (Optional) Seed database with sample data
npx prisma db seed# Option 1: Start Next.js only
bun run dev
# Option 2: Start Next.js + Inngest + Redis (recommended)
bun run dev:all
# Option 3: Start with Docker Compose (includes all services)
docker-compose up -d| Service | URL | Description |
|---|---|---|
| Main Application | http://localhost:3000 | Primary web interface |
| API Documentation | http://localhost:3000/api/trpc | tRPC API endpoint |
| Inngest Dashboard | http://localhost:8288 | Background job monitoring |
| Database Admin | http://localhost:5555 | Prisma Studio (if enabled) |
# Test the installation
curl http://localhost:3000/api/health
# Expected response: {"status": "ok", "timestamp": "..."}| Issue | Solution |
| ------------------------------ | -------------------------------------------------------- | ------------------------------------------- |
| Port 3000 already in use | Run lsof -ti:3000 | xargs kill -9or change port in.env.local |
| Database connection failed | Verify PostgreSQL is running and credentials are correct |
| Prisma generation failed | Run npx prisma generate manually |
| Redis connection refused | Start Redis server: redis-server |
| Permission denied | Check file permissions: chmod +x scripts/* |
| Command | Description |
|---|---|
bun run dev |
Start Next.js development server |
bun run dev:all |
Start Next.js + Inngest together |
bun run build |
Build for production |
bun run start |
Start production server |
bun run lint |
Run ESLint |
npx prisma migrate dev |
Apply database migrations |
npx prisma generate |
Generate Prisma client |
src/
โโโ app/ # Next.js App Router
โ โโโ (auth)/ # Authentication pages
โ โโโ (dashboard)/ # Protected dashboard
โ โโโ api/ # API routes
โ โโโ globals.css # Global styles
โโโ components/
โ โโโ ui/ # Reusable UI components
โ โโโ web/ # Web-specific components
โโโ features/ # Feature modules
โ โโโ auth/ # Authentication logic
โ โโโ payments/ # Payment processing
โ โโโ workflows/ # Workflow management
โโโ lib/ # Utility libraries
โโโ trpc/ # tRPC setup and routers
โโโ inngest/ # Background job functions
The application uses tRPC for end-to-end type safety:
// Example tRPC router
export const appRouter = createTRPCRouter({
getWorkflows: protectedProcedure.query(async ({ ctx }) => {
return ctx.prisma.workflow.findMany({
where: { userId: ctx.auth.user.id },
});
}),
createWorkflow: protectedProcedure
.input(z.object({ name: z.string() }))
.mutation(async ({ input, ctx }) => {
return ctx.prisma.workflow.create({
data: { name: input.name, userId: ctx.auth.user.id },
});
}),
});The application uses PostgreSQL with the following main entities:
- Users - Authentication and user management
- Workflows - Workflow definitions and metadata
- Sessions - User session management
- Accounts - OAuth account linking
Our design system is built on modern principles:
| Component | Technology | Features |
|---|---|---|
| Base Components | Radix UI + Tailwind CSS | Accessible, customizable, themeable |
| Icons | Lucide React | 1000+ consistent icons |
| Forms | React Hook Form + Zod | Type-safe form validation |
| Notifications | Sonner | Elegant toast notifications |
| Data Visualization | Recharts | Interactive charts and graphs |
| Workflow Editor | React Flow | Visual node-based editor |
// Tailwind theme configuration
const theme = {
colors: {
// Primary brand colors
primary: {
50: "#eff6ff",
500: "#3b82f6",
900: "#1e3a8a",
},
// Semantic colors
success: "#10b981",
warning: "#f59e0b",
error: "#ef4444",
info: "#06b6d4",
},
typography: {
fontFamily: {
sans: ["Inter", "system-ui", "sans-serif"],
mono: ["JetBrains Mono", "monospace"],
},
},
animations: {
"fade-in": "fadeIn 0.5s ease-in-out",
"slide-up": "slideUp 0.3s ease-out",
},
};- Mobile-First Approach - Optimized for mobile devices
- Breakpoints: sm (640px), md (768px), lg (1024px), xl (1280px)
- Touch-Friendly - Large tap targets and gestures
- Progressive Enhancement - Works without JavaScript
| Test Type | Tool | Coverage | Description |
|---|---|---|---|
| Unit Tests | Jest + React Testing Library | 85%+ | Individual component and function tests |
| Integration Tests | Playwright | 70%+ | End-to-end user workflows |
| API Tests | Supertest | 90%+ | tRPC endpoint testing |
| Performance Tests | Lighthouse CI | 95%+ | Performance and accessibility |
| Security Tests | OWASP ZAP | - | Security vulnerability scanning |
# Run all tests
bun run test
# Run tests with coverage
bun run test:coverage
# Run integration tests
bun run test:e2e
# Run API tests
bun run test:api
# Watch mode for development
bun run test:watch
# Generate coverage report
bun run test:coverage:report// Example: Component test
import { render, screen, fireEvent } from '@testing-library/react';
import { Button } from '@/components/ui/button';
describe('Button Component', () => {
it('renders correctly', () => {
render(<Button>Click me</Button>);
expect(screen.getByRole('button')).toBeInTheDocument();
expect(screen.getByText('Click me')).toBeInTheDocument();
});
it('handles click events', () => {
const handleClick = jest.fn();
render(<Button onClick={handleClick}>Click me</Button>);
fireEvent.click(screen.getByRole('button'));
expect(handleClick).toHaveBeenCalledTimes(1);
});
});| Metric | Target | Current | Status |
|---|---|---|---|
| First Contentful Paint | < 1.5s | 1.2s | โ |
| Largest Contentful Paint | < 2.5s | 2.1s | โ |
| Time to Interactive | < 3.5s | 2.8s | โ |
| Cumulative Layout Shift | < 0.1 | 0.05 | โ |
| First Input Delay | < 100ms | 45ms | โ |
- Code Splitting - Automatic route-based and component-based splitting
- Image Optimization - Next.js Image component with WebP support
- Font Optimization - Self-hosted fonts with preload
- Caching Strategy - Aggressive browser and CDN caching
- Bundle Analysis - Regular bundle size monitoring
- Database Indexing - Optimized queries with proper indexes
- Connection Pooling - Efficient database connection management
- Redis Caching - Frequently accessed data cached in Redis
- API Response Compression - Gzip/Brotli compression enabled
- Background Job Processing - Async processing for long-running tasks
| Layer | Protection | Implementation |
|---|---|---|
| Network | WAF, DDoS Protection | CloudFlare Enterprise |
| Application | Rate Limiting, Input Validation | Redis + Zod schemas |
| Authentication | JWT, Session Management | Better Auth |
| Data | Encryption at Rest & Transit | AES-256 + TLS 1.3 |
| Infrastructure | Container Security, Secrets Management | Docker + Vault |
// Security middleware configuration
export const securityMiddleware = {
// Rate limiting
rateLimit: {
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100, // limit each IP to 100 requests per window
},
// CORS configuration
cors: {
origin: process.env.ALLOWED_ORIGINS?.split(",") || [
"http://localhost:3000",
],
credentials: true,
},
// Security headers
headers: {
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"X-XSS-Protection": "1; mode=block",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
},
};- Real-time Threat Detection - Automated security scanning
- Vulnerability Management - Regular dependency updates
- Audit Logging - Comprehensive activity tracking
- Compliance - GDPR, SOC 2, ISO 27001 ready
Experience the power of NodeBase n8n with our interactive demo:
| Feature | Demo Link | Description |
|---|---|---|
| Workflow Builder | Try Live Editor | Build workflows visually |
| AI Integration | Test AI Nodes | Experience AI-powered automation |
| Analytics Dashboard | View Analytics | Real-time workflow insights |
| API Playground | Test API | Interactive API documentation |
# Example: Social Media Automation Workflow
name: "Social Media Post Scheduler"
description: "Automatically schedule and post content across multiple platforms"
nodes:
- id: "trigger"
type: "webhook"
config:
method: "POST"
- id: "ai-content"
type: "ai-generator"
config:
provider: "openai"
prompt: "Generate engaging social media content about: {{input.topic}}"
- id: "image-generator"
type: "ai-image"
config:
provider: "dall-e"
prompt: "{{ai-content.text}}"
- id: "schedule"
type: "scheduler"
config:
cron: "0 9 * * 1,3,5" # Mon, Wed, Fri at 9 AM
- id: "post-twitter"
type: "social-post"
config:
platform: "twitter"
text: "{{ai-content.text}}"
image: "{{image-generator.url}}"
- id: "post-linkedin"
type: "social-post"
config:
platform: "linkedin"
text: "{{ai-content.text}}"
image: "{{image-generator.url}}"
edges:
- from: "trigger"
to: "ai-content"
- from: "ai-content"
to: "image-generator"
- from: "image-generator"
to: "schedule"
- from: "schedule"
to: ["post-twitter", "post-linkedin"]| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
โ | PostgreSQL connection string |
BETTER_AUTH_SECRET |
โ | Authentication secret key |
BETTER_AUTH_URL |
โ | Application URL for auth |
GOOGLE_AI_API_KEY |
โ | Google AI API key |
MISTRAL_API_KEY |
โ | Mistral AI API key |
POLAR_API_KEY |
โ | Polar payment API key |
SENTRY_DSN |
โ | Sentry error tracking DSN |
-
Create PostgreSQL database
CREATE DATABASE nodebasen8n;
-
Run migrations
npx prisma migrate dev
-
Seed data (optional)
npx prisma db seed
Pros:
- Zero-config deployment
- Automatic SSL certificates
- Global CDN distribution
- Preview deployments for PRs
- Serverless functions support
Setup Steps:
-
Connect Repository
# Install Vercel CLI npm i -g vercel # Link project vercel link
-
Configure Environment Variables
# Set production environment vercel env add DATABASE_URL production vercel env add BETTER_AUTH_SECRET production vercel env add GOOGLE_AI_API_KEY production -
Deploy
# Deploy to production vercel --prod # Deploy with custom domain vercel --prod --domain yourdomain.com
Infrastructure as Code with Terraform:
# terraform/main.tf
module "nodebasen8n" {
source = "./modules/nodebasen8n"
environment = "production"
domain_name = "yourdomain.com"
database_config = {
instance_class = "db.t3.micro"
allocated_storage = 20
multi_az = true
}
redis_config = {
node_type = "cache.t3.micro"
num_cache_nodes = 1
}
app_config = {
instance_type = "t3.small"
min_capacity = 2
max_capacity = 10
}
}Docker Compose Production:
# docker-compose.prod.yml
version: "3.8"
services:
app:
build:
context: .
dockerfile: Dockerfile.prod
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=${DATABASE_URL}
- REDIS_URL=${REDIS_URL}
depends_on:
- postgres
- redis
restart: unless-stopped
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: nodebasen8n
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
volumes:
- redis_data:/data
restart: unless-stopped
nginx:
image: nginx:alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./ssl:/etc/ssl
depends_on:
- app
restart: unless-stopped
volumes:
postgres_data:
redis_data:| โ Item | Description | Status |
|---|---|---|
| Environment Variables | All required env vars configured | |
| Database Migration | Production migrations applied | |
| SSL Certificate | HTTPS properly configured | |
| Domain DNS | Domain pointing to correct IP | |
| Monitoring | Error tracking and uptime monitoring | |
| Backup Strategy | Automated backups configured | |
| Security Headers | Security headers implemented | |
| Performance Optimization | Caching and CDN configured |
# Multi-stage production Dockerfile
FROM node:18-alpine AS base
# Install dependencies only when needed
FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
# Install dependencies based on the preferred package manager
COPY package.json bun.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \
if [ -f bun.lockb ]; then bun install --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then yarn install --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
fi
# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Build the application
RUN npm run build
# Production image, copy all the files and run next
FROM base AS runner
WORKDIR /app
ENV NODE_ENV production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app/public ./public
# Set the correct permission for prerender cache
RUN mkdir .next
RUN chown nextjs:nodejs .next
# Automatically leverage output traces to reduce image size
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER nextjs
EXPOSE 3000
ENV PORT 3000
ENV HOSTNAME "0.0.0.0"
CMD ["node", "server.js"]// monitoring/performance.ts
import { performance } from "perf_hooks";
export class PerformanceMonitor {
static async measureFunction<T>(
name: string,
fn: () => Promise<T>,
): Promise<T> {
const start = performance.now();
try {
const result = await fn();
const duration = performance.now() - start;
// Send metrics to monitoring service
this.sendMetric(name, duration, "success");
return result;
} catch (error) {
const duration = performance.now() - start;
this.sendMetric(name, duration, "error");
throw error;
}
}
private static sendMetric(name: string, duration: number, status: string) {
// Send to Datadog, New Relic, or your monitoring service
console.log(`Metric: ${name} - ${duration}ms - ${status}`);
}
}// pages/api/health.ts
import { NextApiRequest, NextApiResponse } from "next";
export default async function handler(
req: NextApiRequest,
res: NextApiResponse,
) {
try {
// Check database connection
await db.$queryRaw`SELECT 1`;
// Check Redis connection
await redis.ping();
// Check external services
const healthStatus = {
status: "ok",
timestamp: new Date().toISOString(),
services: {
database: "healthy",
redis: "healthy",
external_apis: "healthy",
},
version: process.env.npm_package_version,
uptime: process.uptime(),
};
res.status(200).json(healthStatus);
} catch (error) {
res.status(503).json({
status: "error",
timestamp: new Date().toISOString(),
error: error.message,
});
}
}We welcome contributions! Please see our Contributing Guide for details.
-
๐ด Fork Repository
# Fork the repository on GitHub # Clone your fork locally git clone https://github.com/yourusername/nodebasen8n.git cd nodebasen8n # Add upstream remote git remote add upstream https://github.com/originalowner/nodebasen8n.git
-
๐ฟ Create Feature Branch
# Sync with upstream git fetch upstream git checkout main git merge upstream/main # Create feature branch git checkout -b feature/amazing-feature
-
๐ป Make Changes
# Install dependencies bun install # Start development server bun run dev:all # Make your changes...
-
โ Quality Assurance
# Run tests bun run test # Check types bun run type-check # Lint code bun run lint # Format code bun run format
-
๐ค Commit and Push
# Stage changes git add . # Commit with conventional commit message git commit -m "feat: add amazing workflow feature" # Push to your fork git push origin feature/amazing-feature
-
๐ Create Pull Request
- Use descriptive title and description
- Link relevant issues
- Add screenshots for UI changes
- Ensure CI passes
// โ
Good: Use explicit types
interface WorkflowNode {
id: string;
type: "trigger" | "action" | "condition";
config: Record<string, unknown>;
position: { x: number; y: number };
}
// โ
Good: Use generics for reusable functions
function createApiResponse<T>(data: T, status = 200) {
return {
data,
status,
timestamp: new Date().toISOString(),
};
}
// โ Bad: Using `any` type
function processData(data: any) {
return data.result;
}// โ
Good: Component with proper typing and documentation
interface ButtonProps {
/** Button variant */
variant?: 'primary' | 'secondary' | 'outline';
/** Button size */
size?: 'sm' | 'md' | 'lg';
/** Click handler */
onClick?: () => void;
/** Button content */
children: React.ReactNode;
/** Loading state */
loading?: boolean;
}
/**
* A reusable button component with multiple variants and sizes.
*
* @example
* ```tsx
* <Button variant="primary" size="md" onClick={handleClick}>
* Click me
* </Button>
* ```
*/
export const Button: React.FC<ButtonProps> = ({
variant = 'primary',
size = 'md',
onClick,
children,
loading = false,
}) => {
return (
<button
className={cn(buttonVariants({ variant, size }))}
onClick={onClick}
disabled={loading}
>
{loading ? <Spinner /> : children}
</button>
);
};# Format: <type>(<scope>): <description>
# Types:
feat: New feature
fix: Bug fix
docs: Documentation changes
style: Code formatting (no functional changes)
refactor: Code refactoring
test: Adding or updating tests
chore: Build process or dependency changes
# Examples:
feat(workflows): add AI-powered workflow suggestions
fix(auth): resolve JWT token expiration issue
docs(readme): update installation instructions
test(api): add integration tests for workflow endpoints| Area | Minimum Coverage | Target Coverage |
|---|---|---|
| Components | 80% | 90% |
| API Routes | 85% | 95% |
| Utilities | 90% | 100% |
| Overall | 80% | 85% |
// Example: Comprehensive test suite
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { WorkflowList } from '@/features/workflows/components/workflow-list';
// Mock data
const mockWorkflows = [
{ id: '1', name: 'Test Workflow 1', status: 'ACTIVE' },
{ id: '2', name: 'Test Workflow 2', status: 'DRAFT' },
];
describe('WorkflowList', () => {
let queryClient: QueryClient;
beforeEach(() => {
queryClient = new QueryClient({
defaultOptions: {
queries: { retry: false },
mutations: { retry: false },
},
});
});
const renderWithQuery = (component: React.ReactElement) => {
return render(
<QueryClientProvider client={queryClient}>
{component}
</QueryClientProvider>
);
};
it('renders workflow list correctly', async () => {
renderWithQuery(<WorkflowList />);
expect(screen.getByText('Loading workflows...')).toBeInTheDocument();
await waitFor(() => {
expect(screen.getByText('Test Workflow 1')).toBeInTheDocument();
expect(screen.getByText('Test Workflow 2')).toBeInTheDocument();
});
});
it('handles workflow deletion', async () => {
const mockDelete = jest.fn();
renderWithQuery(<WorkflowList onDelete={mockDelete} />);
await waitFor(() => {
expect(screen.getByText('Test Workflow 1')).toBeInTheDocument();
});
fireEvent.click(screen.getByRole('button', { name: 'Delete Test Workflow 1' }));
await waitFor(() => {
expect(mockDelete).toHaveBeenCalledWith('1');
});
});
});- ๐ Contributors - Listed in our README and website
- ๐ Top Contributors - Special recognition and swag
- ๐ Core Contributors - Access to private channels and decision-making
| Feature | Status | Priority | Description |
|---|---|---|---|
| ๐ค AI Workflow Generator | In Development | High | Generate workflows from natural language descriptions |
| ๐ฑ Mobile App | Planning | Medium | Native iOS and Android apps |
| ๐ Plugin Marketplace | Research | High | Community-built workflow nodes and integrations |
| ๐ Real-time Collaboration | In Development | High | Multi-user workflow editing with live updates |
| ๐ Advanced Analytics | Planning | Medium | Detailed workflow performance insights |
- ๐ Global Workflow Sharing - Public workflow library and templates
- ๐ข Enterprise Features - SSO, advanced permissions, audit logs
- โก Edge Computing - Run workflows at the edge for lower latency
- ๐ Blockchain Integration - Web3 workflow triggers and actions
- ๐จ Visual Programming - Advanced node editor with debugging tools
gantt
title NodeBase n8n Development Roadmap
dateFormat YYYY-MM-DD
section Q1 2024
AI Generator :active, ai, 2024-01-01, 60d
Real-time Collab :collab, after ai, 45d
Plugin Market :market, after collab, 30d
section Q2 2024
Mobile App :mobile, 2024-04-01, 90d
Enterprise :enterprise, after mobile, 60d
section Q3 2024
Global Sharing :sharing, 2024-07-01, 45d
Edge Computing :edge, after sharing, 45d
section Q4 2024
Blockchain :blockchain, 2024-10-01, 60d
Visual Prog :visual, after blockchain, 45d
This project is licensed under the MIT License - see the LICENSE file for details.
- โ Commercial use - Use in commercial products
- โ Modification - Modify the code
- โ Distribution - Distribute your modifications
- โ Private use - Use privately
- โ Liability - No warranty provided
- โ Trademark - Cannot use trademark
By contributing to this project, you agree that your contributions will be licensed under the same MIT license.
- Next.js - The React framework for production
- tRPC - End-to-end typesafe APIs
- Prisma - Next-generation ORM
- Better Auth - Modern authentication library
- Inngest - Reliable background job processing
- Radix UI - Low-level UI primitives
- Tailwind CSS - Utility-first CSS framework
- n8n - Workflow automation inspiration
- Zapier - Integration patterns
- Airbyte - Data integration concepts
- Retool - Internal tool building
Special thanks to all our contributors who make this project better:
| Channel | Response Time | Best For |
|---|---|---|
| ๏ฟฝ Email | 24-48 hours | Private questions, enterprise inquiries |
| ๐ฌ Discord | 1-4 hours | Community support, quick questions |
| ๐ฆ Twitter | 4-8 hours | Announcements, quick updates |
| ๐ Documentation | Immediate | Self-service, detailed guides |
| ๐ GitHub Issues | 24-72 hours | Bug reports, feature requests |
- ๐ Official Documentation - Comprehensive guides
- ๐ Tutorials - Step-by-step tutorials
- ๐บ YouTube Channel - Video tutorials
- ๐๏ธ Podcast - Automation discussions
- ๐ฐ Blog - Tips and best practices
We're always looking for partners to integrate with:
- ๐ API Providers - Add your service to our workflow library
- ๐ข Enterprise - Custom solutions and support
- ๐ Educational - Training programs and certifications
- ๐ผ Consulting - Implementation and optimization services
Contact us: partnerships@nodebasen8n.com
โญ Star this repo if it helped you!
๐ View Documentation โข ๐ฎ Try Live Demo โข ๐ฌ Join Community
Made with โค๏ธ by Sameer Harapanahalli
Building the future of workflow automation, one node at a time.