Skip to content

waterthetrees/.github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


logo
Water The Trees

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.

Water.The.Trees.Demo.mov

Table of Contents

Getting Started

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.

Prerequisites

  • 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

Run Locally

  1. Clone the waterthetrees parent repo and enter the directory.

    git clone https://github.com/waterthetrees/waterthetrees.git
    cd waterthetrees
  2. Run the script to clone the project's repos.

    ./clone_repos.sh
  3. 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 ..
  4. 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
     │
     |   ...
     
  5. Start the database.

    In the root waterthetrees directory, run:

    docker compose up

    When you want to stop the database, run:

    docker compose down
  6. 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
  7. 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:https://localhost:3000

    When you want to stop the frontend, press Ctrl + C in the terminal.

Contributing

Start by reading the onboarding guide.

Join Us

Join the #proj-waterthetrees Slack channel directly.

or

Join the Code for San Francisco Slack and search for the #proj-waterthetrees channel.

Development

  1. Check the issue tracker to find a feature to build or enhance, a bug that needs fixing, and more.

  2. Create a new branch.

    git checkout -b github-username/feature/build-new-feature
  3. Make the appropriate changes in the files, making sure to follow our Code Conventions.

  4. Commit your changes.

    git commit -am 'Build new feature'
  5. Push to the branch.

    git push origin github-username/feature/build-new-feature
  6. Create a Pull Request.

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or file feature requests.

Releases

No releases published

Packages

No packages published