Skip to content

Sofiane-Bahmed/node-base

Repository files navigation

NodeBase

Next.js 15 React Flow Inngest Prisma

NodeBase is a powerful, visual node-based automation platform that allows you to build complex workflows by connecting AI models, external triggers, and messaging services. Built with a modern tech stack focusing on performance and scalability.

🚀 Key Features

  • Visual Workflow Editor: Intuitive drag-and-drop interface powered by React Flow (XYFlow).
  • AI-First Integrations: Native support for OpenAI, Anthropic, and Google Gemini.
  • Dynamic Triggers: Start workflows via Manual triggers, HTTP requests, Stripe events, or Google Form submissions.
  • Action Nodes: Send automated messages to Discord and Slack.
  • Execution Tracking: Real-time monitoring and detailed history of all workflow runs.
  • Secure Credential Management: Encrypted storage for API keys and sensitive tokens.
  • Robust Background Processing: Reliable workflow orchestration handled by Inngest.

🛠️ Tech Stack

📋 Prerequisites

  • Node.js (v20 or later)
  • PostgreSQL (local instance or managed service)
  • Inngest Dev Server (for local development)
  • Ngrok (optional, for testing webhooks locally)

⚙️ Installation & Setup

  1. Clone the repository:

    git clone https://github.com/Sofiane-Bahmed/node-base.git
    cd node-base
  2. Install dependencies:

    npm install
  3. Configure Environment Variables: Create a .env file in the root directory and add the following:

    # Database
    DATABASE_URL="postgresql://user:password@localhost:5432/nodebase"
    
    # Encryption (for credentials)
    ENCRYPTION_KEY="your-random-encryption-key"
    
    # Auth (Better Auth)
    BETTER_AUTH_SECRET = "your-better-auth-secret"
    BETTER_AUTH_URL = "your-better-auth-url"
    GITHUB_CLIENT_ID="your-github-client-id"
    GITHUB_CLIENT_SECRET="your-github-client-secret"
    GOOGLE_CLIENT_ID="your-google-client-id"
    GOOGLE_CLIENT_SECRET="your-google-client-secret"
    
    # Sentry
    SENTRY_AUTH_TOKEN="your-sentry-auth-token"
    
    # Apps & Webhooks
    NEXT_PUBLIC_APP_URL="http://localhost:3000"
    POLAR_ACCESS_TOKEN="your-polar-token"
    POLAR_SUCCESS_URL="http://localhost:3000/success"
    NGROK_URL="your-ngrok-url"
  4. Initialize the Database:

    npx prisma migrate dev
    npx prisma generate
  5. Run the Development Servers: In separate terminals:

    # Next.js App
    npm run dev
    
    # Inngest Dev Server
    npx inngest-cli@latest dev

📖 Usage

Creating a Workflow

  1. Navigate to the dashboard.
  2. Click "New Workflow".
  3. Use the Node Selector to add a Trigger node (e.g., Manual Trigger).
  4. Connect the Trigger to an AI node (e.g., Gemini).
  5. Configure the node data (prompts, parameters) in the sidebar.
  6. Connect the output to an Action node (e.g., Discord).
  7. Save and Publish the workflow.

Managing Credentials

Go to the Credentials section to securely add your API keys for OpenAI, Anthropic, or Gemini before using them in workflow nodes.

🧪 Testing

  • Linting: npm run lint (uses Biome)
  • Formatting: npm run format

🚀 Deployment

The project is optimized for deployment on Vercel. Ensure you configure all environment variables in your Vercel project settings.

  1. Push your code to GitHub/GitLab.
  2. Connect the repository to Vercel.
  3. Add the DATABASE_URL (e.g., from Neon or Supabase).
  4. Set up the Inngest integration for production workflow handling.

About

A versatile SaaS automation platform that integrates with various APIs to streamline workflows and enhance productivity.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors