Logo

Documentation

New: Export circuit diagrams as AI-readable JSON (.json<). Open a circuit diagram and choose in the menu File -> Export Displayed Diagram, to write <diagramName>.json into your work folder (same place as the diagram’s generation infos). The export includes visible nodes, directed call/access edges, comments, and the set of elements with complete neighbors. Positions are omitted by default. Requires a Chromium-based browser (File System Access API).

First Steps

Analyze JavaScript coding

  • Make sure you have a folder which contains HTML files together with JavaScript code. You may for instance use git to replicate the source code of this application to a local folder.
  • Open this application in a browser
  • Choose in the menu Model -> Extract Code from File System to SOMIX model (w/o .git). Choose the main folder of the application. All extracted components will be displayed in a circle.
  • Choose in the menu File -> Open Work Folder. Specify a folder where the generation information for all diagrams shall be stored. In case you analyze this application choose the folder models.
  • In case you use this application. Choose in the menu File -> Read Diagram. You will see a list of existing diagrams.
  • In case there are no diagram informations yet. Choose in the menu File -> New Diagram. Enter a name for the diagram. Choose Model -> Explore model (Add elements to diagrams) to choose components to be displayed.
  • Demo

    It is possible to display and use demo data. Follow these steps:
  • Open the application in a browser
  • Choose in the menu Help -> Load demo data
  • Do a right mouse click into the pane and choose "Start Force-directed graph". Wait some time and choose then "Stop Force-directed graph".
  • Click on one of the red or blue circles with the right mouse button. Choose "Add element with all neighbors"
  • Do a right mouse click into the pane and choose Demo Diagram
  • Play around with left and right clicks of the mouse on elements, into boxes and onto the pane. Use also the scroll wheel of the mouse.
  • You may also choose Model -> Explore Model (Add elements to diagrams). Use these steps:
  • Open the application in a browser
  • Choose in the menu Help -> Load demo data
  • Enter for instance ^Z.*LOG in the input field. This filters for all elements which start with Z and have a LOG somewhere in the name. You can use any Regex expression. The search is case insensitive.
  • The button "Apply Filter" may not yet work, instead move the mouse down.
  • You can scroll with the mouse wheel in the result list.
  • Make a right click on an element and choose "Add element with all neighbors"
  • Choose cancel
  • Make a right click in the pane and choose Demo Diagram.
  • Play around with left and right clicks of the mouse on elements, into boxes and onto the pane. Use also the scroll wheel of the mouse.
  • Generate a SOMIX model from files in a local folder

    It is possible to analyze folders in the local file system:
  • Extract a model where files are data and folders are groupings. Choose Model -> Extract File System to SOMIX model (w/o .git). A pop up opens where you specify a local folder on your computer. Thereafter you are prompted to specify a folder to the source of the JavaScript code. This is required because it is not possible to determine the source folder from within a browser. Content in .git folders is ignored. This is in most cases helpful when git is used. Git stores many files which are normally not of interest.
  • Extract a model of the code in files. This is currently in development. Extract Code from File System to SOMIX model (w/o .git). A pop up opens where you specify a local folder on your computer. Content in .git folders is ignored. This is in most cases helpful when git is used. Git stores many files which are normally not of interest.
  • Use a SOMIX model

    When you have a SOMIX model (You will need to use SAP2Moose for now):
  • Choose File -> Open Work Folder (Generation informations for files will be stored in this folder)
  • When this folder has a subfolder SOMIX the application will load the most recent .mse file in this folder automatically. In that case the next step is not required.
  • Choose File -> Load Model and load a SOMIX model
  • Choose File -> New Diagram and enter a name for the new diagram.
  • Make a right click into the pane and choose the name of your diagram. This will change the view and display: "This diagram is currently empty: ..."
  • Make a right mouse click into the pane and choose "Make this diagram active". When you later add elements to a diagram, these elements will be added to the active diagram.
  • Now choose an element and add it to the active diagram like it was described on this page under "First Steps" -> "Demo".
  • To save the displayed diagram choose File -> Save Displayed Diagram.
  • When you repeat your work do
    • Load a new SOMIX model. This will normally not be the model you used before. The diagram will be automatically adapted to the new software version.
    • Choose File -> Open Work Folder
    • Choose File -> Read Diagram (You will need "Import old Diagram (XML) only when you worked with the Smalltalk version of Moose2Model).
  • AI-readable JSON Export (New)

    You can export the currently displayed circuit diagram as a JSON file (Choose in the menu File -> Export Displayed Diagram,) that is easy for AI tools to consume. The export contains:

    How to export

    1. Open (or activate) a circuit diagram you want to export.
    2. Choose in the menu File -> Export Displayed Diagram.
    3. The file <diagramName>.json is written into your work folder (same place as the diagram’s generation infos).

    Minimal example

    {
      FileContent": "This file contains a circuit diagram exported from Moose2Model2 to be used in AI. It uses stable IDs based on the SOMIX model element unique names.",              
      "m2m_export": "somix-circuit-diagram",
      "version": 2,
      "modelName": "Your SOMIX model",
      "diagramTitle": "MyDiagram",
      "timestamp": "2025-08-26T11:43:33.596Z",
      "neighborsCompleteFor": ["somix:code:sap.y<0>bw_xf"],
      "nodes": [
        {
          "id": "somix:code:sap.y0bw_xf",
          "SOMIXelement": "SOMIX.Code",
          "technicalType": null,
          "isAddedWithNeighbors": true
          "name": "Y0BW_XF"
        }
      ],
      "edges": [
        { "kind": "access", "from": "somix:code:sap.y0bw_xf", "to": "somix:data:sflight", "directed": true }
      ],
      "comments": [
        { "elementId": "somix:code:sap.y0bw_xf", "text": "Hot path" }
      ]
    }

    Features

    General

    Header

    Diagram with all elements

    A diagram with all elements is always displayed. It can be animated as a force-directed graph. This works well for small models. The main intention of this application is not to make force-directed graphs, so other tools might work better here.

    Circuit Diagram for Software