A comprehensive, production-ready workflow management system built with NestJS, featuring policy-driven automation, multi-platform Docker support, and enterprise-grade security.
- π Enterprise Authentication - Keycloak SSO integration with JWT tokens
- π Policy-Driven Workflows - Role-based access control and approval workflows
- π n8n Integration - Seamless workflow automation with n8n
- π³ Multi-Platform Docker - AMD64 & ARM64 support with health checks
- π‘οΈ Security First - Comprehensive security scanning and audit logs
- π Real-time Monitoring - Built-in health checks and performance metrics
- π CI/CD Ready - Complete GitHub Actions pipeline with automated testing
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β API Gateway β β n8n Engine β
β (React/Vue) βββββΊβ (NestJS) βββββΊβ (Automation) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β PostgreSQL β β Redis Cache β β Audit Logs β
β (Database) β β (Session) β β (Security) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Node.js 18+
- Docker & Docker Compose
- PostgreSQL 15+
- n8n instance
# Clone the repository
git clone https://github.com/GroWAppAI/workflow-api.git
cd workflow-api
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Run the application
npm run start:dev
# Access the API
curl http://localhost:3000/health
# Build and run with Docker Compose
docker-compose up -d
# Or build manually
docker build -t workflow-api .
docker run -p 3000:3000 workflow-api
GET /health
# Returns application health status
GET /api/auth/keycloak/login
# Initiate Keycloak SSO login
GET /api/auth/keycloak/callback
# Handle OAuth callback
POST /api/workflow/create
# Create new workflow
GET /api/workflow/list
# List all workflows
POST /api/workflow/run
# Execute workflow
POST /api/policy/create
# Create approval policy
GET /api/policy/list
# List policies
POST /api/policy/approve
# Approve workflow
# Database
DATABASE_URL=postgresql://user:pass@localhost:5432/workflows
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=postgres
POSTGRES_PASSWORD=password
POSTGRES_DB=workflows
# Authentication
JWT_SECRET=your-jwt-secret
SESSION_SECRET=your-session-secret
# n8n Integration
N8N_URL=https://n8n.your-domain.com
N8N_API_KEY=your-n8n-api-key
# Security
NODE_ENV=production
LOG_LEVEL=info
# Run all tests
npm run test:all
# Unit tests only
npm run test:unit
# Integration tests
npm run test:integration
# E2E tests
npm run test:e2e
# With coverage
npm run test:coverage
- Latest:
ghcr.io/growappai/workflow-api:latest
- Main Branch:
ghcr.io/growappai/workflow-api:main
- Version Tags:
ghcr.io/growappai/workflow-api:v1.0.0
- AMD64 (x86_64) - Intel/AMD processors
- ARM64 (aarch64) - Apple Silicon, ARM servers
# Pull the latest image
docker pull ghcr.io/growappai/workflow-api:latest
# Run with environment variables
docker run -d \
-p 3000:3000 \
-e DATABASE_URL=postgresql://user:pass@host:5432/db \
-e JWT_SECRET=your-secret \
ghcr.io/growappai/workflow-api:latest
- π JWT Authentication - Secure token-based auth
- π‘οΈ SSO Integration - Keycloak enterprise authentication
- π Audit Logging - Complete activity tracking
- π Security Scanning - Automated vulnerability detection
- π Rate Limiting - API protection against abuse
- π CORS Protection - Cross-origin request security
# Run security audit
npm audit
# Run Snyk security scan
npx snyk test
# Check for vulnerabilities
npm audit --audit-level moderate
# Application health
GET /health
# Database health
GET /api/health/db
# n8n connectivity
GET /api/health/n8n
# System metrics
GET /api/health/metrics
- Structured Logging - JSON format with correlation IDs
- Performance Metrics - Response times, throughput
- Error Tracking - Comprehensive error reporting
- Health Checks - Automated system monitoring
Our GitHub Actions pipeline includes:
- π Code Quality - TypeScript, ESLint, security scans
- π§ͺ Testing - Unit, integration, and E2E tests
- ποΈ Building - Multi-platform Docker images
- π Security - Automated vulnerability scanning
- π¦ Deployment - Container registry publishing
src/
βββ auth/ # Authentication & authorization
βββ workflow/ # Core workflow management
βββ common/ # Shared utilities
βββ config/ # Configuration management
βββ main.ts # Application entry point
test/
βββ unit/ # Unit tests
βββ integration/ # Integration tests
βββ e2e/ # End-to-end tests
.github/
βββ workflows/ # CI/CD pipeline definitions
# Development
npm run start:dev # Start development server
npm run start:debug # Start with debugging
npm run build # Build application
npm run build:cli # Build CLI tool
# Testing
npm run test:unit # Unit tests
npm run test:integration # Integration tests
npm run test:e2e # E2E tests
npm run test:coverage # Coverage report
# Code Quality
npm run lint # ESLint check
npm run lint:fix # Auto-fix linting issues
npm run type-check # TypeScript compilation check
# Database
npm run db:migrate # Run migrations
npm run db:seed # Seed database
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Run tests
npm run test:all
- Commit your changes
git commit -m 'feat: add amazing feature'
- Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- TypeScript - Strict type checking enabled
- ESLint - Code quality and consistency
- Prettier - Code formatting
- Jest - Comprehensive testing
- Conventional Commits - Standardized commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
- π Documentation - API Docs
- π Issues - GitHub Issues
- π¬ Discussions - GitHub Discussions
- π§ Email - support@growapp.ai
- π Star the repository if you find it useful
- π Share with your network
- π‘ Suggest features via GitHub Issues
- π Report bugs with detailed information
- NestJS - Amazing framework for building scalable applications
- n8n - Powerful workflow automation platform
- PostgreSQL - Reliable database for enterprise applications
- Docker - Containerization for consistent deployments
- GitHub Actions - Automated CI/CD pipeline
Built with β€οΈ by the GroWAppAI Team