OpenModelica connection editor in the browser
This project was bootstrapped with Create React App.
❯ node --version
v12.18.1
❯ npm --version
6.14.5
-
Install dependencies
npm install
-
Run
npm run start
The project uses a combination of static checks and automated tests to ensure quality.
Static checks can be run using the following command
npm run test:static
This command does the following:
- Compiles all TypeScript code to check for any compilation errors
- Runs ESLint checks
- Runs Prettier checks
All static checks are also run before any commit is accepted, using a pre-commit hook configured using Husky.
The project uses the following category of tests
- Integration, Component and Unit Tests
These are written using React-Testing-Library. These tests don't startup the full application for quick feedback, but still uses actual DOM nodes while testing just like a real user does. These tests use a Test Double for any downstream dependencies to ensure speed of execution. Run these tests using the following command:npm run test
- E2E tests
These are black-box tests written using Cypress.
Run these tests using the following command (the app should be running as a pre-requisite):npm run cy:open
A series of static checks and tests are run as part of the CI workflow. For details, refer: ci-cd.yml. Environment variables (capturing non-sensitive information) for use in E2E tests are defined in ci-cd.yml.
All commits to master that pass all tests are deployed automatically as per configuration in ci-cd.yml.
npm run build
Doesn't need re-running each time. Only required once to create "serverless stack"
sls deploy
sls s3deploy
sls remove
Should support drag-and-drop (and textual) composition of:
- Modelica models
- composite FMU models (SSP)
The OMWebEdit will be the front-end (running in the browser) and OMWebService will be the backend (on some external server).
- no text support
- upload Modelica libraries (as zip files) or SSPs to the backend
- backend returns the model diagrams
- setup a simulation (start time, stop time, solver, etc)
- simulate the model (in the backend)
- plot the data (in the front-end)
- no text support
- upload Modelica libraries (as zip files) or FMUs to the backend
- backend returns the library components or FMUs as icons with port data
- drag-and-drop these Modelica components or FMUs and connect them
- edit the component / FMU parameters
- setup a simulation (start time, stop time, solver, etc)
- simulate the model (in the backend)
- plot the data (in the front-end)
- text support, edit and create Modelica models and libraries in the browser, including icons, etc.
- collaborative editing of Modelica models, conflict solving, integration with git/svn repositories
Possible web frameworks to use:
- https://www.diagrams.net/
- https://github.com/jgraph/drawio (web app)
- https://github.com/jgraph/drawio-desktop (desktop app, electron based)