Water The Trees is a platform that crowd sources tree planting and maintenance. We believe in the power of trees to restore natural habitat for animals, insects, and fauna. We are interesting in continuous massive tree planting events to help sequester carbon and stabilize climate change extremes.
This is an open source project run by tree planting volunteers at Sierra Club and Public Works, and developers at Code for San Francisco.
- Website: https://waterthetrees.com
- Technology: Mapbox, React, Node, Postgres/PostGIS, Martin, Nginx, Docker
Water.The.Trees.Demo.mov
These instructions will get the project up and running on your local machine for development and testing purposes. If you encounter any trouble with these instructions please create an issue with the details of your problem on our issue tracker.
- Git
- Git-LFS
- Node version 18 or greater.
- We recommend installing node using nvm. Our install script can install this for you if you don't already have it.
- Docker
-
Clone the
waterthetrees
parent repo and enter the directory.git clone https://github.com/waterthetrees/waterthetrees.git cd waterthetrees
-
Run the script to clone the project's repos.
./clone_repos.sh
-
For easy install, run the install script.
./install.sh
Otherwise, you will need to manually set up the backend and frontend.
Set up the backend:
- Go into the
wtt_server
directory. - Install the node modules.
- Create the
.env
file. - Return to the root
waterthetrees
directory.
cd wtt_server cp .env.example .env npm install cd ..
Set up the frontend:
- Go into the
wtt_front
directory. - Install the node modules.
- Return to the root
waterthetrees
directory.
cd wtt_front npm install cd ..
- Go into the
-
The database config is passed into our backend server using environment variables. You will need to ask a team member to provide you with the environment variables (Try our Slack channel). Paste the contents into the
wtt_server/.env
file.Your file tree structure should look something like this.
waterthetrees | └───wtt_front | │ ... | └───wtt_server │ │ .env | | .env.example │ │ │ └───server │ │ ... | └───wtt_db | | │ └───treeddb.sql │ | ...
-
Start the database.
In the root
waterthetrees
directory, run:docker compose up
When you want to stop the database, run:
docker compose down
-
Start the backend.
Open another terminal tab and go into the
wtt_server
directory.cd wtt_server
Then run the following to start the backend.
npm run start
-
Start the frontend.
Open another terminal tab and go into the
wtt_front
directory.cd wtt_front
Then run the following to start the frontend and open it in the browser.
npm run start:dev & open http://localhost:3000
When you want to stop the frontend, press
Ctrl + C
in the terminal.
Start by reading the onboarding guide.
Join the #proj-waterthetrees Slack channel directly.
or
Join the Code for San Francisco Slack and search for
the #proj-waterthetrees
channel.
-
Check the issue tracker to find a feature to build or enhance, a bug that needs fixing, and more.
-
Create a new branch.
git checkout -b github-username/feature/build-new-feature
-
Make the appropriate changes in the files, making sure to follow our Code Conventions.
-
Commit your changes.
git commit -am 'Build new feature'
-
Push to the branch.
git push origin github-username/feature/build-new-feature
-
Create a Pull Request.
Please use the issue tracker to report any bugs or file feature requests.