Coder Social home page Coder Social logo

traderu's Introduction

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 (no longer in service unfortunately)

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

NOTE: We have a preferred commit message template in docs/NOTES.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

TraderU

traderu's People

Contributors

bryce-mcmath avatar dependabot[bot] avatar jlangy avatar wilwong89 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jlangy

traderu's Issues

Bug: Slide toggle doesn't cover all of text

Describe the bug
The VuemorphicToggle component, when used in the text configuration, doesn't cover all of the text of whatever side it's on. There is a tiny bit still showing.

To Reproduce
Look closely at the portfolio settings section in the gif in the README or just look at it in the actual app.

Expected behavior
User shouldn't see it.

Screenshots
If applicable, add screenshots to help explain your problem.
Toggle Issue

Desktop (please complete the following information):

  • OS
  • Browser
    Universal issue

Smartphone (please complete the following information):

  • Device
  • OS
  • Browser
  • Using as a PWA
    Universal issue

Additional context

Bug: Showing less common stock values

Describe the bug
App is currently using raw values for stock prices, not adjusted values.

To Reproduce
Steps to reproduce the behavior:

  1. Look at ACB stock on traderu.io
  2. Stock is undervalued at all points, due to using raw values

Expected behavior
Should show adjusted values, as these are more common

Additional context
Problem comes from the alpha vantage endpoints we are hitting. The api has adjusted endpoints we should use instead. See https://www.alphavantage.co/documentation/#dailyadj. Updating the url's in the seed functions should fix this, just need to make sure the data format matches

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.