Skip to content

Setting up a developer environment

Ian Turgeon edited this page Jul 2, 2020 · 14 revisions

Getting Started

Obojobo uses javascript on both the client and server. The upside is this streamlines things a little (same testing framework, same language, same tooling for frontend and backend).

The UCF team behind Obojobo exclusively develops on MacOS, so we can only suggest doing the same yourself. It is possible to use other platforms, but we haven't smoothed out any of the bumps. Though, we welcome any PR's that address issues developing on other platforms.

You're going to need Node and Yarn. We highly suggest using nvm to manage node versions, as we keep supported node versions pretty narrow, and update to newer versions regularly. You may find yourself having to switch node versions between branches.

Suggested Setup Steps

  1. Install nvm using homebrew (highly suggest not installing node or yarn directly via homebrew)
  2. Install the version of node used by obojobo (check engines directive in package.json)
  3. Install yarn using npm npm install -g yarn
  4. Install Docker for Mac (to run a PostgreSQL container in step 7)
  5. Fork obojobo on github and clone to your machine using git
  6. Run yarn install (or just yarn) to install all the dependencies
  7. Run yarn db:rebuild to create your PostgreSQL container and run db migrations
  8. Run yarn dev to start a development server! (watch console output for the address to open in your browser)
  9. Visit https://<yourlocalhost>:<port>/dev to find the developer dashboard

Tips

  • always remember to run yarn install when switching branches or merging in upstream changes
  • If jest starts to report a TON of errors that look like it all of a sudden doesn't understand import, delete node_modules and run yarn install. If it persists, try to Stash your changes and clean up untracked files with git clean -dxn (remove n to actually delete). If it still persists, delete all contents of the packages directory and use git reset or git checkout to get them back.