From documents to models
Freon is a language workbench that generates browser-based editors from your own domain-specific language (DSL).
It helps businesses capture knowledge in a structured way — turning Word-style requirements into models that can be automated, stored, and reused.
📖 Freon documentation
🎮 Sample DSLs
💡 If your goal is to use Freon to build your own DSL, head over to the create-freon repository.
This repository (freon4dsl/freon4dsl
) is for developing Freon itself — its core framework, editor engine, and generators.
Freon is a TypeScript/JavaScript framework for creating and implementing projectional editors for DSLs that run natively in the browser.
Beyond the core framework, Freon includes generators for many parts of a DSL’s working environment.
If you want to work on the Freon framework itself:
We typically use the latest versions, although older versions may work as well.
git clone https://github.com/freon4dsl/Freon4dsl.git
cd Freon4dsl
npm install
npm run build
npm run test
You can try Freon with one of the sample languages.
cd packages/samples/<your-sample>
npm run build
Edit packages/webapp-flowbite/package.json
:
"dependencies": {
"@freon4dsl/<your-sample>": "2.0.0-beta.2"
}
Edit packages/webapp-flowbite/src/starter.ts
:
import { LanguageEnvironment } from "@freon4dsl/<your-sample>";
cd packages/server
npm run start
Note that the server keeps running in the background, therefore you need to open another terminal to start the web app.
cd packages/webapp-flowbite
npm run styles
npm run dev
➡️ Open the URL shown in your terminal (e.g. http://localhost:<port>/
).
This will display the example language editor in your browser.
The codebase is organized into multiple packages:
src/editor
→ editor frameworksrc/language/decorators
→ MobX decoratorslanguagedef
→ generates code from *.ast
files (abstract syntax trees)editordef
→ generates code from *.edit
files (editor definitions)scoperdef
→ generates code from *.scope
files (scoping rules)typerdef
→ generates code from *.type
files (typing rules)validatordef
→ generates code from *.valid
files (validators)