Creating nodes
Note: While we are growing the list of built-in nodes, we will also be providing a space for you to submit your own nodes for others to use without shipping that as a a part of the framework. Check out our Roadmap for more information.
**Guide to Contributing Built-in Nodes in Blok **
Note: Make sure you follow the recommendations on how to set up local environment and steps to complete before committing your changes. To learn more visit
Built-in nodes are predefined, reusable nanoservices that provide common functionality for workflows. This guide explains how to create, test, and contribute new built-in nodes to the framework.
What Are Built-in Nodes?
Nodes are the smallest executable units in nanoservice-ts workflows. They perform specific tasks, such as:
- API Requests (e.g., fetch data from an external service)
- Data Transformation (e.g., JSON parsing, filtering, formatting)
- Database Operations (e.g., Postgres queries)
- Messaging & Events (e.g., sending messages to Kafka, RabbitMQ)
Nodes are stored in the /nodes directory and can be reused across multiple workflows.
Getting Started
Clone the repository and navigate to the nodes directory:
git clone https://github.com/deskree-inc/nanoservice-ts.git
cd nodesAdding a New Built-in Node
- Create a new directory in
/nodes - Use any existing nodes as a starting template or build your own
- Make sure you are using the NanoService class as the base class
- Document your code, create interface definitions, and make sure you follow ESlint rules
- Make sure you have tests for your trigger and you achieve full coverage after running
pnpm test - Add
config.jsonfile describing your node use and structure. For more information, visit config.json
Submitting a Pull Request
- Follow Branch Naming Convention
git checkout -b feature/add-my-new-node - Ensure Code Quality
npm run lint npm test - Submit a PR with:
- A clear description of the node.
- Tests and configuration examples.
- Proper documentation updates.
Best Practices
✅ Keep nodes lightweight and efficient.
✅ Ensure proper error handling and logging.
✅ Write clear documentation and tests.
✅ Follow the project's TypeScript style guide.
Final Notes
Built-in nodes simplify workflow development and improve code reusability in nanoservice-ts. By contributing new nodes, you help expand the framework’s capabilities. If you have any questions, open an issue or join the discussion! 🚀