MCPcopy Index your code
hub / github.com/deskree-inc/blok

github.com/deskree-inc/blok @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
672 symbols 2,016 edges 245 files 28 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

GitHub Repo stars GitHub forks GitHub Issues or Pull Requests GitHub License GitHub contributors Discord

Logo

Blok

Blok  is an open-source framework that enables developers to build lightweight, modular, and scalable backend applications using Blok.



<a href="https://blok.build/"><strong>Explore the docs »</strong></a>






<a href="https://github.com/deskree-inc/blok/issues/new?assignees=&labels=&projects=&template=bug_report.md&title=">Report Bug</a>
·
<a href="https://github.com/deskree-inc/blok/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=">Request Feature</a>

Table of Contents

  1. About The Project
  2. Getting Started
  3. Running Workflows
  4. Contributing
  5. License
  6. Contact

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.

(back to top)

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

(back to top)

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

(back to top)

Running Workflows

To run the created workflow locally:

  1. Start the runner via npm run dev
  2. 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

(back to top)

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!

  1. Fork the Project
  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

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:

  1. Fork the project

  2. Clone the project to your local machine

   git clone https://github.com/deskree-inc/blok.git
  1. Navigate to the project directory
cd Blok
  1. Add the upstream remote
git remote add upstream https://github.com/deskree-inc/blok.git
  1. Run the application in development mode
npx mintlify dev
  1. Create a new branch for your changes
git checkout -b "name-of-your-branch"
  1. Stage your changes
  git add .
  1. Commit the changes
git commit -m "first_commit"
  1. Push your changes
git push origin name-of-your-branch
  1. Create a pull request

License

Distributed under the Apache License 2.0. See LICENSE.txt for more information.

(back to top)

Contact

Discord: Blok

X: @nanoservice_ts

Reddit: r/nanoservice

Project Link: https://github.com/deskree-inc/blok

(back to top)

Acknowledgments

Some awesome tools used in the project:

(back to top)

Extension points exported contracts — how you extend this code

INanoServiceResponse (Interface)
(no doc) [1 implementers]
core/runner/src/NanoServiceResponse.ts
SearchOptions (Interface)
(no doc)
packages/cli/src/commands/search/docs.ts
ParamsDictionary (Interface)
(no doc)
core/shared/src/types/ParamsDictionary.ts
IConditions (Interface)
(no doc)
core/workflow-helper/src/types/StepOpts.ts
WeatherResponse (Interface)
(no doc)
triggers/http/src/nodes/examples/mastra-agent/tool.ts
ParamsDictionary (Interface)
(no doc)
core/runner/src/types/ParamsDictionary.ts
IndexWord (Interface)
(no doc)
packages/cli/src/commands/search/docs.ts
JsonLikeObject (Interface)
(no doc)
core/runner/src/types/JsonLikeObject.ts

Core symbols most depended-on inside this repo

log
called by 118
core/runner/src/DefaultLogger.ts
get
called by 57
core/runner/src/LocalStorage.ts
setSuccess
called by 36
core/runner/src/NanoServiceResponse.ts
stop
called by 31
core/shared/src/Metrics.ts
setCode
called by 29
core/shared/src/GlobalError.ts
setError
called by 27
core/runner/src/NanoServiceResponse.ts
error
called by 27
core/runner/src/DefaultLogger.ts
toString
called by 27
core/shared/src/GlobalError.ts

Shape

Method 348
Class 187
Function 104
Interface 20
Enum 11
Route 2

Languages

TypeScript79%
Python21%

Modules by API surface

runtimes/python3/tests/test_node_base.py13 symbols
packages/cli/src/services/posthog.ts13 symbols
core/runner/src/Configuration.ts12 symbols
packages/cli/src/commands/search/docs.ts11 symbols
triggers/grpc/src/GRpcTrigger.ts10 symbols
sdk/javascript/nanosdk.min.js10 symbols
sdk/javascript/nanosdk.js10 symbols
packages/cli/src/services/local-token-manager.ts10 symbols
packages/cli/src/commands/search/indexer.ts10 symbols
triggers/grpc/src/NanoSDK.ts9 symbols
triggers/grpc/src/MessageDecode.ts9 symbols
runtimes/python3/tests/test_nanoservice.py9 symbols

Datastores touched

(mongodb)Database · 1 repos

For agents

$ claude mcp add blok \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact