mafralp@blueprint-engine:~$

Blueprint Engine

A TypeScript library for server-defined forms and validated commands, designed for configurable B2B and multi-tenant product flows.

GitHub · npm · Article

I am building Blueprint Engine to prevent product variations — fields, constraints, options, and nested configurations — from becoming customer-specific conditionals scattered across controllers, pages, and persistence. The input contract is declared once in the backend, turned into a JSON schema for any client to render, and reused to validate submitted payloads.

What I built

Product capabilities

Declarative form contracts
A DTO describes text, number, boolean, select and upload fields, along with nested objects. The same contract drives input UX and backend validation.

Reusable schemas
The engine produces schemas with schemaVersion, properties, labels, required fields, numeric bounds and enums. Clients do not need prior knowledge of each product’s configuration.

Defensive validation
The parser rejects unknown keys at every level, incorrect types, invalid selections and out-of-range numbers. Empty optional values remain unset; false remains a valid boolean value.

Domain composition
Cake topping configuration and supplier business addresses are different nested contracts using the same core. Adding a product flow means creating a DTO and registering it in the host catalog.

Clear responsibility boundaries
The package does not implement UI, databases, authentication, authorization, binary uploads or tenancy. The host application resolves identity, context and allowed blueprints; the engine owns only contract and validation.

Technical decisions worth exploring

Architecture

[ Host application ]
 authentication · tenant/context policy · product catalog
                  │
                  ├── authorized DTO ──> schemaFor() ──> [ Web / Mobile / Native renderer ]
                  │                                           │
                  └────────────────── parse(DTO, input) <─────┘
                                      │
                         validated command or structured errors

Stack

Core
TypeScript, ES modules, decorators, Node.js 18+, and a versioned JSON schema contract.

Quality
Native node:test tests, contract fixtures, supported-component coverage, schema validation, and end-to-end tests for the example servers.

Demonstrations
Node.js HTTP server, framework-free JavaScript web renderer, Cake Shop, Supplier Onboarding and Blueprint Gallery.

Status

@blueprint-engine/core is currently at version 0.2.0 and remains experimental until 1.0. Breaking changes are still possible during 0.x and should be documented through the changelog.

Type cd .. to return home.

mafralp@blueprint-engine:~$