Terraware Web
The web app provides seed inventory management capabilities - with two main areas of focus: the seed processing workflow and monitoring of a seed bank's physical infrastructure.
https://github.com/terraware/terraware-web
Category: Biosphere
Sub Category: Deforestation and Reforestation
Keywords from Contributors
animations profile composable conversion measures observability synchronous tabs contributing feature-toggle
Last synced: about 19 hours ago
JSON representation
Repository metadata
- Host: GitHub
- URL: https://github.com/terraware/terraware-web
- Owner: terraware
- License: apache-2.0
- Created: 2021-06-04T13:01:18.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2026-03-18T04:22:52.000Z (9 days ago)
- Last Synced: 2026-03-18T08:50:13.715Z (8 days ago)
- Language: TypeScript
- Homepage: tree-location-web.vercel.app
- Size: 2.9 GB
- Stars: 9
- Watchers: 5
- Forks: 2
- Open Issues: 5
- Releases: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Agents: AGENTS.md
README.md
Terraware Web
This is the front end web app for the Terraware application
from Terraformation.
The web app provides seed inventory management capabilities - with two main areas of focus: the seed processing workflow
and monitoring of a seed bank's physical infrastructure.
About this open-source project
If you're not a Terraformation employee, thanks for checking this repo out!
We're offering this project as Apache-licensed open source in the interest of sharing our technology with the world and
being transparent about our work. Our mission is to accelerate global native forest restoration, and we believe we'll
get there faster by sharing what we do.
For the moment, we're not asking for code contributions from the community. (Check
our careers page if you're itching to work on this code!)
You may see references to some private repositories in the documentation. We're working toward opening more of our code,
but not everything is ready yet.
Requirements
- Docker Desktop version
4.32.0or later
How to Run the App in Development Mode
- Copy
.env.samplefrom the root directory of this repo to the same directory, with the filename.env- If you work for Terraformation and are using existing Keycloak setup, refer to the secrets in the "Onboarding
Plan for Frontend WebApp Developers" confluence page
- If you work for Terraformation and are using existing Keycloak setup, refer to the secrets in the "Onboarding
- Login to Docker hub
docker login
- Install dependencies
yarn
- Start the app
yarn docker:start # Run the server code
yarn start # Run the front-end code
- Login. If you configured your environment variables correctly then you'll be taken to a keycloak login page. You may
also try to login using through this API endpoint.
http://localhost:8080/api/v1/login?redirect=http://localhost:3000/
- Stop the app
yarn docker:stop
# Stop the process running the frontend
How to Generate Translations
The file src/strings/csv/en.csv has all the human-readable strings in the app. If you're going to make text changes (
including adding new text), you'll need to edit that file as well as the translation files for other languages.
We use an automatic translation tool that generates translations using OpenAI's API.
Get an OpenAI API key from your OpenAI account administrator or create one
using the OpenAI platform console. It should have write permission on the
Responses API.
Put the key in your .env file under the name OPENAI_API_KEY.
To translate newly-added or edited strings, you have two choices. You can do it as a one-off operation:
yarn translate
Or you can run autotranslate in "watch mode," which will watch for changes to src/strings/csv/en.csv and automatically
request translations as needed. You can leave it running in the background.
yarn translate:start &
How to Generate RTK Query code
The file ./rtk-codegen.config.ts configures the endpoints to be generated, and the desintation files. You will need to
update
this file to generate new sets of API.
-
Update
./rtk-codegen.config.ts -
Generate new queries
yarn generate-queries -
Add tags/invalidations
This step is neccessary for RTK Query to function correctly. This configures data invalidation behaviors.
AddprovidedTags/invalidateTagsbehaviors to endpoints undersrc/queries/extensions
How to Contribute
Before putting up a pull request, make sure to run the following commands. The CI will check that these steps are
completed.
yarn generate-types # generate types for any server side API changes
yarn format # run code formatter
yarn lint # run linter to check for code quality issues
yarn ts # run the typescript types checker
yarn translate # generate translations; requires OpenAI API key
yarn test # run the rstest (unit and integration) tests
# run the end to end tests, see the section below for more details
Tip: you can run everything except the end-to-end tests using:
yarn generate-types && yarn format && yarn lint && yarn ts && yarn test
How to Run the End-to-End Tests
Execute this command before each run of the end-to-end tests. This script does two things. #1 it downloads and start a
Docker image for the terraware backend server and #2 it resets the state of the terraware database.
yarn server:reset
Tip: if you want to save the contents of a terraware database that you're using for manual testing, you can dump the
contents of that database and reload them later. You can also rename the existing database using the following commands.
# connect to another local psql database that isn't terraware
psql postgres
# rename the existing terraware database to save it's contents
ALTER DATABASE terraware RENAME TO terrawareTEMP;
If this is your first time running the end-to-end tests, run this to install the necessary dependencies:
yarn playwright install
To run the end-to-end tests:
yarn server:reset # start server and reset database state
yarn start:dev # start the frontend
yarn playwright:run # run the tests on the command line and generate a report
yarn playwright:run --debug # run the tests on the command line in debug mode and generate a report
yarn docker:stop # don't forget to stop the server when you're done
Connecting to the Database
If you want to examine or change the database that's used for your local testing, you can run the PostgreSQL interactive
command-line client. This will only work after you've run scripts/resetdb.sh or yarn docker:start.
docker compose exec postgres psql -U postgres terraware
To exit the PostgreSQL client, type \quit or hit control-D.
Running a prod-like build locally with nginx
Developer builds use non-optimized, hot-reloading builds served via
rsbuild on http://localhost:3000 . These are ideal for the normal
developer workflow, but you'll want to run a production-like build in
order to test changes to:
- The
nginxconfiguration (nginx/default.conf.template) - The build process
- The optimization/packaging process
then run the following steps to launch a prod-like build on
http://localhost:3001 :
(Note that you have to have this in .env before building: PUBLIC_TERRAWARE_API=http://localhost:8080)
yarn docker:start:prod # run once to start terraware-server and nginx
yarn generate-strings # optional: only run if new strings have been added since last build
yarn build # run each time JS/CSS/image resources change (including strings)
curl http://localhost:3001 # optional: verify that nginx is running correctly
Each time you change JS, Typescript, CSS, or other static resources,
you must re-run yarn build. This is fairly slow, which is why it's
not the normal developer workflow.
When finished, shut down the prod-like build with:
yarn docker:stop:prod
Useful links
Owner metadata
- Name: Terraformation
- Login: terraware
- Email:
- Kind: organization
- Description:
- Website: https://terraformation.com
- Location:
- Twitter: GlobalTerraform
- Company:
- Icon url: https://avatars.githubusercontent.com/u/67658396?v=4
- Repositories: 4
- Last ynced at: 2023-03-06T03:34:16.540Z
- Profile URL: https://github.com/terraware
GitHub Events
Total
- Watch event: 2
- Delete event: 975
- Issue comment event: 1462
- Push event: 3072
- Pull request review comment event: 907
- Pull request event: 1971
- Pull request review event: 2216
- Fork event: 2
- Create event: 1095
Last Year
- Watch event: 2
- Delete event: 998
- Issue comment event: 1474
- Push event: 3143
- Pull request review comment event: 934
- Pull request event: 2008
- Pull request review event: 2272
- Fork event: 2
- Create event: 1117
Committers metadata
Last synced: 5 days ago
Total Commits: 5,066
Total Committers: 19
Avg Commits per committer: 266.632
Development Distribution Score (DDS): 0.704
Commits in past year: 1,625
Committers in past year: 10
Avg Commits per committer in past year: 162.5
Development Distribution Score (DDS) in past year: 0.649
| Name | Commits | |
|---|---|---|
| constanzauanini | c****i@a****m | 1501 |
| Karthik B | k****k@t****m | 750 |
| Tommy Lau | 8****3 | 446 |
| Josh Buchea | j****a | 404 |
| Isaac Hudson | i****n@t****m | 384 |
| Nicholas Graziano | n****o@g****m | 368 |
| terraware-phrase | 1****e | 301 |
| Steven Grimm | 1****m | 274 |
| Charlie Keith | 1****f | 174 |
| renovate[bot] | 2****] | 167 |
| alexTerraformation | 1****n | 132 |
| dependabot[bot] | 4****] | 79 |
| Kalina Allen | k****7 | 37 |
| Carlos Thurber | c****r@a****m | 30 |
| Ben Hamilton (Ben Gertzfield) | b****n@t****m | 12 |
| chudo76 | c****o@t****m | 4 |
| Manu Castro | 7****o | 1 |
| Ryder Donahue | 1****n | 1 |
| manu-castro | c****o@g****m | 1 |
Committer domains:
Issue and Pull Request metadata
Last synced: 6 days ago
Total issues: 27
Total pull requests: 3,225
Average time to close issues: 14 days
Average time to close pull requests: 4 days
Total issue authors: 10
Total pull request authors: 17
Average comments per issue: 1.37
Average comments per pull request: 1.49
Merged pull request: 2,599
Bot issues: 3
Bot pull requests: 308
Past year issues: 6
Past year pull requests: 1,247
Past year average time to close issues: 3 months
Past year average time to close pull requests: 1 day
Past year issue authors: 5
Past year pull request authors: 10
Past year average comments per issue: 1.83
Past year average comments per pull request: 1.4
Past year merged pull request: 974
Past year bot issues: 1
Past year bot pull requests: 118
Top Issue Authors
- constanzauanini (5)
- tommylau523 (5)
- joshbuchea (5)
- karthikbtf (4)
- renovate[bot] (3)
- sgrimm (1)
- Timograff (1)
- nickgraz (1)
- terraware-phrase (1)
- howieyuen (1)
Top Pull Request Authors
- constanzauanini (826)
- tommylau523 (373)
- joshbuchea (347)
- ice1080 (324)
- nickgraz (309)
- terraware-phrase (287)
- renovate[bot] (194)
- sgrimm (164)
- karthikbtf (154)
- dependabot[bot] (114)
- alexTerraformation (97)
- calitb (23)
- kallen07 (14)
- depfu[bot] (1)
- terraformation-deploy (1)
Top Issue Labels
- UPDATE-MAJOR (3)
- bot (2)
- renovate (2)
- A13 (1)
- Gitalk (1)
- /docs/golang/tools/pprof/ (1)
Top Pull Request Labels
- bot (154)
- renovate (154)
- dependencies (113)
- UPDATE-MAJOR (105)
- javascript (13)
- do not merge (4)
- wip (2)
- documentation (1)
- depfu (1)
Dependencies
- @cypress/code-coverage ^3.9.9 development
- @cypress/instrument-cra ^1.4.0 development
- cypress ^8.7.0 development
- esm ^3.2.25 development
- http-proxy-middleware ^2.0.1 development
- jest-mock-axios ^4.4.1 development
- jest-mock-extended ^2.0.4 development
- nyc ^15.1.0 development
- openapi-typescript ^4.0.2 development
- start-server-and-test ^1.14.0 development
- tslint ^6.1.3 development
- tslint-config-prettier ^1.18.0 development
- tslint-eslint-rules ^5.4.0 development
- tslint-react ^5.0.0 development
- tslint-react-hooks ^2.2.2 development
- @date-io/date-fns ^2.14.0
- @date-io/moment ^1.3.13
- @dnd-kit/core ^6.0.5
- @dnd-kit/sortable ^7.0.1
- @emotion/react ^11.9.3
- @emotion/styled ^11.9.3
- @mui/icons-material ^5.8.4
- @mui/lab ^5.0.0-alpha.88
- @mui/material ^5.8.7
- @mui/styled-engine-sc ^5.8.0
- @mui/styles ^5.8.7
- @mui/x-date-pickers ^5.0.0-alpha.7
- @terraware/web-components ^1.0.7
- @testing-library/jest-dom ^5.11.4
- @testing-library/react ^11.1.0
- @testing-library/user-event ^12.1.10
- @types/jest ^26.0.23
- @types/node ^15.12.0
- @types/react ^17.0.9
- @types/react-dom ^17.0.6
- @types/react-router-dom ^5.1.7
- axios ^0.21.1
- chart.js ^3.3.2
- chartjs-adapter-date-fns ^2.0.0
- classnames ^2.3.1
- cookies-js ^1.2.3
- date-fns ^2.28.0
- jwt-decode ^3.1.2
- license-report ^6.0.0
- moment ^2.29.1
- react ^17.0.2
- react-dom ^17.0.2
- react-localization ^1.0.17
- react-map-gl ^6.1.16
- react-responsive ^9.0.0-beta.6
- react-router-dom ^5.2.0
- react-scripts ^4.0.3
- recoil ^0.3.1
- sass ^1.38.0
- styled-components ^5.3.5
- tslint-plugin-cypress ^1.0.4
- typescript ^4.3.2
- utm ^1.1.1
- web-vitals ^1.0.1
- worker-loader ^3.0.8
- 1923 dependencies
- actions/cache v5 composite
- actions/checkout v6 composite
- actions/setup-node v6 composite
- chrnorm/deployment-action v2 composite
- chrnorm/deployment-status v2 composite
- actions/cache/restore v5 composite
- actions/cache/save v5 composite
- actions/checkout v6 composite
- actions/setup-node v6 composite
- actions/upload-artifact v6 composite
- atlassian/gajira-login master composite
- aws-actions/configure-aws-credentials v5 composite
- docker/build-push-action v6 composite
- docker/login-action v3 composite
- docker/setup-buildx-action v3 composite
- nick-fields/retry v3 composite
- slackapi/slack-github-action v2.1.1 composite
- terraware/gajira-transition-multiple master composite
- JamesIves/github-pages-deploy-action v4.4.3 composite
- actions/cache v3 composite
- actions/checkout v4 composite
- nginx 1.25-alpine build
- postgis/postgis 15-3.3
- terraware/terraware-server STAGING
- nginx 1.25-alpine build
Score: 5.583496308781699