-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Guillaume Bour
authored
Nov 10, 2021
1 parent
03d4113
commit 00776c3
Showing
1 changed file
with
31 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,51 @@ | ||
# Getting Started with Create React App | ||
# DWC Risk Explorer | ||
|
||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
This application is part of Deliverable D4.2 of the [Digital Water City project](https://www.digital-water.city/). Deliverable 4.2 (D4.2) combines the results of two sub-tasks of WP4 "Interoperable and secure flow of information", 4.2.1 and 4.2.2 aiming at developing a risk identification database (RIDB) and a risk reduction measure database (RRMD) respectively. | ||
|
||
## Available Scripts | ||
<img src="https://github.com/SINTEF-Infosec/dwc-risk-explorer/blob/master/screenshots/events.png" width="50%"> | ||
|
||
In the project directory, you can run: | ||
|
||
### `npm start` | ||
## Running the explorer | ||
|
||
Runs the app in the development mode.\ | ||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
### Using npm | ||
To run the explorer locally, and given that you have node installed, issue the following commands: | ||
|
||
The page will reload if you make edits.\ | ||
You will also see any lint errors in the console. | ||
``` | ||
npm install | ||
npm run start | ||
``` | ||
|
||
### `npm test` | ||
The explorer should be available at http://localhost:3000/ | ||
|
||
Launches the test runner in the interactive watch mode.\ | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
### Using Docker | ||
|
||
### `npm run build` | ||
You can also use Docker. First build the image: | ||
|
||
Builds the app for production to the `build` folder.\ | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
``` | ||
docker build -t dwc-risk-explorer:latest . | ||
``` | ||
|
||
The build is minified and the filenames include the hashes.\ | ||
Your app is ready to be deployed! | ||
Then: | ||
|
||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
``` | ||
docker run -p 3000:80 dwc-risk-explorer:latest | ||
``` | ||
|
||
### `npm run eject` | ||
## Adding new risks and measures | ||
|
||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!** | ||
If you want to add a risk event or a measure to the databases, you can do so in two ways: | ||
|
||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. | ||
### Update the project and submit a Pull Request | ||
|
||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. | ||
1. Update the [RIDB and RRMD Excel files](https://github.com/SINTEF-Infosec/dwc-risk-explorer/tree/master/data) and then run the update script: | ||
|
||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. | ||
``` | ||
./scripts/update.sh | ||
``` | ||
The script updates the RRMD based on the RIDB, then dumps both databases as JSON files which are used by the web application. | ||
|
||
## Learn More | ||
2. Once done, commit and submit a Pull Request. | ||
|
||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). | ||
### Open an issue | ||
|
||
To learn React, check out the [React documentation](https://reactjs.org/). | ||
|
||
### Code Splitting | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) | ||
|
||
### Analyzing the Bundle Size | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) | ||
|
||
### Making a Progressive Web App | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) | ||
|
||
### Advanced Configuration | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) | ||
|
||
### Deployment | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) | ||
|
||
### `npm run build` fails to minify | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) | ||
[Open an issue](https://github.com/SINTEF-Infosec/dwc-risk-explorer/issues/new) with the exact changes/addition to be made. Please mention "DB UPDATE" in the title for easier labelling. |