Skip to content

At-Sea Field Data Collection Software for Scientific Surveys and Observers

Notifications You must be signed in to change notification settings

assemblethis/boatnet

 
 

Repository files navigation

Boatnet

Boatnet provides a suite of tools for collecting fisheries scientific survey and observer monitoring data while aboard commercial, recreational, and NOAA vessels. These include a tablet app for observers and surveys to capture their haul-level catch information and a mobile app for captains to keep track of observer-monitored trips. You can find more details about each project in this section

FRAM Screenshot

For those only interested in running the project follow the How to build and run section and ignore the rest. The remaining sections are for development purposes only. Note: We are currently working on simplifying the process and in the future you can just download an executable and run the application.

Note that without a CouchDB, large sections of the application will not function correctly. We are working on releasing a test version of the CouchDB data.

Projects

Boatnet contains multiple projects located in different directories. The different projects are listed below. All of the projects are currently a work in progress!

OPTECS (Observer Program Technology Enhanced Collection System)

Directory: apps/obs-wcgop-optecs

A tablet application used by observers to log information about fish caught on board. Observers can record stats such as weight, count, species type, and much more. The data collected is used to estimate how many fish can be sustainably caught.

Observer Mobile App

Directory: apps/obs-web

A mobile app for our observer program where captains can log their trips and then see whether they are selected for observer coverage or not.

Survey

Directory: apps/surv-*

Survey applications

How to build and run

Boatnet uses the lerna + yarn workspace monorepo pattern.

  1. Install Node.js - download here

  2. Install yarn

  • npm install -g yarn
  1. (OPTIONAL) Install Visual Studio Code - download here (We use and recommend this IDE for development)
OTHER OPTIONAL STEPS - Not recommended

  • These are optional steps, not currently required.

  • (OPTIONAL) Install node-gyp by launching visual studio code as administrator and running the following from a terminal (Ref: https://www.npmjs.com/package/node-gyp):

  • Windows: npm install -g windows-build-tools
  • Mac: Ensure read/write access to /usr/local/lib/node_modules/npm/node_modules then run yarn global add node-gyp
  • (OPTIONAL) In windows, you should run the initial build from a Visual Studio command prompt. This will install packages specified in packages.json. (re-run when other devs add packages to packages.json)

  1. Clone the repository: git clone git@github.com:nwfsc-fram/boatnet.git

  2. Install lerna globally: npm install -g lerna

  3. Run lerna bootstrap (runs npm install, builds single node_modules)

  4. Run lerna clean (cleans node_modules in subfolders)

  5. Run lerna run build (builds all apps and libraries. This is optional, but should be performed prior to pushing changes, to ensure all projects still build correctly.)

  6. When running the app locally, you'll need to run the dev-auth-server running in order to login. Do this by following the instructions here

  7. Navigate to the project you need, e.g. cd apps/example and yarn serve

  8. See more specific lerna instructions and development setup here.

Troubleshooting Build Issues

Occasionally our lerna monorepo can get into a confused state. The following commands, performed in order, would be a good starting point to try and "reset" a corrupted environment:

# get latest yarn, lerna, and typescript
npm install -g yarn@latest
npm install -g lerna@latest
npm install -g typescript@latest
cd <your-path>/boatnet/
# get latest master branch (known good build)
git pull 
# clean the yarn cache - this has caused issues in the past occasionally (usually this is not required)
yarn cache clean
# remove the yarn.lock to ensure newest packages are acquired (usually this is not required)
rm yarn.lock
# now follow the normal build procedure
lerna bootstrap
lerna clean -y
lerna run build
cd apps/your-app
yarn serve
  • Also, note that file permission issues (e.g. EPERM) usually can be resolved by closing and re-opening Visual Studio Code (and stopping all node.js processes.)

About

At-Sea Field Data Collection Software for Scientific Surveys and Observers

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 55.0%
  • Vue 30.4%
  • HTML 9.9%
  • JavaScript 2.4%
  • CSS 2.3%