Skip to main content

Core concepts

This section contains a glossary of key terms and concepts related to configuring and administering Melezh-based solutions.

Project

The central object in Melezh is the Project - a file with an arbitrary extension that serves as an SQLite database with specific tables storing information about general settings and handler parameters for a particular Melezh-based solution.

Projects can only be created via the command line using the CreateProject command with a specified save path (see Command Line Interface). After creation, the project file will have a default configuration that can be modified later using either CLI commands or the web interface (requires project startup, see Web Interface).

Handler

A Handler is a project component responsible for processing requests at a specific URL path. Each handler is characterized by:

  • Key: A unique identifier used for configuration, deletion, or log retrieval. The key also equals the URL path where the handler accepts requests (e.g., a handler with key 0d17ad53c will accept requests at localhost:<port>/0d17ad53c)
  • HTTP Method: Determines which requests the handler can process. Three options are available: GET, POST with JSON body (JSON), and POST with form-data body (FORM). Form-data requests can use either application/x-www-form-urlencoded or multipart/form-data formats. Requests with mismatched formats will be rejected
  • Library/Command: Identifies the function set from either the Open Integration Package or a plugin extension, determining which module contains the core processing function
  • Function: The method name responsible for processing incoming requests. This can be either an OPI library function or an extension method. The function handles response generation based on processed data, not request parsing or logging

Argument

Arguments represent the expected request fields passed to the handler function. Arguments can either:

  • Be fully obtained from the request
  • Have default values set during configuration (allowing clients to omit certain parameters)

Each argument can be marked as strict, preventing request data from overwriting default values (without this flag, request data supersedes defaults).

Despite being stored as text, Melezh employs the same type conversion system used across the Open Integration Package:

  • Collections can be specified as JSON strings, URLs, or paths to server JSON files
  • Binary data can be provided as server file paths or URLs
  • Dates must use ISO 8601 format
  • Boolean values accept true/false strings