Skip to content

yiwei72/stock_trading_sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello,

This is our course project for ECE651 at the University of Waterloo. We created a stock trading application that simulates buying/selling stocks. The frontend is written in TypeScript with React framework. The backend is written in Java with MyBatis helping generate code.

We received a perfect mark for this project. The code is fully covered with test cases in terms of statement and branch coverage.

Thank you,
Felix Jing, Boyuan Brian Ren, Qinyi Xu, Cuiyang Wang & Yiwei Wang

codecov backend_format backend_test frontend_test_format


Setups:

  1. clone the repo to your local directory
  2. Windows/Mac: install Docker Desktop
  3. Linux:
    sudo apt-get update
    sudo apt-get install docker.io # install docker
    sudo curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
    sudo usermod -aG docker $USER

You will need to create your own mySQL database, and change the configuration files backend/src/main/resources/application.yml and backend/src/main/resources/generatorConfig.xml accordingly.

A final snapshot of our database on AWS (which stores the final state of the database, and can be restored) can be shared with you if you contact the owner of this repository through LinkedIn.


How to work on the project:

Follow this article to fork and create a Pull Request to contribute to this project.

Windows/Mac/Linux:

  1. use cd command to go into the project code directory (Windows: powershell, Mac/Linux: terminal).
  2. run docker-compose up. The docker containers will keep running in the terminal. It does not stop.
  3. Open "127.0.0.1" on your browser and do your test/checking. Modify your code. Then run docker-compose build.
  4. After you are done, use "ctrl + c" to terminate the docker containers.

How to run tests and get test coverage reports locally:

Frontend:

  1. cd frontend to change directory into the frontend
  2. run npm install, npm run build and npm test in that order for the first time. Only run npm run build and npm test afterwards, unless there is a package version change.
  3. open frontend/coverage/lcov-report/index.html to view the coverage report.

Backend:

  1. cd backend
  2. run mvn clean test jacoco:report
  3. open backend/target/site/jacoco-ut/index.html to view the coverage report.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages