Giter VIP home page Giter VIP logo

stockxchange's Introduction

StockXchange

  • A web app for managing stock portfolios with real world data.

Live Demo

Check out the live demo at stockXchange.onrender.com

Note: Please keep in mind that this is a demo version, so the server might be slow sometimes and the API used is limited. Both are free, so no complaints here!

Features

With StockXchange, you can manage portfolios of stocks and check their actual prices and portfolio values in real-time with real world data. This app is fully mobile compatible, allowing you to access your portfolios on the go. You can also "buy" and "sell" stocks by querying an API for their prices and keep track of your portfolio and transaction history.

Technical Details

This app was built with Flask and encapsulated by Gunicorn for hosting on Render 24/7. It builds from my GitHub repo and any editing I make locally and push via Git CLI, it automatically updates the remote server and creates a new build. The client-side uses Jinja templating engine, vanilla HTML, Bootstrap, and just a tiny bit of CSS for simplicity.

Your password is hashed with Wekzeug security before being written to the database. The session is configured to use the file system instead of signed cookies. The API is included in the .gitignore file but accessed on the server via an environment variable.

The AlphaVantage API was used, which serves the purpose of the demo, but sometimes exceeds the API limit and impact app functionality. The API calls a local CSV file with a list of symbols and names to add the company names, as the API doesn't provide this information in the JSON. The database is volatile on the server and it can have some impact of the functionality and validations on the live site.

Idea

The idea for this app started as a Harvard CS50 course project using a stock data API and a database to write and store information. The biggest challenge was adapting the app for hosting, which involved creating a new database function as well as finding a free API to fetch the desired data.

Lessons learned

As this was my first full-fledged web app, it taught me a lot, from learning various tools to debugging when the API returned None instead of results. In the future, I would like to improve this app by using more functions or even Django for abstracting some things like the login and session functions. I would also try to get better data from stocks using a better API or web scraping. Implement some JavaScript and AJAX on the front-end to display stock prices and symbols as the user types. I think it would be cool to gamify the app with a leaderboard and a payment api charging a small fee for the "adding cash" function.

Screenshots:

Login Page

Stock Quote

Transactions History

Validation Error

stockxchange's People

Contributors

felixoakz avatar

Stargazers

 avatar Uanderson Moises avatar

Watchers

 avatar

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.