- Download npm from this if not already
- Download this Repo and go to the local folder.
- Open 2 terminal windows and go to FrontEnd and BackEnd folders, respectively.
- (In BackEnd terminal) create the a virtual environment using the template code
pip install --upgrade virtualenv
, thenvirtualenv -p python3 venv
- (In BackEnd terminal) start the created environment with
source venv/bin/activate
- (In BackEnd terminal) download libraries through
pip install -r requirements.txt
- (In BackEnd terminal) run
python setup.py install
, followed bypip3 install -e .
. This will allow the use of the app folder itself as a package, simplifying imports. - (In BackEnd terminal) run
aws configure
, and enter the appropriate access keys. - (In BackEnd terminal) navigate to app/mocks folder and run
python main.py
to run backend with mock data, or navigate to app folder and runpython main.py
to run backend with real data. - (In FrontEnd terminal) download webpack server
npm i webpack-dev-server
- (In FrontEnd terminal) download other packages by
npm install
- (In FrontEnd terminal) run the server by
npm run start
E1
-
If receiving errors from chat section: try new API key and secret(will be updated regularly):
Key: 57tcrkskk54w
Secret: jp592pew7pst9jt2w5v3zz6ytpb8j7euq7mfakp5ezxn9j4s2a2e7xch35vk9dgn
-
How to update:
a. Update the ChatApp.js in the components file(only key needed) from FrontEnd folder
b. Update the authentification.py from BackEnd folder(can be found in the beginning of the code).
E2
During some unknown circumstances (different machines, preexisting node_modules), there might be this weird behavior of webpack keeping recompiling.
If this happens: go to This Issue
It is highly recommended to use Visual Studio Code for its extensive library support.
For React style guide, please refer to the Airbnb Style Guide
Please use Prettier to autoformat for React Code along with style guide. The set up for setting.json is the following:
{ "editor.defaultFormatter": "esbenp.prettier-vscode", "[javascriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true }, // Set the default "editor.formatOnSave": false, }
-
"In software engineering, CI/CD or CICD generally refers to the combined practices of continuous integration and either continuous delivery or continuous deployment." link
-
Such principle is implemented by Travis CI in Github. The configuration can be found in this file
-
Any code change must not be directly pushed to Master, the purpose of Master branch is to ensure no matter how we modify the code we still can go back to a working codebase if everything is just messed up. This rule is enforced by Rule setting on Github and any push to Master will be rejected.
-
PR must 1. pass all written tests 2. be reviewed by two developers of the team to be merged into Master. This is to ensure all checks are clear to maintain the quality of existing codebase.
- For Python we will be using the unit test framework.
- For npm we will be using JEST and react-test-renderer. Example can be found here.