Type | Link |
---|---|
prod | https://happy-cows.dokku-00.cs.ucsb.edu/ |
qa | https://happy-cows-qa.dokku-00.cs.ucsb.edu/ |
Team | Link |
---|---|
w24-4pm-1 | https://happycows.dokku-01.cs.ucsb.edu/ |
w24-4pm-2 | https://happycows.dokku-02.cs.ucsb.edu/ |
w24-4pm-3 | https://happycows.dokku-03.cs.ucsb.edu/ |
w24-4pm-4 | https://happycows.dokku-04.cs.ucsb.edu/ |
Team | Link |
---|---|
w24-4pm-1 | https://happycows-qa.dokku-01.cs.ucsb.edu/ |
w24-4pm-2 | https://happycows-qa.dokku-02.cs.ucsb.edu/ |
w24-4pm-3 | https://happycows-qa.dokku-03.cs.ucsb.edu/ |
w24-4pm-4 | https://happycows-qa.dokku-04.cs.ucsb.edu/ |
This is a full rewrite of the application HappyCows, a project sponsored by Mattanjah de Vries, Distingished Professor of Chemistry at UC Santa Barbara.
The application is a simulation game that gives players (typically students in Prof. de Vries' courses) an opportunity to learn about the Tragedy of the Commons.
This rewrite uses the new tech stack being developed for CMPSC 156. This tech stack uses:
The GitHub actions script to deploy the Storybook to QA requires some configuration; see docs/github-actions.md for details.
If these repos are not yet setup, see the setup steps in docs/storybook.md
.
A description of how the game is played and what scheduled actions are run are given under docs/gamePlay.md
For information on environment variables used in the app, refer to docs/environment.md.
Before running the application for the first time,
you need to do the steps documented in docs/oauth.md
.
Otherwise, when you try to login for the first time, you will likely see an error such as:
mvn spring-boot:run
cd frontend
npm install # only on first run or when dependencies change
npm start
Then, the app should be available on http://localhost:8080
If it doesn't work at first, e.g. you have a blank page on http://localhost:8080, give it a minute and a few page refreshes. Sometimes it takes a moment for everything to settle in.
If you see the following on localhost, make sure that you also have the frontend code running in a separate window.
Failed to connect to the frontend server... On Dokku, be sure that PRODUCTION is defined. On localhost, open a second terminal window, cd into frontend and type: npm install; npm start;
To access the swagger API endpoints, use:
cd into frontend
use: npm run storybook
This should put the storybook on http://localhost:6006
Additional stories are added under frontend/src/stories
For documentation on React Storybook, see: https://storybook.js.org/
In order to run the integration and end-to-end test suite, using the following series of commands
mvn clean
INTEGRATION=true mvn test-compile
INTEGRATION=true mvn failsafe:integration-test
In order to run the end-to-end tests 'not headless' use the following instead of the last command.
INTEGRATION=true HEADLESS=false mvn failsafe:integration-test
This repo has support for partial pitest runs
For example, to run pitest on just one class, use:
mvn pitest:mutationCoverage -DtargetClasses=edu.ucsb.cs156.happiercows.controllers.CommonsController
To run pitest on just one package, use:
mvn pitest:mutationCoverage -DtargetClasses=edu.ucsb.cs156.happiercows.controllers.\*