domain-modeling

Selects TypeScript constructs for DDD and hexagonal architecture domain modeling.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/jzallen/dashboard-chat --skill domain-modeling-jzallen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-modeling
Source: https://github.com/jzallen/dashboard-chat/tree/main/.claude/skills/domain-modeling
Command: npx skills add https://github.com/jzallen/dashboard-chat --skill domain-modeling-jzallen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill assists in choosing the appropriate TypeScript constructs (type, interface, class, Zod) for domain modeling in a DDD/hexagonal architecture, ensuring a clear and maintainable codebase.

Core Features & Use Cases

  • Decision Support: Helps in selecting the right tool for each domain concept (entity, value object, port, use case, command, DTO).
  • Architecture Alignment: Ensures adherence to DDD/hexagonal principles by mapping tools to architectural layers.
  • Quick Reference: Provides a quick mapping of DDD building blocks to corresponding tools.

Quick Start

Use the domain-modeling skill to model a new entity in TypeScript by asking "What is the entity's identity and lifecycle?"

Frequently Asked Questions about domain-modeling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose TypeScript constructs for domain modeling in DDD?

Choosing TypeScript constructs for domain modeling in DDD involves mapping building blocks like entities, value objects, and ports to specific tools such as `class`, `type`, or Zod. This ensures architectural alignment and maintainability.

What TypeScript type should I use for a DDD value object?

For a DDD value object, TypeScript types like `type` or Zod schemas are typically selected to ensure immutability and structural validation. This choice supports clear domain modeling without the overhead of class inheritance.

How does hexagonal architecture map TypeScript tools to domain layers?

Hexagonal architecture maps TypeScript tools to domain layers by assigning `class` to entities and `interface` to ports. This separation ensures domain logic remains isolated from infrastructure concerns.

Do I need to know Zod for TypeScript domain modeling?

Knowing Zod is not strictly required but is highly beneficial for TypeScript domain modeling. Zod provides runtime validation capabilities that complement static types, ensuring data integrity for commands and DTOs.

When should I use an interface versus a type for DDD ports?

Use `interface` for DDD ports when you need declaration merging or contract extension, and `type` for strict structural definitions. Selecting the right construct ensures proper hexagonal architecture boundary enforcement.

What is the best way to model a new entity in TypeScript?

The best way to model a new entity in TypeScript is by defining its identity and lifecycle using a `class`. This approach encapsulates domain behavior and enforces invariants within your DDD architecture.