mtonosaki/Jitwin
"Just-in-time + Twin" A digital twin platform to study JIT model. Including VSM modeling GUI, IoT hub and Simulator.
Links
Jitwin
"Just-in-time + Twin" - Digital twin platform like a broker between the real world and a virtual world to help you both to respect the real world and to find revolution idea in a virtual space.
Overview
- Value Stream Mapping (VSM) GUI Editor.
- Traceability hub
- Simulator
VSM GUI
Macro perspective modeling GUI (graphical user interface) with only five elements to visualize value stream mapping.
- VSM template editor
- VSM stage to instantiate from template.
Traceability hub
To make traceability from a wide variety of IoT data tagged a meaning of process with the methodology of Toyota Production System.
Simulator
Re-input IoT data into VSM for problem-solving, studying revolution idea and planning to drive real-world.
About this repository
Frontend : React / TypeScript
Backend : Spring / Kotlin
Build on your PC
Preparation
Settings
export JITWIN_AAD_TENANT_ID=<your Azure Active Directory Tenant ID>
export JITWIN_AAD_CLIENT_ID=<your Application Client ID in AzureAD>
export JITWIN_AAD_CLIENT_SECRET=<your Application Client Secret Value>see also https://github.com/mtonosaki/Jitwin/wiki/Azure-Settings#5-make-a-client-secret
NOTE: Setting the environment variable to rc file such as ~/.zshrc to smoothly run development and testing.
Frontend
copy ./jitwindev/web/.env.local.copy to .env.local and edit shell environment path.
cd ./jitwindev/web
yarn installBackend
cd ./jitwindev/server
# Launch IntelliJ IDEA to make .idea folder automatically.
./gradlew ktlintApplyToIdeaBuild / Debug
Middleware
cd ./jitwindev
# start Docker desktop on your mac
docker-compose up dbFrontend
cd ./jitwindev/web
yarn startto access to frontend for debugging, https://localhost:3000
Backend
cd ./jitwindev/server
./gradlew build -x test
java -jar -Dspring.profiles.active=local build/libs/toyokan-api-0.0.1-SNAPSHOT.jarto access to backend, http://localhost:8080
Test / Lint
ALL
cd ./jitwindev
make pre-push # Lint, Test front/back end.Frontend
cd ./jitwindev/web
yarn lint # to lint
yarn test # to testBackend
cd ./jitwindev/server
./gradlew ktlintFormat # to lint
./gradlew test # to testIDE (IntelliJ Ultimate)
Prettier Setting
- [Menu] → [IntelliJ IDEA] → [Preference]
- [Plugin@Left pane]
- Install the plugin named 'Prettier'
- [OK]
- [Menu] → [IntelliJ IDEA] → [Preference]
- [Languages & Frameworks @ Left pane] → [JavaScript] → [Prettier]
- Select prettier package from dropdown list.
- Check [On 'Reformat Code' action]
