Blok
Blok is an open-source framework that enables developers to build lightweight, modular, and scalable backend applications using nanoservices.
Install / Use
/learn @deskree-inc/BlokREADME
<a id="readme-top"></a>
About The Project
Blok is an open-source framework designed to simplify backend development by enabling developers to implement the modular architecture effortlessly. Built with TypeScript, this framework helps you create lightweight, modular, and scalable backend systems that adhere to the Single Responsibility Principle (SRP).
By combining an intuitive API, programmatic workflow orchestration, and powerful tooling, blok allows you to focus on writing business logic while abstracting the complexities of infrastructure, scaling, and resource management.
Key Highlights
- Modular Architecture: Divide backend logic into reusable, single-responsibility units that are easy to manage, scale, and debug.
- Developer-Friendly Tools: Use TypeScript-powered APIs, templates, and a CLI for quick project setup and workflow creation.
- Efficient and Scalable: Built to support dynamic workflows with containerized execution and independent scalability for each blok.
- Community-Driven: Collaborate, share, and benefit from a growing library of community-created nodes and workflows.
Why Blok?
Modern backend development often suffers from over-engineered solutions, resource inefficiencies, and complex architectures. Blok addresses these pain points by offering:
- Modular Design: Reuse components across projects, reducing redundancy and improving productivity.
- Simplified Scaling: Focus on scaling individual bloks based on real-time demands, optimizing resource usage.
- Flexibility: Build workflows programmatically or using pre-built templates for common tasks like HTTP APIs, event processing, and scheduled jobs.
With Blok, backend development becomes modular, predictable, and future-proof, making it ideal for both small projects and large-scale systems.
<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- GETTING STARTED -->Getting Started
To start developing your project, simply run:
npx nanoctl@latest create project
And follow the instructions of the CLI
For more information and examples, visit Getting Started
<p align="right">(<a href="#readme-top">back to top</a>)</p>Creating Nodes & Workflows
- Node is a small functioning unit designed to perform a specific task within a workflow
- Workflow is a collection of nodes group together in a certain sequence to create a piece of business logic that starts with a trigger
- Trigger is an event or condition that starts the execution of a workflow
For a step-by-step example of how to use nodes, workflows, and triggers, visit Quickstart
<p align="right">(<a href="#readme-top">back to top</a>)</p>Running Workflows
To run the created workflow locally:
- Start the runner via
npm run dev - Use tools like POSTMAN, curl, or any HTTP client to test workflows at
http://localhost:4000/{workflow-name}
For more examples, please refer to the Executing Workflows
<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- CONTRIBUTING -->Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Contributing to the Blok Documentation
Prerequisites
Make sure you have the following installed on your system:
To contribute to the Blok documentation, follow these steps:
-
Fork the project
- Go to the Blok repository and fork it to your GitHub account.
-
Clone the project to your local machine
git clone https://github.com/deskree-inc/blok.git
- Navigate to the project directory
cd Blok
- Add the upstream remote
git remote add upstream https://github.com/deskree-inc/blok.git
- Run the application in development mode
npx mintlify dev
- Create a new branch for your changes
git checkout -b "name-of-your-branch"
- Stage your changes
git add .
- Commit the changes
git commit -m "first_commit"
- Push your changes
git push origin name-of-your-branch
- Create a pull request
License
Distributed under the Apache License 2.0. See LICENSE.txt for more information.
Contact
Discord: Blok
Reddit: r/nanoservice
Project Link: https://github.com/deskree-inc/blok
<p align="right">(<a href="#readme-top">back to top</a>)</p> <!-- ACKNOWLEDGMENTS -->Acknowledgments
Some awesome tools used in the project:
<p align="right">(<a href="#readme-top">back to top</a>)</p>