Skip to content

keenanchan/Housing_Proj

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Complete Setup Guide

  1. Download npm from this if not already
  2. Download this Repo and go to the local folder.
  3. Open 2 terminal windows and go to FrontEnd and BackEnd folders, respectively.
  4. (In BackEnd terminal) create the a virtual environment using the template code pip install --upgrade virtualenv, then virtualenv -p python3 venv
  5. (In BackEnd terminal) start the created environment with source venv/bin/activate
  6. (In BackEnd terminal) download libraries through pip install -r requirements.txt
  7. (In BackEnd terminal) run python setup.py install, followed by pip3 install -e .. This will allow the use of the app folder itself as a package, simplifying imports.
  8. (In BackEnd terminal) run aws configure, and enter the appropriate access keys.
  9. (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 run python main.py to run backend with real data.
  10. (In FrontEnd terminal) download webpack server npm i webpack-dev-server
  11. (In FrontEnd terminal) download other packages by npm install
  12. (In FrontEnd terminal) run the server by npm run start

Potential Errata:

E1

  1. If receiving errors from chat section: try new API key and secret(will be updated regularly):

    Key: 57tcrkskk54w

    Secret: jp592pew7pst9jt2w5v3zz6ytpb8j7euq7mfakp5ezxn9j4s2a2e7xch35vk9dgn

  2. 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

Development Guide

Editor

It is highly recommended to use Visual Studio Code for its extensive library support.

Style

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, }

CI/CD

  1. "In software engineering, CI/CD or CICD generally refers to the combined practices of continuous integration and either continuous delivery or continuous deployment." link

  2. Such principle is implemented by Travis CI in Github. The configuration can be found in this file

Hard Rules

  1. 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.

  2. 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.

Testings

  1. For Python we will be using the unit test framework.
  2. For npm we will be using JEST and react-test-renderer. Example can be found here.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published