HARIA
Specification-Driven Development for VS Code.
HARIA 1.1.3 derives Entity Framework foreign key names from navigation roles (TransaccionCobroId, TransaccionPagoId, VendedorId, CompradorId). This separates multiple associations between the same entities, including optional one-to-one links. For a collection without an inverse navigation, the key combines the principal class and collection role. The full SkinLink schema and independent relationship persistence are checked with SQLite. Existing databases need an explicit schema migration when old foreign key column names change; generation does not migrate or delete stored data.
HARIA 1.1.2 fixes ReadFilter operations declared on AggregateMember classes: the aggregate root service keeps its prefixed public method name and calls the actual unprefixed repository method. Covered for Entity Framework and NHibernate; no database schema changes are involved.
HARIA 1.1.1 loads navigable single associations and composite collections in generated Entity Framework repository reads, including association references on composition rows. This supplies the data used by HARIA Web's population selects and composition editors. Regenerate an existing EF backend to update its repository source; no database migration is performed by this change.
Design your domain in a HARIA textual DSL, validate it with confidence, and
generate clean, production-ready .NET solutions from the model.
Demo

What HARIA Provides
- HARIA DSL editing for
.tdm, .ooh4ria, and *.domainModel_new.tdm files.
- Domain model validation in the editor and Problems panel.
- Context-aware snippets for classes, associations, enumerations, attributes,
and operations.
- Context-sensitive
Ctrl+Space actions supplied only by HARIA (without the
legacy snippet catalogue or word-based suggestions).
Ctrl+Space completions for association class references.
- DDD modeling support for
ValueObject / ObjectValue concepts,
AggregateRoot, and AggregateMember classes.
- .NET Clean Architecture generation from the active model.
- NHibernate and Entity Framework Core generation backends.
- PlantUML import and export for HARIA conceptual models.
- Streaming generation logs in
Output > HARIA Generator.
HARIA is positioned for .NET, DDD (Domain-Driven Design), domain modeling,
code generation, Clean Architecture, PlantUML, NHibernate, Entity Framework
Core, Value Objects, and Aggregates.
Requirements
HARIA 1.1.0 generates domain File attributes and their Application arguments
as string relative paths, for use with HARIA Web uploads. Blob remains binary.
Existing File byte-array columns/data require an explicit migration; regenerating
the backend does not migrate stored data. HARIA Web 1.1.0 supplies multipart forms,
public upload storage and selective MVC regeneration.
- .NET 9.0 or .NET 10.0 runtime/SDK for validating models, running PlantUML
conversions, and generating code with the HARIA CLI. The bundled CLI targets
net9.0 and rolls forward to .NET 10 when .NET 9 is not installed.
- VS Code extension: PlantUML (
jebbs.plantuml) for PlantUML editing and
preview workflows.
- VS Code extension: C# (
ms-dotnettools.csharp) for generated C# projects.
- VS Code extension: C# Dev Kit (
ms-dotnettools.csdevkit) for the full
.NET solution experience in VS Code.
How It Works
- Write the domain model in the HARIA DSL.
- Use validation diagnostics to catch syntax and model consistency issues.
- Run
HARIA: New HARIA Project to create a model folder, .tdm file, and
haria.config.json.
- Configure generation defaults in
haria.config.json.
- Click the HARIA generate button in the editor title bar.
- Review generated Domain, Application, Infrastructure, and InitializeDB
projects in the configured output folder.
Generation Pipeline
HARIA Model
-> Parser and validator
-> Domain model
-> Clean Architecture generator
-> Domain / Application / Infrastructure / InitializeDB
-> NHibernate or Entity Framework Core
Snippets And Completions
ConceptualModel
NewClass
NewUserClass
NewAggregateRoot
NewAggregateMember
NewValueObject
NewAssociation
NewEnumeration
EnumLiteral
Attribute
OidAttribute
- Operation completions such as
OpNew, OpModify, OpDestroy, OpReadAll,
OpReadOID, OpReadFilter, OpLogin, OpRelationer, OpUnrelationer,
OpCustom, and OpCustomTransaction.
New CRUD Operations inserts the standard CRUD operations for the current
class. In an AggregateRoot, New CRUD operations aggregate asks for one of
its related AggregateMember classes and inserts that member's CRUD in the
root operations block. Operations are named with the member suffix, for
example NewLineaPedido, ModifyLineaPedido, and ReadAllLineaPedido, and
the generated methods use the member repository through the root service.
Inside an association header such as:
Association enrollment_student ( Enrollment - Student )
press Ctrl+Space on either class position to list the classes already defined
in the document.
Local Usage
Open this folder in VS Code:
code OOH4RIA-next/vscode/ooh4ria-conceptual-vscode
Then press F5 to launch an Extension Development Host. Open a .tdm file such as:
OOH4RIAModels/metre/models/default.domainModel_new.tdm
The file should be recognized as HARIA.
Use HARIA: New HARIA Project from the File menu, Command Palette, Explorer
context menu, or editor context menu to create a project folder. The command
asks for a project name, database provider, and database name, then creates:
<ProjectName>/
<ProjectName>.tdm
haria.config.json
The generated haria.config.json sets generation.projectName to the project
name you entered, stores the selected database provider and database name, uses
generated as the default output folder, and targets net9.0 by default.
You can select net9.0 or net10.0 when creating a new HARIA project.
Diagnostics run automatically while editing. The extension includes the
published generator object code under runtime/haria-cli and uses it by
default:
runtime/haria-cli/haria validate <model>
In a source checkout without that runtime folder, the extension detects
../../src/Ooh4ria.Cli/Ooh4ria.Cli.csproj and runs:
dotnet run --project <cli-project> -- validate <model>
When you need to override the bundled generator, make the haria command
available on PATH or set ooh4riaConceptual.validation.command, for example:
{
"ooh4riaConceptual.validation.command": "dotnet run --project C:\\SDD\\SDDTool\\OOH4RIA-next\\src\\Ooh4ria.Cli\\Ooh4ria.Cli.csproj --"
}
Generation uses the same CLI resolution: explicit VS Code command settings,
then bundled object code, then local source project, then haria on PATH.
Defaults live in
haria.config.json at the project root:
{
"generation": {
"orm": "nhibernate",
"outputDirectory": "generated",
"projectName": "MyProject",
"targetFramework": "net9.0",
"database": "sqlserver"
},
"database": {
"provider": "sqlserver",
"host": "(local)\\sqlexpress",
"name": "MyProject",
"user": "hariaUser",
"password": "hariaPass",
"masterDatabase": "master",
"integratedSecurity": false,
"trustServerCertificate": true
}
}
Use "entityframework" instead of "nhibernate" to generate Entity Framework
Core code by default. Set targetFramework to a valid supported .NET TFM such
as net9.0 or net10.0. Explicit VS Code settings such as
ooh4riaConceptual.generation.orm and
ooh4riaConceptual.generation.targetFramework override the project config.
Existing ooh4ria.config.json files are still recognized for older projects.
Set generation.database or database.provider to sqlite, sqlserver,
postgres, or mysql. SQLite uses database.file / database.dataSource;
server engines use host, port, name, user, password, and optional
masterDatabase.
Local Usage Telemetry
HARIA records local, pseudonymous usage telemetry per project so generated
projects can later be analyzed empirically. Events are written inside each
project under:
.haria/telemetry.json
.haria/telemetry-events.ndjson
The telemetry includes technical identifiers (installationId, projectId,
sessionId), the HARIA extension version, UTC timestamps, event names, the
HARIA project name, generation outcomes, duration, generated-file counts, and
aggregate protected-region metrics. It does not store source code, model
contents, PlantUML contents, protected-region contents, absolute paths, Git
remotes, emails, or user names.
Telemetry is active only when VS Code telemetry is enabled and
ooh4riaConceptual.telemetry.enabled is true. To disable HARIA telemetry:
{
"ooh4riaConceptual.telemetry.enabled": false
}
Product Direction
HARIA is the VS Code front door for a specification-first workflow: model first,
validate consistently, then generate maintainable .NET code. Graphical modeling
and richer semantic locations are natural next steps on top of the textual
editor and generator already present here.