Programming Search⌘K

Patterncore

Domain model

Also called Domain Model, domain model pattern, rich domain model, object model of the domain.

A domain model is a set of objects for the concepts of the business, where each object holds its data and the rules that use the data.

Family
architectural
Intent
An object model of the domain that incorporates both behavior and data.

Intent

A domain model is "An object model of the domain that incorporates both behavior and data."1 There is a class for each concept of the business, such as customer, order and product. Each object holds its data and the rules that use the data. The rest of the application asks the objects to do the work. It is one of the three patterns for domain logic in Fowler's book, with Transaction script and Table module.2

Problem

Fowler: "At its worst business logic can be very complex. Rules and logic describe many different cases and slants of behavior, and it's this complexity that objects were designed to work with."1

When the rules are in procedures, as in a Transaction script design, each procedure has conditions on the kind of customer, the state of the order and the type of product. A new kind of customer means a change in each procedure that has such a condition. The rules about one concept are spread across many procedures, and a rule that two procedures need is often copied.

Solution

"A Domain Model creates a web of interconnected objects, where each object represents some meaningful individual, whether as large as a corporation or as small as a single line on an order form."1

The parts are:

  • Domain objects. A class for each concept. The data of an object is private, and its methods are the operations of the business, such as add a line, place an order or calculate a total.
  • Associations. References between the objects, such as from an order to its customer and its lines.
  • Polymorphism. Each variant of a concept is a subclass or an implementation of an interface. A gold customer and a staff customer each know their own discount, so the order does not test the kind of customer.
  • Invariants. The objects check their own rules. A placed order refuses a new line, whichever code asks.
  • A mapping to the database. The objects do not fit the tables directly, so a domain model needs a mapping. For a simple model, each object can save itself, as in Active Record. For a complex model, a Data Mapper keeps the objects independent of the database.
  Order ----------------> Customer (interface: discount)
    | add(), place(),         ^          ^          ^
    | total()                 |          |          |
    v                     Regular      Gold       Staff
  OrderLine ---> Product
    amount()

The following program has the smallest domain object. The account holds its balance and the rule for a withdrawal.

class Account:
    # The data and the rules that use it are in one object.
    def __init__(self, balance, overdraft=0):
        self.balance = balance
        self.overdraft = overdraft

    def withdraw(self, amount):
        if amount > self.balance + self.overdraft:
            raise ValueError("refused: over the limit")
        self.balance -= amount


acct = Account(100, overdraft=50)
acct.withdraw(120)
print("balance", acct.balance)
try:
    acct.withdraw(40)
except ValueError as e:
    print(e)
Output
balance -20
refused: over the limit

Example

Each example file is a small shop. Customer has three kinds: a regular customer has no discount, a gold customer gets 10 percent off an order of 100.00 or more, and staff get 20 percent off each order. Order keeps its lines, calculates its subtotal and total, and asks its customer for the discount. It refuses a new line after it is placed, and it refuses to be placed with no lines. OrderLine refuses a quantity that is not positive. The program builds three orders, prints their totals, and then breaks each rule once.

PythonGitHub
class DomainError(Exception):
    pass


def cents(n):
    return f"{n // 100}.{n % 100:02d}"


# Each kind of customer knows its own discount rule.
class Customer:
    kind = "regular"

    def __init__(self, name):
        self.name = name

    def discount(self, subtotal):
        return 0


class GoldCustomer(Customer):
    kind = "gold"

    def discount(self, subtotal):
        return subtotal // 10 if subtotal >= 10000 else 0


class StaffCustomer(Customer):
    kind = "staff"

    def discount(self, subtotal):
        return subtotal // 5


class Product:
    def __init__(self, name, price_cents):
        self.name = name
        self.price_cents = price_cents


class OrderLine:
    def __init__(self, product, qty):
        if qty <= 0:
            raise DomainError(f"bad quantity {qty}")
        self.product = product
        self.qty = qty

    def amount(self):
        return self.qty * self.product.price_cents


class Order:
    def __init__(self, number, customer):
        self.number = number
        self.customer = customer
        self._lines = []
        self._placed = False

    def add(self, product, qty):
        if self._placed:
            raise DomainError(f"order {self.number} is placed, so it takes no new lines")
        self._lines.append(OrderLine(product, qty))

    def place(self):
        if not self._lines:
            raise DomainError(f"order {self.number} has no lines")
        self._placed = True

    def subtotal(self):
        return sum(line.amount() for line in self._lines)

    def total(self):
        subtotal = self.subtotal()
        return subtotal - self.customer.discount(subtotal)


lamp, desk, pen = Product("lamp", 2500), Product("desk", 7500), Product("pen", 500)
orders = [
    Order(1, GoldCustomer("Ann")),
    Order(2, Customer("Bob")),
    Order(3, StaffCustomer("Cy")),
]
orders[0].add(lamp, 2)
orders[0].add(desk, 1)
for order in orders[1:]:
    order.add(lamp, 1)
    order.add(pen, 3)
for order in orders:
    order.place()
    print(f"order {order.number} for {order.customer.name} ({order.customer.kind}): "
          f"subtotal {cents(order.subtotal())}, total {cents(order.total())}")
for action in (lambda: orders[0].add(pen, 1), lambda: Order(4, Customer("Di")).place(),
               lambda: Order(5, Customer("Ed")).add(pen, 0)):
    try:
        action()
    except DomainError as e:
        print("error:", e)
Output
order 1 for Ann (gold): subtotal 125.00, total 112.50
order 2 for Bob (regular): subtotal 40.00, total 40.00
order 3 for Cy (staff): subtotal 40.00, total 32.00
error: order 1 is placed, so it takes no new lines
error: order 4 has no lines
error: bad quantity 0
  • Verdict: idiom. Each kind of customer is a subclass that overrides discount, so Order.total has no condition on the kind. The order keeps its lines in _lines; the leading underscore tells other code not to change the list directly, but Python does not enforce it.
  • The rules raise DomainError. The checks are in the objects, so every caller gets them.
JavaGitHub
import java.util.ArrayList;
import java.util.List;

public class Main {
    static class DomainError extends RuntimeException {
        DomainError(String message) { super(message); }
    }

    static String cents(long n) {
        return String.format("%d.%02d", n / 100, n % 100);
    }

    // Each kind of customer knows its own discount rule.
    static class Customer {
        final String name;
        Customer(String name) { this.name = name; }
        String kind() { return "regular"; }
        long discount(long subtotal) { return 0; }
    }

    static class GoldCustomer extends Customer {
        GoldCustomer(String name) { super(name); }
        @Override String kind() { return "gold"; }
        @Override long discount(long subtotal) { return subtotal >= 10000 ? subtotal / 10 : 0; }
    }

    static class StaffCustomer extends Customer {
        StaffCustomer(String name) { super(name); }
        @Override String kind() { return "staff"; }
        @Override long discount(long subtotal) { return subtotal / 5; }
    }

    record Product(String name, long priceCents) {}

    record OrderLine(Product product, int qty) {
        OrderLine {
            if (qty <= 0) throw new DomainError("bad quantity " + qty);
        }
        long amount() { return qty * product.priceCents(); }
    }

    static class Order {
        final int number;
        final Customer customer;
        private final List<OrderLine> lines = new ArrayList<>();
        private boolean placed;

        Order(int number, Customer customer) {
            this.number = number;
            this.customer = customer;
        }

        void add(Product product, int qty) {
            if (placed) throw new DomainError("order " + number + " is placed, so it takes no new lines");
            lines.add(new OrderLine(product, qty));
        }

        void place() {
            if (lines.isEmpty()) throw new DomainError("order " + number + " has no lines");
            placed = true;
        }

        long subtotal() {
            return lines.stream().mapToLong(OrderLine::amount).sum();
        }

        long total() {
            long subtotal = subtotal();
            return subtotal - customer.discount(subtotal);
        }
    }

    public static void main(String[] args) {
        Product lamp = new Product("lamp", 2500), desk = new Product("desk", 7500), pen = new Product("pen", 500);
        List<Order> orders = List.of(
                new Order(1, new GoldCustomer("Ann")),
                new Order(2, new Customer("Bob")),
                new Order(3, new StaffCustomer("Cy")));
        orders.get(0).add(lamp, 2);
        orders.get(0).add(desk, 1);
        for (Order order : orders.subList(1, 3)) {
            order.add(lamp, 1);
            order.add(pen, 3);
        }
        for (Order order : orders) {
            order.place();
            System.out.println("order " + order.number + " for " + order.customer.name + " (" + order.customer.kind()
                    + "): subtotal " + cents(order.subtotal()) + ", total " + cents(order.total()));
        }
        List<Runnable> actions = List.of(
                () -> orders.get(0).add(pen, 1),
                () -> new Order(4, new Customer("Di")).place(),
                () -> new Order(5, new Customer("Ed")).add(pen, 0));
        for (Runnable action : actions) {
            try {
                action.run();
            } catch (DomainError e) {
                System.out.println("error: " + e.getMessage());
            }
        }
    }
}
Output
order 1 for Ann (gold): subtotal 125.00, total 112.50
order 2 for Bob (regular): subtotal 40.00, total 40.00
order 3 for Cy (staff): subtotal 40.00, total 32.00
error: order 1 is placed, so it takes no new lines
error: order 4 has no lines
error: bad quantity 0
  • Verdict: idiom. OrderLine is a record whose compact constructor checks the quantity. Order keeps its list private, so no other class can add a line without the check in add. The customer subclasses override discount.
  • In a Spring or Jakarta EE application, JPA would map these classes to tables, and the rules would stay in the classes.
JavaScriptGitHub
class DomainError extends Error {}

const cents = (n) => `${Math.floor(n / 100)}.${String(n % 100).padStart(2, "0")}`;

// Each kind of customer knows its own discount rule.
class Customer {
  constructor(name) { this.name = name; }
  get kind() { return "regular"; }
  discount(subtotal) { return 0; }
}

class GoldCustomer extends Customer {
  get kind() { return "gold"; }
  discount(subtotal) { return subtotal >= 10000 ? Math.floor(subtotal / 10) : 0; }
}

class StaffCustomer extends Customer {
  get kind() { return "staff"; }
  discount(subtotal) { return Math.floor(subtotal / 5); }
}

class Product {
  constructor(name, priceCents) { this.name = name; this.priceCents = priceCents; }
}

class OrderLine {
  constructor(product, qty) {
    if (qty <= 0) throw new DomainError(`bad quantity ${qty}`);
    this.product = product;
    this.qty = qty;
  }
  amount() { return this.qty * this.product.priceCents; }
}

class Order {
  #lines = [];
  #placed = false;
  constructor(number, customer) { this.number = number; this.customer = customer; }

  add(product, qty) {
    if (this.#placed) throw new DomainError(`order ${this.number} is placed, so it takes no new lines`);
    this.#lines.push(new OrderLine(product, qty));
  }

  place() {
    if (this.#lines.length === 0) throw new DomainError(`order ${this.number} has no lines`);
    this.#placed = true;
  }

  subtotal() { return this.#lines.reduce((sum, line) => sum + line.amount(), 0); }

  total() {
    const subtotal = this.subtotal();
    return subtotal - this.customer.discount(subtotal);
  }
}

const lamp = new Product("lamp", 2500), desk = new Product("desk", 7500), pen = new Product("pen", 500);
const orders = [new Order(1, new GoldCustomer("Ann")), new Order(2, new Customer("Bob")), new Order(3, new StaffCustomer("Cy"))];
orders[0].add(lamp, 2);
orders[0].add(desk, 1);
for (const order of orders.slice(1)) {
  order.add(lamp, 1);
  order.add(pen, 3);
}
for (const order of orders) {
  order.place();
  console.log(`order ${order.number} for ${order.customer.name} (${order.customer.kind}): ` +
    `subtotal ${cents(order.subtotal())}, total ${cents(order.total())}`);
}
for (const action of [() => orders[0].add(pen, 1), () => new Order(4, new Customer("Di")).place(),
  () => new Order(5, new Customer("Ed")).add(pen, 0)]) {
  try {
    action();
  } catch (e) {
    if (!(e instanceof DomainError)) throw e;
    console.log("error:", e.message);
  }
}
Output
order 1 for Ann (gold): subtotal 125.00, total 112.50
order 2 for Bob (regular): subtotal 40.00, total 40.00
order 3 for Cy (staff): subtotal 40.00, total 32.00
error: order 1 is placed, so it takes no new lines
error: order 4 has no lines
error: bad quantity 0
  • Verdict: idiom. The order keeps its lines and its state in private fields (#lines, #placed), so only its methods can change them. Each kind of customer is a subclass with its own discount and kind.
package main

import (
	"errors"
	"fmt"
)

type domainError struct{ msg string }

func (e *domainError) Error() string { return e.msg }

func fail(format string, args ...any) error { return &domainError{fmt.Sprintf(format, args...)} }

func cents(n int) string { return fmt.Sprintf("%d.%02d", n/100, n%100) }

// Customer is the interface of each kind of customer. Each kind knows its own discount rule.
type Customer interface {
	Name() string
	Kind() string
	Discount(subtotal int) int
}

type person struct{ name string }

func (p person) Name() string { return p.name }

type regular struct{ person }

func (regular) Kind() string       { return "regular" }
func (regular) Discount(_ int) int { return 0 }

type gold struct{ person }

func (gold) Kind() string { return "gold" }
func (gold) Discount(subtotal int) int {
	if subtotal >= 10000 {
		return subtotal / 10
	}
	return 0
}

type staff struct{ person }

func (staff) Kind() string              { return "staff" }
func (staff) Discount(subtotal int) int { return subtotal / 5 }

type Product struct {
	Name       string
	PriceCents int
}

type orderLine struct {
	product Product
	qty     int
}

// Order keeps its lines and its state private, so only its methods can change them.
type Order struct {
	Number   int
	Customer Customer
	lines    []orderLine
	placed   bool
}

func (o *Order) Add(p Product, qty int) error {
	if o.placed {
		return fail("order %d is placed, so it takes no new lines", o.Number)
	}
	if qty <= 0 {
		return fail("bad quantity %d", qty)
	}
	o.lines = append(o.lines, orderLine{p, qty})
	return nil
}

func (o *Order) Place() error {
	if len(o.lines) == 0 {
		return fail("order %d has no lines", o.Number)
	}
	o.placed = true
	return nil
}

func (o *Order) Subtotal() int {
	sum := 0
	for _, l := range o.lines {
		sum += l.qty * l.product.PriceCents
	}
	return sum
}

func (o *Order) Total() int {
	s := o.Subtotal()
	return s - o.Customer.Discount(s)
}

func main() {
	lamp, desk, pen := Product{"lamp", 2500}, Product{"desk", 7500}, Product{"pen", 500}
	orders := []*Order{
		{Number: 1, Customer: gold{person{"Ann"}}},
		{Number: 2, Customer: regular{person{"Bob"}}},
		{Number: 3, Customer: staff{person{"Cy"}}},
	}
	_ = orders[0].Add(lamp, 2)
	_ = orders[0].Add(desk, 1)
	for _, o := range orders[1:] {
		_ = o.Add(lamp, 1)
		_ = o.Add(pen, 3)
	}
	for _, o := range orders {
		_ = o.Place()
		fmt.Printf("order %d for %s (%s): subtotal %s, total %s\n",
			o.Number, o.Customer.Name(), o.Customer.Kind(), cents(o.Subtotal()), cents(o.Total()))
	}
	actions := []func() error{
		func() error { return orders[0].Add(pen, 1) },
		func() error { return (&Order{Number: 4, Customer: regular{person{"Di"}}}).Place() },
		func() error { return (&Order{Number: 5, Customer: regular{person{"Ed"}}}).Add(pen, 0) },
	}
	for _, action := range actions {
		var de *domainError
		if err := action(); errors.As(err, &de) {
			fmt.Println("error:", de)
		}
	}
}
Output
order 1 for Ann (gold): subtotal 125.00, total 112.50
order 2 for Bob (regular): subtotal 40.00, total 40.00
order 3 for Cy (staff): subtotal 40.00, total 32.00
error: order 1 is placed, so it takes no new lines
error: order 4 has no lines
error: bad quantity 0
  • Verdict: idiom. Go has no inheritance, so Customer is an interface, and each kind of customer is a type that embeds person for the name. The fields lines and placed start with a lower-case letter, so code in other packages can change them only through the methods.
RustGitHub
use std::fmt;

#[derive(Debug)]
struct DomainError(String);

impl fmt::Display for DomainError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.0)
    }
}

fn cents(n: i64) -> String {
    format!("{}.{:02}", n / 100, n % 100)
}

// Each kind of customer knows its own discount rule.
trait Customer {
    fn name(&self) -> &str;
    fn kind(&self) -> &str {
        "regular"
    }
    fn discount(&self, _subtotal: i64) -> i64 {
        0
    }
}

struct Regular(String);
struct Gold(String);
struct Staff(String);

impl Customer for Regular {
    fn name(&self) -> &str {
        &self.0
    }
}

impl Customer for Gold {
    fn name(&self) -> &str {
        &self.0
    }
    fn kind(&self) -> &str {
        "gold"
    }
    fn discount(&self, subtotal: i64) -> i64 {
        if subtotal >= 10000 {
            subtotal / 10
        } else {
            0
        }
    }
}

impl Customer for Staff {
    fn name(&self) -> &str {
        &self.0
    }
    fn kind(&self) -> &str {
        "staff"
    }
    fn discount(&self, subtotal: i64) -> i64 {
        subtotal / 5
    }
}

#[derive(Clone, Copy)]
struct Product {
    price_cents: i64,
}

struct OrderLine {
    product: Product,
    qty: i64,
}

// The fields are private to the module, so only the methods can change an order.
struct Order {
    number: u32,
    customer: Box<dyn Customer>,
    lines: Vec<OrderLine>,
    placed: bool,
}

impl Order {
    fn new(number: u32, customer: Box<dyn Customer>) -> Order {
        Order { number, customer, lines: Vec::new(), placed: false }
    }

    fn add(&mut self, product: Product, qty: i64) -> Result<(), DomainError> {
        if self.placed {
            return Err(DomainError(format!("order {} is placed, so it takes no new lines", self.number)));
        }
        if qty <= 0 {
            return Err(DomainError(format!("bad quantity {}", qty)));
        }
        self.lines.push(OrderLine { product, qty });
        Ok(())
    }

    fn place(&mut self) -> Result<(), DomainError> {
        if self.lines.is_empty() {
            return Err(DomainError(format!("order {} has no lines", self.number)));
        }
        self.placed = true;
        Ok(())
    }

    fn subtotal(&self) -> i64 {
        self.lines.iter().map(|l| l.qty * l.product.price_cents).sum()
    }

    fn total(&self) -> i64 {
        let subtotal = self.subtotal();
        subtotal - self.customer.discount(subtotal)
    }
}

fn main() {
    let (lamp, desk, pen) = (Product { price_cents: 2500 }, Product { price_cents: 7500 }, Product { price_cents: 500 });
    let mut orders = vec![
        Order::new(1, Box::new(Gold("Ann".into()))),
        Order::new(2, Box::new(Regular("Bob".into()))),
        Order::new(3, Box::new(Staff("Cy".into()))),
    ];
    orders[0].add(lamp, 2).unwrap();
    orders[0].add(desk, 1).unwrap();
    for order in orders.iter_mut().skip(1) {
        order.add(lamp, 1).unwrap();
        order.add(pen, 3).unwrap();
    }
    for order in orders.iter_mut() {
        order.place().unwrap();
        println!(
            "order {} for {} ({}): subtotal {}, total {}",
            order.number,
            order.customer.name(),
            order.customer.kind(),
            cents(order.subtotal()),
            cents(order.total())
        );
    }
    let results = [
        orders[0].add(pen, 1),
        Order::new(4, Box::new(Regular("Di".into()))).place(),
        Order::new(5, Box::new(Regular("Ed".into()))).add(pen, 0),
    ];
    for result in results {
        if let Err(e) = result {
            println!("error: {}", e);
        }
    }
}
Output
order 1 for Ann (gold): subtotal 125.00, total 112.50
order 2 for Bob (regular): subtotal 40.00, total 40.00
order 3 for Cy (staff): subtotal 40.00, total 32.00
error: order 1 is placed, so it takes no new lines
error: order 4 has no lines
error: bad quantity 0
  • Verdict: idiom. Customer is a trait with default methods for the regular customer, and Gold and Staff override them. The order holds a Box<dyn Customer>. In a library, Order would be in its own module, and its fields would be private there, so other modules would have to use add and place.

Consequences

Benefits.

  • Complex logic stays organized. Each rule is in the object that it is about. A new kind of customer is a new class, and the order does not change.
  • Rules are in one place. The Django documentation recommends methods on the model for the same reason: "This is a valuable technique for keeping business logic in one place – the model."3
  • The objects protect their rules. In the examples, no caller can add a line to a placed order, because only the order can change its lines.
  • The language of the business. The names of the classes and methods are the words of the business, so the code and the experts use the same terms.

Liabilities.

The mapping to the database costs effort. Fowler: "The primary cost is the awkwardness of mapping to a database, which typically results in a whole layer of O/R mapping."4 See Object-relational impedance mismatch.

An anemic model has the costs and none of the benefits. In an anemic domain model, the objects have data and no behavior, and "a set of service objects which capture all the domain logic" changes them.4 Fowler: "In essence the problem with anemic domain models is that they incur all of the costs of a domain model, without yielding any of the benefits."4 In the following program, the order is a data class. A service calculates the total, and nothing stops other code from changing a placed order after the invoice.

This code runs but gives a wrong answer on purpose.

from dataclasses import dataclass, field


# Wrong: an anemic order, with data and no behavior. The rules are in a service.
@dataclass
class Order:
    tier: str
    lines: list = field(default_factory=list)
    placed: bool = False


def total(order):
    subtotal = sum(order.lines)
    return subtotal - subtotal // 10 if order.tier == "gold" and subtotal >= 100 else subtotal


order = Order("gold", [50, 75])
order.placed = True
print("invoiced:", total(order))
# Nothing stops another piece of code from changing a placed order.
order.lines.append(25)
print("total after a late change:", total(order), "placed:", order.placed)
Output
invoiced: 113
total after a late change: 135 placed: True

Put the rules in the objects, as in the examples, and keep the services thin.

It needs skill in object design. A team that does not know object design can make a domain model that is harder to read than procedures.

When not to use it

When the logic is simple. For a few rules, a Transaction script costs less: there is no mapping layer and no class design. Fowler writes that domain models "aren't always the best tool."4

When the logic fits the tables. A domain model needs code to move the data between the objects and the rows. Fowler calls this "considerable programmatic gymnastics".5 If the logic works well on the rows of each table, a Table module avoids this work.

Simple domain model. About one class for each table, where each object saves itself with Active Record.

Rich domain model. Inheritance, strategies and many small objects, which do not match the tables. It needs a Data Mapper, usually with a Unit of Work and an Identity Map.

Domain-driven design. Eric Evans's method adds rules for how to find and group the objects, with entities, value objects and aggregates. It keeps a thin application layer over the model, as Fowler's post describes.4

With a service layer. A Service layer on top of the model gives the application its operations and controls the transactions. The service layer is thin, and the rules stay in the model.4

Related patterns. Transaction script and Table module are the other two ways to organize domain logic. Replace conditional with polymorphism is the refactoring that moves a design from conditions to the subclasses of a domain model. A Strategy pattern lets a domain object change a rule at run time.

Known uses

  • Django models. "A model is the single, definitive source of information about your data. It contains the essential fields and behaviors of the data you’re storing."3 Model methods "act on a particular model instance".3
  • Ruby on Rails models. "Active Record is part of the M in MVC - the model - which is the layer of the system responsible for representing data and business logic."6 Each model also saves itself, so it is an Active Record.
  • Jakarta Persistence entities. "An entity is a lightweight persistent domain object."7 JPA maps a model of entity classes to the tables, in the style of a Data Mapper.

References

  1. Martin Fowler, Catalog of Patterns of Enterprise Application Architecture, Domain Model, pattern summary
  2. Martin Fowler, Patterns of Enterprise Application Architecture, Addison-Wesley, 2002, Chapter 9, Domain Logic Patterns, Domain Model
  3. Django 5.2 documentation, Models, introduction; Model methods
  4. Martin Fowler, Anemic Domain Model, 25 November 2003, the whole post
  5. Martin Fowler, Catalog of Patterns of Enterprise Application Architecture, Table Module, pattern summary
  6. Ruby on Rails Guides, Active Record Basics, 1. What is Active Record?
  7. Jakarta Persistence 3.2 specification, 2. Entities

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/GK1510/text.yaml