Skip to content

Protokol Platform

Protokol is a composable event-driven architecture platform. It provides data modeling, workflow automation, serverless functions, integrations, and a full app framework — all managed through a unified dashboard.


Projects & Environments

Every organization on Protokol is organized into projects. Each project represents a distinct application or business domain and contains its own components, workflows, integrations, apps, and users.

Each project supports two environments: Dev and Live. Resources like components, workflows, functions, and Forge apps can be developed and tested in Dev before being deployed to Live. This separation ensures changes are validated before they reach production.


IAM (Identity & Access Management)

Protokol provides a complete identity and access management system for controlling who can access what within a project.

  • Users — Manage user accounts that can log into the platform dashboard or interact with the API. Users are assigned roles that determine their level of access.
  • Roles & Permissions — Define granular roles with specific permissions scoped to components, functions, integrations, and other resources. Roles control read, write, delete, and custom operation access.
  • API Users — Service accounts with API keys for machine-to-machine communication. Used for external systems, CI/CD pipelines, and backend integrations that need programmatic access to the platform.

Components

Components are the core data layer of the platform. Each component defines a data model (schema) and serves as both a data store and a programmable resource.

  • Schema & IDL — Define the structure of your data using the Interface Definition Language (IDL) with full type safety.
  • Functions — Attach custom JavaScript logic directly to a component for data transformations, calculations, and cross-component orchestration.
  • Policies — Control access to component data with fine-grained rules that determine who can read, create, update, or delete records.
  • Protected Fields — Mark fields that cannot be modified through standard API calls, ensuring data integrity for sensitive attributes.
  • Aggregation — Run aggregation pipelines on component data for reporting, summaries, and analytics.
  • Extensions — Extend component behavior with additional capabilities beyond the default CRUD operations.
  • Update Operators — Use atomic update operators for precise field-level modifications without overwriting entire records.
  • Cache Behavior — Configure caching strategies to optimize read performance for frequently accessed data.

Workflows

Workflows are the automation engine of the platform. They allow you to define business logic as a series of connected nodes that execute in response to events.

Component Workflows

Tied to a specific component, these workflows react to data lifecycle events — record creation, updates, and deletions. They can also respond to custom events triggered via the API or other platform resources.

Project Workflows

Scoped to the project level, these workflows react to events emitted by integrations (e.g., a payment received, a delivery status change, an incoming email). They share the same node capabilities as component workflows but are triggered by integration events rather than component data changes.

Workflow Capabilities

  • Visual editor — Build workflows by connecting nodes in a drag-and-drop interface.
  • Expression context — Access event data, component records, and environment variables within node expressions.
  • Dry run — Test workflows with custom input data and inspect the result at every stage before going live.
  • Workflow history — View the full execution history of every workflow run, including input data, node-by-node results, and error details.
  • Retryable errors — Mark errors as retryable so failed workflow runs can be re-executed without manual intervention.

Functions

Standalone serverless HTTP endpoints scoped to a project. Unlike component functions, these are independent — they receive HTTP requests and return HTTP responses.

  • Accept request body, query parameters, headers, and file uploads.
  • Return JSON, HTML, XML, or redirects.
  • Support typed input/output signatures with automatic validation.
  • Can be versioned across Dev and Live environments.
  • Optionally exposed as public (unauthenticated) endpoints via signed URLs.

Forge Apps

Forge is the app framework for building custom UI on the platform. Forge apps are manifest-driven, built with React and TypeScript, and deployed to the platform CDN.

  • App Manifest — Every Forge app is defined by a ptkl.config.js that declares identity, entry points, lifecycle scripts, and permissions.
  • Views — Apps expose named views that can be embedded anywhere in the platform via the AppView component, rendered in isolated Shadow DOM to prevent style conflicts.
  • Lifecycle Scripts — Define install and uninstall hooks to set up or tear down resources when an app is added to a project.
  • Cross-App Communication — Apps communicate with each other through a Pub/Sub event system for decoupled, composable UI.
  • Custom Domains — Forge apps can be served on custom domains for public-facing experiences.
  • Security — Enforce trusted sources to control which apps and origins can interact with the platform.

Ratchet (External Databases)

Ratchet connects external databases to the platform, providing access to data that lives outside of Protokol.

  • Supports MySQL, PostgreSQL, MongoDB, and BigQuery.
  • Define parameterized queries that can be executed from workflows, functions, or the SDK.
  • Useful for connecting legacy systems or business intelligence databases without migrating data.

Resource Resolver

A unified data-fetching mechanism that resolves data from components or integrations using PRN (Protokol Resource Name) strings.

  • Single API call to fetch data from any resource using a PRN path.
  • Supports Go text/template formatting for shaping response data.
  • Eliminates the need for multiple API calls when composing data from different sources.

Integrations

The platform includes a set of built-in integrations that extend its capabilities:

  • NBS — National Bank of Serbia API connectivity for IPS QR code generation, QR validation, and company lookup by VAT number.
  • Serbia Ministry of Finance — Fiscal compliance integration for Serbian tax regulations.
  • DMS (Protokol Media) — Document management with file storage, document templates, HTML-to-PDF generation, PDF form filling, and format conversions.
  • Payments — Online payment processing with full transaction lifecycle (authorize, capture, void, refund), payment links, and card tokenization.
  • Deliveries — Shipment and delivery tracking with order lifecycle management and status change events.
  • Mail — Transactional email sending with HTML support, attachments, auto-retry, and rate limiting.
  • Inbox — Connect external email accounts via IMAP/SMTP and process incoming/outgoing mail through workflows.

Each integration emits events that can trigger project workflows, enabling end-to-end automation.


Templates

Templates are predefined project configurations that bundle components, workflows, integrations, and apps together. They provide a starting point for common business use cases, allowing you to get a fully functional project running quickly and customize it from there.


Developer Console

A browser-based JavaScript playground with full SDK access. Use it for data exploration, query prototyping, quick automation scripts, and testing integrations — no setup required.


SDK & Toolkit

  • TypeScript SDK — The runtime library used in functions, expressions, and app code to interact with the platform API.
  • Toolkit CLI (ptkl) — A developer command-line tool for managing projects, deploying Forge apps, building components, managing roles and users, generating TypeScript types from IDL, and validating schemas.