Skip to content
/ traderu Public template
forked from bryce-mcmath/traderu

Stock and cryptocurrency trading simulator

Notifications You must be signed in to change notification settings

jlangy/traderu

 
 

Repository files navigation

TraderU

Stock and cryptocurrency trading simulator

Build Status codecov code style: prettier

NOTE: To be used on mobile and tablet only, we have not yet added support for desktop

TraderU is a progressive web app (PWA) made to simulate stock and cryptocurrency trading. It utilizes several publicly available APIs to do so, most notably AlphaVantage. It's a full stack application designed using a mobile-first approach, deployed with an AWS Pipeline to a live site here.

Table of contents

Usage

Demo:

Demo

The above gif demonstrates our basic app flow. For more screenshots and other documentation, navigate to the /docs directory from the root of this repo.

Getting started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

If you don't have Nodejs and npm installed, install them from here.. You'll also want the Vue CLI tool, which you can install after you install Node like this:

npm i -g @vue/cli

Installing and Running

Clone this repository to your local machine and then create a .env following the .env.example file

Install Dependencies

In the root directory:

npm i
npm run lerna-install

Available Root Commands

Compiles and minifies both server and client for production

npm run build

Start the compiled JS server

npm run start

Hot TypeScript server reload for development

npm run dev

Run unit and integration tests in both the client and server

npm run test

Generate new docs for both the client and server

npm run jsdoc

NOTE: Our client side JSDoc comments are almost not existent, but our server should generate semi-decent ones. Browse to /docs/jsdoc/server/ and open up index.html in your browser to see the outputted documentation

Other available Commands

There are more commands than is necessary to list here, refer to package.json files to view them.

Built with

  • Vue - Front-end framework, used the full suite (Vuex, Vue-Router, Vuetify etc.)
  • D3.js - JS Data Visualization framework - our graphs and charts and gauges are built with this
  • Lerna - How we're able to run many subdirectory commands with a single root command
  • TypeScript - Javascript superset to add type checking (Strict mode only used in server)
  • axios - Promise-based HTTP client
  • Sass - CSS pre-compiler to make styling way easier
  • JSON Web Tokens - For industry standard authentication
  • Nodejs - Javascript runtime
  • Express - Framework used for API in Node
  • PostgreSQL - Open source object-relational database
  • Postman Team - For testing and debugging out routes
  • Jest - Testing library we used for unit and integration tests
  • Cypress - End-to-end testing framework we had time to add a few E2E tests with
  • AWS - Used to deploy our app. The flow works like this: Reach a milestone stable version of development -> merge to master -> Github Hook triggers AWS CodeBuild -> CodeBuild runs install, build, and test stages (see buildspec.yml - Lerna made this very easy) -> If successful, CodeDeploy sends zipped output files to an AWS S3 bucket -> Contents is served with an AWS EC2 instance via AWS Elastic Beanstalk

Contributing

  1. Fork it (https://github.com/bryce-mcmath/traderu/fork)
  2. Create your feature branch (git checkout -b feature/fooBar) or issue branch (git checkout -b issue/brokenThing)
  3. Commit your changes (git commit -m 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new PR and follow the template

NOTE: We have a preferred commit message template in docs/commit_templates.md if you'd like to use that as well. For tiny changes, don't worry about it

Meta

Jon Langlois - jlangy - [email protected]

Wilson Wong – wilwong89[email protected]

Bryce McMath – bryce-mcmath[email protected]

Known issues / bugs

  • Bugs? What bugs?

To add an issue, start a new one here.

Feature roadmap

In the works

  • After demo day we'll get back to work on it. Well after the day after demo day. We need to catch up on sleep the day after.

Planned

  • General robustness, more consistent patterns and clean up
  • Use GZip with requests that recieve text-based JSON payload
  • Market close and open
  • Order duration algorithm, enable option
  • Limit orders, and associated algorithm, enable option
  • Portfolio settings toggles are permanently changed on save
  • Limit on number of accounts per user
  • Push notifications
  • An simple algorithm to generate trade suggestions, so we have something to notify users of
  • Desktop design
  • Set E2E tests to run and exit without developer input
  • More data, more and better data visualizations

In no particular order other than the first one is first

If you'd like to add a feature yourself, please see the Contributing guidelines.

Acknowledgements

For making powerful services inexpensive for students:

  • AlphaVantage
  • ElephantSQL
  • AWS

For being Vue gurus:

  • Gary Jipp
  • LinusBorg on the Vue forums

About

Stock and cryptocurrency trading simulator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 51.8%
  • Vue 29.8%
  • CSS 11.8%
  • JavaScript 4.7%
  • TSQL 1.9%