Skip to content

A visual workflow builder where users can create, update, and manage workflows using React Flow.

Notifications You must be signed in to change notification settings

akash-R-A-J/n8n

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

n8n Workflow Automation Platform

License Node Version TypeScript

A full-stack open-source workflow automation platform with AI integration capabilities, enabling users to create, store, and execute custom workflows with interconnected nodes for AI processing, Telegram messaging, and form-based data collection.


πŸš€ Features

  • Visual Workflow Builder: Drag-and-drop interface for creating complex automation workflows
  • AI Integration: Google Generative AI (Gemini) integration with function calling support 1
  • Telegram Bot: Send automated messages through Telegram 2
  • Multi-Tenant Architecture: User-scoped workflows and credentials with JWT authentication
  • DAG-Based Execution: Intelligent workflow execution with automatic dependency resolution
  • Credential Management: Secure storage of external service credentials

Detailed Documentation: n8n docs


πŸ—οΈ Architecture

The system consists of two main components:

Backend (05-backend-n8n)

  • Framework: Express.js with TypeScript 3
  • Database: PostgreSQL with connection pooling 4
  • Authentication: JWT tokens with bcrypt password hashing 5 6
  • Event Streaming: Kafka integration for asynchronous processing 7

Frontend (n8n-frontend)

  • Framework: React + TypeScript + Vite 8
  • Flow Editor: React Flow for visual workflow creation
  • State Management: Recoil for global state
  • Routing: React Router for navigation

πŸ”„ Project Flow Diagram

n8n_project_flow

πŸ”„ Request Flow Diagram

n8n_request_flow

πŸ”„ Execution Flow Diagram

n8n_execution_flow

πŸ”„ n8n Dashboard Preview

image

πŸ“‹ Prerequisites

  • Node.js >= 18
  • PostgreSQL database
  • Google Generative AI API key (for AI features)
  • Telegram Bot token (for Telegram integration)

πŸ› οΈ Installation

Backend Setup

cd 05-backend-n8n
npm install

Create a .env file with the following variables:

DB_USER=your_db_user
DB_HOST=localhost
DB_DATABASE=your_db_name
DB_PASSWORD=your_db_password
DB_PORT=5432
JWT_SECRET=your_jwt_secret

Frontend Setup

cd n8n-frontend
npm install

πŸš€ Running the Application

Start Backend

cd 05-backend-n8n
npm run dev

Server runs on http://localhost:5000

Start Frontend

cd n8n-frontend
npm run dev

πŸ“‘ API Endpoints

Authentication

  • POST /api/v1/signup - User registration
  • POST /api/v1/signin - User login with JWT token

Workflows (Protected)

  • POST /api/v1/workflow - Create/update workflow
  • GET /api/v1/workflow - Get all user workflows
  • PUT /api/v1/workflow/:id - Update specific workflow

Credentials (Protected)

  • POST /api/v1/credential - Add credential
  • GET /api/v1/credential - Get user credentials
  • DELETE /api/v1/credential - Delete credential

Forms

  • GET /api/v1/form/:workflowId/:nodeId - Get form definition
  • POST /api/v1/form/:workflowId/:nodeId - Submit form and trigger workflow

πŸ”§ Supported Node Types

  • Google Form: Form-based data collection
  • AI Agent: Google Generative AI integration with function calling
  • Telegram Message: Send messages via Telegram Bot

πŸ—„οΈ Database Schema

The system uses three PostgreSQL schemas:

  • user_schema.users - User accounts with bcrypt-hashed passwords
  • workflow_schema.workflow - Workflow definitions with JSONB nodes and connections
  • credential_schema.credential - External service credentials

πŸ” Security

  • JWT-based authentication with 2-hour token expiration
  • Bcrypt password hashing with salt rounds
  • User-scoped data isolation at database level
  • Credential encryption in JSONB storage

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Akash Raj


πŸ™ Acknowledgments

  • Inspired by n8n.io - the workflow automation platform
  • Built with modern web technologies and best practices

About

A visual workflow builder where users can create, update, and manage workflows using React Flow.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages