Skip to content

Examples demonstrating how to use TMF models in various TypeScript contexts (Node, Angular, React etc).

License

Notifications You must be signed in to change notification settings

tripsnek/tmf-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TMF Examples

License: MIT

Example applications demonstrating the @tripsnek/tmf library (githubnpm) - a lightweight TypeScript port of the Eclipse Modeling Framework (EMF). These examples show how to build full-stack applications using model-driven development principles.

A Quick Demo video

tmf_in_60_seconds.mp4

Quick demonstration of adding types/features to an ecore model and generating code (courtest of the TMF Ecore Editor) in a full stack reflective application, specifically the NX Angular/Node example.

Examples

Full-stack npm workspaces monorepo with Angular frontend and Express.js backend.

  • Architecture: npm workspaces
  • Frontend: Angular 19 with TMF reflective editor
  • Backend: Express.js with auto-generated REST API

React-based implementation using the same architecture as the Angular example.

  • Architecture: npm workspaces
  • Frontend: React with TMF reflective editor
  • Backend: Express.js with auto-generated REST API

Alternative structure using Nx workspace tooling.

  • Architecture: Nx monorepo
  • Frontend: Angular 19 with TMF reflective editor
  • Backend: Express.js with auto-generated REST API

Hybrid polyglot implementation demonstrating TMF-EMF integration.

  • Architecture: Nx monorepo
  • Frontend: Angular 19 with TMF reflective editor
  • Backend: Spring Boot with Eclipse EMF
  • Data Model: Shared Ecore generates both TypeScript (TMF) and Java (EMF) classes

Key TMF Features

  • Code Generation from Ecore metamodel (npm run gen:datamodel in each project) or with the TMF Ecore Editor VSCode Extension
  • Factory Pattern for creating model instances
  • Containment & Inverse References with automatic bidirectional updates
  • Reflective Backend and Frontend that adapts to any metamodel - edit the .ecore file as much as you want, or replace with your own! It requires updating only a couple of code references to your generated package 'eINSTANCE'
  • JSON Serialization with TJson, and reflective cross-container reference resolution demonstrated with proxy-resolver.ts
  • Type Safety across the entire stack

Getting Started

Choose an example and follow its README for detailed setup instructions.

Useful Links

About

Examples demonstrating how to use TMF models in various TypeScript contexts (Node, Angular, React etc).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •