This repository is part of the EDGI Web Monitoring Project.
This component works with web-monitoring-db and web-monitoring-processing to support the next web monitoring workflow.
It’s a React.js-based browser application with a Node.js backend with the following capabilities:
- Consume subset of data from web-monitoring-db as proof of concept, read/write annotations
- DEMO
- LIST VIEW shows first page of records from web-monitor-db JSON endpoint
- PAGE VIEW shows basic info about the latest version of that page: site, URLs and links to Wayback Machine calendar view and page versions
- updates annotations
-
Install Node 18.20.4.
- We recommend using Nodenv, which will automatically select the correct version of Node.js to run for you.
- If you don’t yet have the right version of Node.js installed, enter the root directory for this project and then run
nodenv install
.
- If you don’t yet have the right version of Node.js installed, enter the root directory for this project and then run
- Alternatively, you can use NVM or a variety of alternatives for managing multiple versions of Node.js.
- We recommend using Nodenv, which will automatically select the correct version of Node.js to run for you.
-
Install node dependencies with
npm
npm install
-
Copy
.env.example
to.env
and supply any local configuration info you need (all fields are optional) -
Start the web server!
npm start
…and point your browser to http://localhost:3001 to view the app. If you haven't changed
WEB_MONITORING_DB_URL
in your.env
file (step 3), you can log in with the public user credentials:- Username:
public.access@envirodatagov.org
- Password:
PUBLIC_ACCESS
- Username:
To run all tests once
npm test
while to start the test runner in watch mode
npm run test-watch
Access the main view at http://localhost:3001
This repository falls under EDGI's Code of Conduct.
We need your help! Please read through the Web Monitoring Project project document and see what you can help with and check EDGI’s contribution guidelines for information on how to propose issues or changes.
You can also run this project via Docker. To build and run (on port 3001, as in the instructions for running directly above):
docker build -t envirodgi/ui .
docker run -p 3001:3001 -e <ENVIRONMENT VARIABLES> envirodgi/ui
Point your browser to http://localhost:3001
.
To run tests via Docker:
docker build -t envirodgi/ui:dev --target dev .
docker run envirodgi/ui:dev npm run test
New releases of the app are published automatically as Docker images by CircleCI when someone pushes to the release
branch. They are availble at https://hub.docker.com/r/envirodgi/ui. See web-monitoring-ops for how we deploy releases to actual web servers.
Images are tagged with the SHA-1 of the git commit they were built from. For example, the image envirodgi/ui:6fa54911bede5b135e890391198fbba68cd20853
was built from commit 3802e0392fb6fe398a93f355083ba51052e83102
.
We usually create merge commits on the release
branch that note the PRs included in the release or any other relevant notes (e.g. Release #395
).
This project wouldn’t exist without a lot of amazing people’s help. Thanks to the following for all their contributions!
(For a key to the contribution emoji or more info on this format, check out “All Contributors.”)
Copyright (C) <2017> Environmental Data and Governance Initiative (EDGI) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3.0.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the LICENSE
file for details.