Coder Social home page Coder Social logo

rintala / stock-ed Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 2.99 MB

Educational stock application, displaying real data from the Alpha Vantage API.

HTML 2.22% CSS 1.52% JavaScript 96.25%
react stock stocks firebase-backend alpha-vantage-api educational

stock-ed's Introduction

stock-ed

Deployed app is live on

https://stock-ed.netlify.com/

Use the login username and password provided in the submission comment in Canvas, signup using the form on the live site, or ask for them by sending a mail to [email protected].

Run and build project locally

Firebase backend config

Set the following environment variables on your system, in order to succesfully connect to the Firebase backend. The config variables can be found in your Firebase dashboard under 'Project settings':

  • REACT_APP_AUTH_DOMAIN
  • REACT_APP_DATABASE_URL
  • REACT_APP_PROJECT_ID
  • REACT_APP_STORAGE_BUCKET
  • REACT_APP_MEASUREMENT_ID
  • REACT_APP_APP_ID
  • REACT_APP_MESSAGING_SENDER_ID
  • REACT_APP_API_KEY
  • REACT_APP_SECRET_API_KEY

The name have to match exactly the above
For the Alpha Vantage Api Key, you'll have to contact us.


In the project directory, you can run:

npm install

This will install all the dependencies

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

The project

Description

This is a web app where you can set up your own virtual stock portfolio, see overall development on the portfolio as well as overtime development on specific stocks. The stocks can be bought with fake money and will then be added to a personal portfolio. Thus, providing the user with the educational value of learning to trade and manage their assets, but without any associated risks. In addition, the user will possibly be given some sort of score according to ROI.

Stack

The app will be built in React, with a backend in Firebase for data storage as well as authentication. Also, Material UI will be used for simplifying styling.

API

Alpha Vantage will be used to access all data concerning the stock information, such as stock buy/sell price and historical data. Alpha Vantage has a reliable and widely used test API, which is simple to register for and utilize.

Reference: https://www.alphavantage.co/documentation/

Data

Our app will get all the data from the API connected to the individual portfolio, such as stocks in portfolio, purchase price, stock id, date of purchase and quantity. The users and their related information will be stored in the backend, and thus not retrieved via the Alpha Vantage API.

Mockup

login

signup

dashboard

stocks-overview

stock-details

stock-confirm

profile

Progress

All of the different pages are created and they have the functionality they're intended to have. The search page do fetch data from from Alpha Vantage API, but since it is a free API service we cannot do more than a few API requests each minute which affects the user experience of the service since you have to wait in between each call.

The portfolio data is displayed in several ways in order for the user to get a good overview of his/her investments. Future "nice-to-have" features would be to implement more tips and feedback over time, for example different levels for each user, and gamify the platform to a greater extent than just return on investment. We believe this is a solid code base that can easily be contributed to and built upon; so we encourage anyone who wants and is interested to continue building onto this repo.

The file structure is based on the purpose of the file. For example the components and API calls are two different thing, hence exists in two different folders. The components are class based.

stock-ed's People

Contributors

rintala avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stock-ed's Issues

Add some filtering to the stock search

Searching for e.g. Spotify returns:

SPOT | Spotify Technology S.A. | United States
639.FRK | Spotify Technology S.A. | Frankfurt
639.DEX | Spotify Technology S.A. | XETRA
639.STG | SPOTIFY TECHNOLOGY S.A. Actions | Stuttgart
0SPT.LON | Spotify Technology S.A. | United Kingdom
SPOTN.MEX | Spotify Technology S.A. | Mexico
639.BER | SPOTIFY TECH. S.A. EUR 1 | Berlin
639.DUS | SPOTIFY TECH. S.A. EUR 1 | Dusseldorf
639.HAM | SPOTIFY TECH. S.A. EUR 1 | Hamburg
639.MUN | SPOTIFY TECH. S.A. EUR 1 | Munich

The first one is the correct one, while the others i wrong. No idea what they are

Private Routing

So an unauth user cannot access anything except home / login / signup

Fix the purchase selling logic

  • When selling 100% of one stock, the portfolio is removed, even if there is other stocks in the portfolio
  • Buying over the current funds is possible, and when doing so no funds are removed
  • Able to sell more stocks that exists in the portfolio, when doing so the stocks are not removed from the portfolio.

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.