@ha-bits/base
v1.0.1
Published
Base - Habits Workflow Builder API Server with integrated UI
Downloads
20
Maintainers
Readme
@ha-bits/base
Base - Habits Workflow Builder API Server with integrated UI
Installation
npm install -g @ha-bits/base
# or
npx @ha-bits/baseUsage
Start the server:
npx @ha-bits/baseLocal Development
pnpm nx dev @ha-bits/baseEnvironment Variables
PORT- Server port (default: 3000)HOST- Server host (default: 0.0.0.0)HABITS_NODES_PATH- Custom path for downloaded modulesHABITS_TEMPLATES_PATH- Custom path for workflow templates
Features
- Module Management: Install, list, and manage workflow modules
- Module Execution: Test module actions directly
- Schema Extraction: Get action schemas for UI rendering
- Form Validation: Validate workflow configuration forms
- Workflow Templates: Access pre-built workflow templates
- Serve API: Start/stop workflow servers for testing
- Integrated UI: Built-in React web interface at
/habits/base
API Endpoints
All API endpoints are prefixed with /api (or /habits/base/api for UI compatibility).
Core
GET /api/- API info and status
Modules
GET /api/modules- List all available modulesPOST /api/modules/install- Install a modulePOST /api/modules/add- Add module to configurationGET /api/modules/check/:framework/:moduleName- Check if module is installedGET /api/modules/schema/:framework/:moduleName- Get module schema
Execution
POST /api/execute- Execute a module actionGET /api/status/:execution_id- Get execution status
Forms
POST /api/forms/validate- Validate form dataPOST /api/forms/verify-auth- Verify authentication credentialsPOST /api/forms/dynamic-options- Get dynamic dropdown options
Templates
GET /api/templates/:templateName/{*filePath}- Get template files
Serve (Workflow Server Management)
POST /api/serve/start- Start a workflow serverPOST /api/serve/stop- Stop running workflow serverGET /api/serve/status- Get server statusGET /api/serve/check- Check server healthPOST /api/serve/kill-process- Kill process by PIDPOST /api/serve/kill-port- Kill process on portPOST /api/serve/openapi- Get OpenAPI spec for running server
Security
GET /api/security/capabilities- Get security capabilitiesPOST /api/security/generate-policy- Generate security policy
UI Access
The integrated UI is served at /habits/base. It provides:
- Visual workflow builder
- Module browser and installer
- Form-based action configuration
- Template gallery
- Workflow server management
Technical Notes
Dynamic Module Loading
Base uses createRequire from Node.js's module API for loading modules at runtime, enabling compatibility with bundled code and dynamic path resolution.
Supported Frameworks
- Activepieces: Full support for Activepieces pieces
- n8n: Support for n8n nodes
- Bits: Custom lightweight modules
License
Apache-2.0
Repository
https://github.com/codenteam/habits
