https://github.com/david-fisher/320-F20-Track-III
Ethisim is a website that allows you to easily create and assign ethics simulations. Run them for a participation grade, or develop them further into longer discussions for class.
This is Track III's repository containing code for both the front-end and back-end of Ethisim. This README provides instruction on how to install and setup both the front-end and back-end in order to get the software running.
- Download node.js version 12.18.4 and npm https://www.npmjs.com/get-npm
- Clone the Github repository
- cd into the ethisim folder
- Run npm install, This should install all dependencies if this doesn't work see section below
- To run the front-end, use npm start to run the development build at local host:3000
- You are done, but note that you will need to have the back-end running as well for the front-end to connect to the database and see current scenarios on the dashboard
- npm install [email protected]
- npm install [email protected]
- npm install [email protected]
- npm install [email protected]
- npm install [email protected]
- npm install [email protected]
- npm install @material-ui/[email protected]
- npm install @material-ui/[email protected]
- npm install @material-ui/[email protected]
- npm install @testing-library/[email protected]
- npm install @testing-library/[email protected]
- npm install @testing-library/[email protected]
- npm install [email protected]
- npm install [email protected]
- npm install [email protected]
1. Npm install --save-dev --save-exact prettier will install prettier
2. Make sure to install eslint before installing eslint-config-prettier which allows prettier and eslint to work together nicely
3. Npm install eslint --save-dev will install eslint
4. Run npx eslint --init to set up an configuration file
- Questions will appear and the directions tell you to use arrow keys to select an answer even though the arrow keys don’t work.
Think of the options presented to you in each question as an array starting at 0 or 1.
If you want for example option one out of three for the second question,
then type in 0 to the command line and press enter and that should select the answer that you want.
- Answer all the questions before moving forward, if you mess up on one of the answers, just press Ctrl^C and re-run the npx eslint --init command
5. You might also need to install eslint-plugin-react@latest, if so follow the directions on the command line after finishing the previous step
6. Make sure prettier and eslint are both installed before we run npm install --save-dev eslint-config-prettier so prettier and eslint will work together nicely with each other
7. Then, add eslint-config-prettier to the "extends" array in your .eslintrc.* file. Make sure to put it last, so it gets the chance to override other configs. It might already be there.
{ "extends": [ "some-other-config-you-use", "prettier"]}
8. To install Husky Make sure Prettier is installed and is in your devDependencies before you proceed and then run npx mrm lint-staged
9. This will install husky and lint-staged, then add a configuration to the project’s package.json that will automatically format supported files in a pre-commit hook. After this step you are done
- Install python3
- sudo pip3 install pipenv (do it globally)
- clone https://github.com/david-fisher/320-F20-Track-III.git
- Navigate to moral_kombat_backend folder
- pipenv shell
- pipenv install -r requirements.txt
- cd lead
- python3 manage.py runserver
- Go to moral_kombat_backend directory
- pipenv shell
- cd lead
- python3 manage.py runserver
- https://www.python.org/downloads/ (Checkmark all optional features, add Python to environment variables)
- clone https://github.com/david-fisher/320-F20-Track-III.git
- Navigate to moral_kombat_backend folder
- Open Terminal (IF RUN INTO ERRORS INSERT py -m before each command)
- pip install -r requirements.txt
- cd lead
- python manage.py runserver
- Might need to download https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
- Go to moral_kombat_backend directory
- cd moral_kombat_backend
- cd lead
- py -m manage.py runserver
Download postman
Used ElephantSQL (postgreSQL) Schema Diagram: https://dbdiagram.io/d/5f8326e63a78976d7b772f0c
You can find the list of endpoints here at: https://docs.google.com/document/d/1QSiUe21Z_TgT5XZKyR0twevRM864_AswxzVdYLwqW1I/edit?usp=sharing
To see REST Documentation run both the front-end and back-end and type http://localhost:8000