Common Features

Common Feature Logic

Shared infrastructure-free logic used across multiple generation features.

Overview

The Common directory contains utilities and cross-cutting helpers that facilitate the processing pipeline across all document block types. Because the MILTON.DocumentGenerator adheres to a strict architectural boundary—it owns no domain models and possesses no direct database access—the components here strictly handle mapping, payload deserialization, and generic AI configurations.

Core Components

AiPresetMapping

Provides mapping logic from system-level block preset settings to IAIService compatible inputs.

  • When the API prepares a generation payload, it decrypts the LLM API Keys (stored in the relational database as ProjectConfig.LlmPresetsJson).
  • This class maps those specific payloads into generic technical configurations (AiPresetConfig) that the IAIService in MILTON.Platform can natively consume.
  • This ensures no domain-level encryption keys or persistence types bleed into the core logic of the Generator.

Business Intent

The intent of the Common feature is to centralize any shared logic that strictly adheres to the pure, functional core paradigm of the Document Generator. Code in this namespace must remain fully stateless and unaware of the database (db-free).

0 items under this folder.