Domain-Driven Design: Core Domain, how to identify what truly differentiates your business and prioritize software development.
Distinguish differentiating, supporting, and generic capabilities to guide technical investment. Analyze a store with personalized recommendations, model a short TypeScript rule, and compare decisions to build, buy, and learn.
The indicator keeps the furthest percentage explored; marking the article complete is your choice.
The team improves login while recommendations keep failing
A specialist store promises to help customers choose equipment compatible with each buyer's needs. Its customers are not just looking for a catalog: they want to avoid combinations that do not work and understand why an alternative suits them.
The team spends weeks customizing sign-in screens, building its own notification system, and reorganizing an administrative application. Meanwhile, the recommendation engine still ranks by popularity and suggests incompatible products.
All those pieces may be necessary. The strategic question is different: where should the knowledge and effort that make this business different be concentrated?
Core Domain helps answer it. It is not a pattern implemented by creating a core folder. It is a way to recognize which part of the domain deserves special attention because it sustains the differentiating proposition.
What the Core Domain is
The Core Domain concentrates the domain knowledge and capabilities central to an organization's strategy and differentiation.
Evans proposes distinguishing this part from the rest of the model, keeping it focused, and investing in understanding and developing it with particular care. He also warns that infrastructure and problems that are easier to define can absorb effort while specialized knowledge is neglected. DDD Reference: Core Domain, page 40 of the document.
This is not about declaring one team superior. It is about deciding where an improvement of your own can produce an advantage relevant to the strategy.
In the example store, the hypothesis is:
Understanding technical needs and recommending suitable combinations enables customers to choose better than with a generic catalog.
This is still a differentiation hypothesis. We need to test it against customers, specialists, and results; putting “intelligent engine” in a presentation does not prove it.
Differentiating does not necessarily mean novel across the entire market
The capability can combine knowledge, data, rules, and experience in a way that is particularly useful to a segment.
A published algorithm may form part of the solution. The difference may lie in recognizing constraints others ignore, evaluating results, or incorporating specialized learning.
That is why “we developed it ourselves” and “it is secret” are insufficient criteria. A proprietary password recovery system can be expensive and confidential without becoming a competitive advantage.
Comparing three business roles
To prioritize, distinguish the core domain from supporting and generic capabilities.
Core Domain: contributes directly to the differentiation sought. It deserves deeper modeling and continued decision-making control over its evolution.
Supporting Subdomain: addresses particular needs that enable operations, but does not by itself constitute the differentiating reason customers choose the proposition.
Generic Subdomain: addresses a widely understood problem for which reusable approaches and alternatives exist. Being generic does not mean being simple or unimportant.
This classification does not rank people's value or automatically allocate budgets. It describes a capability's role in relation to a strategy.
In our store, we assume order operations need some custom adjustments but are not the advantage sought. We provisionally classify them as supporting. Conventional authentication is generic within this scope.
If the company specialized in digital identities or exceptional logistics, the classification could change.
A critical capability may not be differentiating
Without secure authentication or reliable payments, the store can lose customers and stop operating. That does not mean it should build identity technology or financial processing from scratch.
There are two different questions:
Criticality: what happens if this capability fails?
Differentiation: what strategic value do we obtain by solving it in our own way?
A critical generic capability needs sufficient quality, controls, and continuity. The Core Domain does not justify neglecting security, accessibility, compliance, or correctness in the rest of the product.
The classification helps choose how to meet those needs and where to invest custom design effort, without removing basic guarantees.
Subdomain and Bounded Context are not equivalent
A subdomain describes part of the business problem. A Bounded Context defines where a particular model applies to solve it.
Identifying “personalized technical selection” as the core domain does not automatically establish that a single context called Recommendations must exist.
It could be represented through separate models for needs, compatibility, and recommendations. Or an initial application could address it with a small model.
Store strategy
Help choose suitable equipment
|
v
Candidate Core Domain capability
Personalized technical selection
|
v
Model and boundary design
One or more Bounded Context decisions
|
v
Implementation and operations
Modules, code, data, and tools
The diagram shows related decisions, not a one-to-one correspondence rule.
A technical module, the central database, or the application with the most users does not become the Core Domain because of its location or size either.
Analyze capabilities before assigning work
Instead of classifying folders, we write observable capabilities:
Interpret the buyer's technical constraints.
Recommend compatible products and explain the choice.
Record and manage orders.
Authenticate users.
Send operational notifications.
Then we discuss each capability with people from business, product, and technology. An initial qualitative matrix could look like this:
Capability Expected differentiation Provisional classification
Personalized selection High, to be validated Core Domain
Operational order management Low in this strategy Supporting
Conventional authentication Not sought here Generic
Operational notifications Not sought here Generic
This is neither a measurement nor a research finding. It is a proposal to make the fictional store's assumptions visible.
Questions that change the classification
Why would customers choose us? If the answer is suitable advice, identify which decisions produce it. “Having a recommendation engine” is too broad.
What specialized knowledge does it require? Look for rules specialists can explain through cases, constraints, and exceptions.
What alternatives exist? Do not assume buying is sufficient or that no suitable solutions exist. A real decision needs market research and testing against your own needs.
What learning do we need to control? If every experiment depends on a third party changing its priorities, we may be limiting a strategic capability's evolution.
What evidence contradicts the hypothesis? If customers primarily value immediate delivery, recommendations may not be the capability most worth prioritizing.
A useful classification acknowledges open questions. A label chosen through technical enthusiasm can conceal them.
Worked case: from a popular catalog to a suitable recommendation
The team proposes an intelligent recommendation engine. Before training or integrating a model, specialists identify a rule:
A product incompatible with a mandatory need must not be recommended, even if it is popular or profitable. Among compatible alternatives within budget, our proposition prioritizes repairability.
The rule expresses a business decision. It must be validated with customers and against the strategy; it is not a universal recommendation recipe.
We can begin with a deterministic policy that makes that decision visible. It neither implements machine learning nor demonstrates complete intelligent personalization.
A brief TypeScript example
The proposed recommendation-policy.ts file uses no external packages and can form part of a Node.js application.
The function filters mandatory constraints before sorting. Repairability takes priority among eligible products; price and a stable reference then break ties.
Amounts in the example are in EUR cents. Unique identifiers, normalized capabilities, and catalog data validated before reaching the function are assumed. Compatibility is not inferred from text similarity.
A product with an invalid price is excluded. If no suitable candidates exist, the result is empty: we do not silently relax a mandatory need to fill the list.
A real solution requires better representations of capabilities and compatibility, explanations of decisions, consideration of data freshness, and an evaluation process. The function only shows a rule that deserves a name, discussion, and tests.
Verify the strategic decision in code
A proposed test can protect the exclusion of an incompatible product even if it is repairable. It assumes TypeScript compilation to ESM JavaScript and uses built-in Node.js APIs; it has not been run as part of this article.
The test verifies a model rule. It does not demonstrate that the product is actually compatible in the physical world or that recommending it improves sales.
Those claims require reliable data and evaluation of the outcome. The difference between calculation correctness and customer value must remain visible.
Decide what to learn before building more
For the store, an initial experiment could compare the proposed policy with its current selection on a set of cases reviewed by specialists.
The evaluation should ask:
Does it respect all known mandatory constraints?
Which cases cannot be resolved with the available data?
Does the explanation help the buyer choose?
Are recommendations produced that a specialist would reject?
What effects emerge on returns, satisfaction, and business results?
These are evaluation questions, not metrics already measured. We cannot claim improvements without observing them.
If the policy does not offer sufficient advantage, the next step may be to revisit the hypothesis or use an available alternative, rather than add complexity to the algorithm.
The Core Domain guides where to learn more carefully. It does not make every investment in that area a good decision.
Build or buy without automatic answers
Classifying a capability helps frame the decision but does not produce a rigid instruction.
For conventional authentication, evaluate existing solutions before investing in your own implementation. The choice must consider requirements, operations, integration, total cost, and the ability to exit.
For specific order operations, adapting a solution or implementing bounded parts may be appropriate if alternatives do not cover the necessary rules.
For strategic recommendations, retaining control over the decisions and learning that differentiate the proposition matters. That does not require building AI models, search engines, or storage from scratch.
The store could use external technology to generate candidates while retaining its compatibility and evaluation rules. Buying tools does not necessarily mean handing over all strategic knowledge.
Conversely, an in-house recommendation engine that merely replicates standard popularity may offer little differentiation despite being developed internally.
Allocate resources to the capability, not technical prestige
Investing in the Core Domain can mean:
Giving specialists and developers time to collaborate.
Clarifying terms and cases before multiplying classes.
Maintaining evaluation data and representative tests.
Enabling experiments and review of results.
Preventing vendor details from dictating differentiating rules.
It does not mean adding every tactical DDD pattern or building a distributed architecture. If an explicit, well-tested function represents the current rule, it may be enough.
Generic and supporting capabilities still need owners and maintenance. Neglecting them can turn them into the bottleneck that prevents differentiation from being used.
Investment decisions must also consider risk and urgency. A critical vulnerability in a generic capability may take immediate priority over a recommendation improvement.
When the business changes, the strategic map changes
Imagine the store stops competing on advice and specializes in delivering spare parts within a few hours.
Personalized selection may remain useful, but allocating stock, fulfillment, and delivery promises could become the differentiating focus.
That does not mean code changes classification every week. It means a major strategic decision requires reviewing where effort is concentrated.
A short record could contain:
Capability: personalized technical selection. Current classification: Core Domain candidate. Hypothesis: customers value compatibility and explanation more than a popular list. Knowledge: needs, constraints, relationships between products, and suitability criteria. Pending evidence: case review and evaluation with users. Initial decision: model and evaluate a small policy before expanding automation. Review: changes in strategy or evidence contradicting the hypothesis.
There is no need to invent a return figure to justify the existence of uncertainty. We need to decide how to reduce it.
Another business, another classification: an educational platform
Suppose a platform differentiates itself by helping identify gaps in understanding and proposing suitable practice.
Its candidate core domain may involve diagnosis, sequencing, and pedagogical feedback. The content library, publication schedule, and user access may play other roles.
A simple engine recommending popular courses does not necessarily express that differentiation. Valuable knowledge could lie in recognizing conceptual errors and choosing an activity that helps overcome them.
In another platform whose business distributes third-party content at scale, distribution efficiency or access conditions could carry greater strategic weight.
Do not universally classify “education,” “payments,” or “recommendations.” Specify the organization, segment, proposition, and need.
This example also reminds us that the Core Domain can depend on knowledge not initially in code. Talking with teachers and observing learning may be more useful than starting with infrastructure.
Third contrast: a digital identity company
In the store, conventional authentication was generic. In an organization competing to offer identity verification particularly suited to a certain market, part of risk analysis or verification could be strategic.
That does not turn all its login infrastructure into the core domain or mean inventing cryptographic primitives.
The classification must be precise enough to separate differentiating knowledge from mechanisms that can be addressed using existing standards and tools.
The lesson is twofold: criticality is insufficient for classification, and a capability's technical name does not determine its role either.
Mistakes that misdirect investment
Calling everything important core. If every capability receives the label, it does not help prioritize.
Confusing complexity with differentiation. A difficult system can be generic; a short rule can express valuable knowledge.
Confusing an AI demo with competitive advantage. A sophisticated model needs a real need, appropriate data, and evaluation. Technical novelty does not replace those elements.
Investing only in infrastructure because it is easier to measure. It may be necessary, but must connect to concrete risks or outcomes rather than absorb strategic work by default.
Turning classification into a permanent team hierarchy. Capabilities change, and people need collaboration and learning. The label does not justify isolating knowledge or neglecting other areas.
Assuming buying eliminates responsibility. The organization remains responsible for integration, data use, and the quality of its proposition.
Use AI to organize hypotheses, not decide strategy
Cursor, Claude, or Codex can help structure capabilities and explore alternatives, provided they receive the business context.
To classify provisionally:
Analyze these capabilities and this value proposition. Suggest Core Domain, supporting, and generic candidates. For each, distinguish evidence, hypotheses, and open questions. Do not classify by technical complexity or assume using AI is differentiating.
To evaluate build or buy:
Compare retaining control over this recommendation policy with using an external solution. Identify business decisions we need to be able to change, data requirements, integration costs, and exit conditions. Do not invent vendors, prices, or capabilities; identify what requires current research.
To implement an experiment:
Implement a small policy that excludes incompatibilities before prioritizing alternatives. Include constraint tests and cases with no results. Do not add machine learning or new services without a justified need. Explain which business hypotheses the code does not demonstrate.
The responsible person must validate strategy and priorities with evidence. A convincing AI-generated capability list is not a customer study.
Nor should sensitive business or user information be sent to external tools without the corresponding permissions and controls.
Exercises for thoughtful prioritization
1. The hardest module
Authentication is the store's most complex code. The recommendation engine consists of a few functions but contains specialized rules buyers value. Which fact alone determines which is the Core Domain?
2. The available solution
An external tool covers initial candidate generation but cannot exclude incompatibilities specific to the store's market. Does using it require abandoning the core domain?
3. The strategy change
The educational platform stops differentiating through adaptive practice and starts competing through certified corporate training. What must be reviewed?
Reasoned solutions
1. None of the technical facts alone. The strategic proposition and evidence of differentiation must be tested. Complexity and size do not replace that evaluation.
2. Not necessarily. External technology can be used while retaining the model, rules, and evaluation expressing specialized knowledge. The decision must check whether that separation enables learning and evolution without losing relevant control.
3. The capabilities sustaining the new proposition and the allocation of investment. Adaptive diagnosis may change roles while other capabilities gain relevance. Renaming modules is not enough.
A strategic priority that can be revisited
Core Domain helps distinguish which knowledge deserves to become a particularly well-cared-for software capability.
Check that you can explain what differentiates the business, what evidence supports it, and what decisions you need to control to improve it. Then design models and investments proportionate to that need.
Creating a folder called core is simple. Identifying where to learn and develop a useful advantage requires an ongoing conversation between business, product, and technology.
Integrate the collection by building an order API with TypeScript, Express, Zod, and SQLite. Includes project files, domain rules, events, version control, Vitest tests, and commands to run and verify it locally.
Learn to guide AI agents with business rules, context boundaries, and verifiable criteria. A TypeScript case shows how to prepare instructions, protect Order, design tests, and review changes without delegating architectural judgment.
Compare a modular monolith with separating Sales, Payments, and Inventory. Design contracts in TypeScript and Express and understand partial failures, eventual consistency, idempotency, Outbox, and Sagas without introducing complex infrastructure.