Like CS50 Finance, with a more user friendly design.
From a users standpoint the original app was frustrating to use, especially if the user made an error.
I started with implementing typeahead and later added more UI/UX improvements.
Comparison of the old index page vs the new index page
Searching for stocks is easier thanks to typeahead.
Buying shares or cancelling transactions is now possible.
In the previous app, the user would have had to type the correct symbol and the right
number of shares.
Comparison of login/register logic
Old version of finance: errors redirect to an error page which the user must navigate away from
New version: users are given real-time feedback, there is no need to navigate back
Old method of buying and selling shares - calculations and checks all done on server side
Calculations done client-side with the user receiving immediate feedback - value of shares are updated and cash balance is changed.
When there isn't enough cash available, the maximum amount of shares are calculated and
shown.
In addition, the buy button is disabled if there is not enough cash available.
Transactions are not confirmed until the user decides to confirm them with the button.
This required an overhaul of the calculation logic and was a challenging task.
Confirming the transaction data doesn't require a page
reload as it did before.
Using event handlers to constrain what the user could do was another UI change.
If the user decides to buy, the sell input is disabled and vice versa.
Other changes included avoiding duplicate entries, managing AJAX responses where an API call failed.
Separating API, database and server logic
More readability than raw SQL strings
Separate module that updates a list of all purchasable stocks
Enabling real-time updates and calculations
The app may take some time to load as the server initializes
Create your own account or use:
Username: testuser
Password: testuser