The web-interface for the participants of the Influenzanet platform
This project was bootstrapped with Create React App.
Start by creating a fork of this repo in your local organisation or create a local copy of this repository.
The example-public-folder contains example configurations within the assets folder. Replace the content here to make changes as needed.
- Update the public/assets/locales to add folders for each supported language.
- Configure the keys, markdown content within the locales folders.
- Upload additional images needed into the public/assets/images folder.
- Configure page layouts, headers, and footers by configuring the files present in public/assets/configs.
4.1. Appconfig: Set the language codes for the supported languages here. Also configure the avatars available for user profiles here.
4.2. header: Set the logo image and styles used in the header here.
4.3. Navbar: Set the items and the URL's they map on the navigation bar. This also includes the items that show up under the user dropdown on the right corner of the navbar.
4.4. Footer: Configure the columns and links in the footer section.
4.5. Pages: Contains an array of the different pages of the webapp. Here you can map a url to a page, and set the layout, contents, elements and styles for each page item. Note: "pageKey" is used to map to a file in locales to render the labels for the elements of the page in each language. "itemkey" defines the name to be looked for in the file defined by "pageKey".
- Create a fork of this repo in your local organisation.
- Copy env-sample.config to .env.production (this file should be commited so should never contains secret values)
- Configure the fields present in the file env-sample.config. Make sure to update the fields like Recaptcha key, instance, etc. Lookup step 1 of local setup for examples.
- Create github secrets for the following fields:
- DOCKER_ORGANIZATION
- DOCKER_REPO_NAME
- DOCKER_USER
- DOCKER_PASSWORD
- Configure the actions file under .github/workflows/docker-image.yml to build and deploy docker images as needed.
- Create
.env.localusing the template .env.local.template
Replace the connect urls with all the urls which must be allowed in CSP connect-src, including PARTICIPANT-API SERVICE address, separated by spaces. The option "unsafe-eval" in script-src, is needed for Vega plot rendering.
Note: System falls back to 'en' if REACT_APP_DEFAULT_LANGUAGE and REACT_APP_FALLBACK_LANGUAGE is not set.
-
Install dependencies by running
yarn install -
Run the web ui by entering
yarn start
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject, you can’t go back!
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.
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.
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.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
to start deployment, after having pushed modifications to the repository, we have to create a tag and push it :
git tag v1.2.3
git push origin v1.2.3