HARIA
Specification-Driven Development for VS Code.
Design your domain in a HARIA textual DSL, validate it with confidence, and
generate clean, production-ready .NET solutions from the model.
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.
Ctrl+Space completions for association class references.
- .NET Clean Architecture generation from the active model.
- NHibernate and Entity Framework Core generation backends.
- Streaming generation logs in
Output > HARIA Generator.
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
NewAssociation
NewEnumeration
EnumLiteral
Attribute
OidAttribute
- Operation completions such as
OpNew, OpModify, OpDestroy, OpReadAll,
OpReadOID, OpReadFilter, OpLogin, OpRelationer, OpUnrelationer,
OpCustom, OpCustomTransaction, and OpPaging.
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 and creates:
<ProjectName>/
<ProjectName>.tdm
haria.config.json
The generated haria.config.json sets generation.projectName to the project
name you entered, uses generated as the default output folder, and targets
net9.0 by default.
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": {
"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 .NET TFM such as
net9.0 or net8.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.
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.