adonisjs-value-objects
CommunityImmutable domain value objects for AdonisJS apps.
Authoromakei
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Domain concepts in AdonisJS apps often leak mutable state and scattered validation logic, making it hard to guarantee consistency across layers. Immutable value objects enforce invariants, encapsulate domain rules, and provide predictable behavior.
Core Features & Use Cases
- Immutability: readonly properties and private constructors prevent mutation after creation.
- Static factories: validated constructors ensure safe instantiation.
- Domain logic encapsulation: arithmetic and rules live inside the value objects (e.g., Money, EmailAddress, Coordinate).
- Value equality and serialization: equality by value and ready-to-persist representations for Lucid.
- Real-world use: modeling money, emails, and coordinates in AdonisJS domain models.
Quick Start
Create a Money value with Money.fromDollars(29.99) and compare it to another Money using equals.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: adonisjs-value-objects Download link: https://github.com/omakei/adonisjs-architecture-skill/archive/main.zip#adonisjs-value-objects Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.