Seth Martin Yates

Tools Used

Javascript
HTML
CSS
node.js
Express
MongoDB/Atlas
Mongoose
Auth0
CoinMarketCap API
node-fetch
Heroku

Project Overview

Features for Users: Users are able to view the current top ten crypto tokens/coins. With this information, users can calculate their gain/loss on trade of one of these top ten tokens. If users are authenticated their data will be saved, so when they return their information will still be there. They also can remove old trades.

Implementation: This site implements the CoinMarketCap API for all of the crypto data. The CoinMarketCap API can not be called directly from the FrontEnd, so node-fetch had to be implemented to fetch this data. This data is then sent to the FrontEnd as JSON, filling the table, as well as the trade calculator. If the user is authenticated using Auth0, the server will send a response, conditionally rendering a logout button instead of a login button. Anyone can calculate a trade, however, submitting data to Mongo Atlas requires that the user is logged in. Once logged in all trades after logging in will be sent to the server as an object. This data then populates a new Mongoose Schema and properly saves it in MongoDB for future logins. When a user refreshes the page or logs in again, a call is made to MongoDB fetching that user's data, by username. The exact same practice was used in deleting posts. Posts have a specific id, so clicking delete finds the proper user, then the trade they are requesting to delete.