Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

ontologic

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ontologic

Model What Matters: Domain Entities, Invariant, Domain Events, and much more.

latest
Source
npmnpm
Version
1.6.2
Version published
Maintainers
1
Created
Source

Ontologic

A TypeScript toolkit for building software that speaks your domain's language. Model your business rules, protect your invariants, and make failures explicit.

Documentation

Full documentation, guides, and examples are available at:

ontologic.site

Quick start

npm install ontologic

What's inside

  • Domain Entity — Entities that own their state and enforce their own rules
  • Invariants — Business rules checked on every state read, not just after specific operations
  • Domain Events — Immutable, versioned facts about what happened in your domain
  • Result Pattern — Typed domain failures as return values, not hidden exceptions
  • Repository — Persistence interface that saves entity state and events atomically
  • Event Bus — Types event bus that allows to publish and listen to your domain events
  • Message Relay — Built-in Outbox Pattern with in-memory component for fast prototyping
  • Workflows — Typed, resumable pipelines for multi-step business processes

Examples

Library Management App

A full-featured library management application built with NestJS, demonstrating all Ontologic features on a real-world use case:

sachacr/library-examples

Smaller examples

Focused examples (entity, invariants, events, use cases) are in the examples/ directory — a credit balance aggregate and an order lifecycle.

License

MIT

Keywords

DDD

FAQs

Package last updated on 20 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts