FinanceSim

About this project
FinanceSim is a fictional stock broker platform I built for CS50x. It allows users to fetch real-time stock information, simulate trades with virtual money, track portfolio performance, and review transaction history. The project was designed to mimic core functionalities of real trading platforms, combining backend logic with data integration from external APIs.
Key Features
- Real-Time Stock Information: Retrieves up-to-date stock data via HTTP calls to the IEX Cloud API.
- Trading Simulation: Buy and sell real stock symbols using fictional currency and monitor portfolio performance.
- User Data Storage: Stores user accounts, holdings, and transactions using a SQLite database.
- Secure Authentication: Implements robust password hashing using Werkzeug’s security utilities for Flask.
Challenges
As this was my first backend-heavy project, one of the main challenges was designing the application’s logic and database structure from scratch. I had to figure out how to accurately manage user portfolios, transaction histories, and live stock data in a consistent way. Handling edge cases—like users trying to buy more stock than they could afford or selling shares they didn’t own—also required careful validation and error handling to ensure realistic behavior.
Learnings
Through this project, I learned how to use Flask to build RESTful APIs and connect backend logic to the user interface. I gained hands-on experience working with SQLite, writing SQL queries, and integrating database functionality into the backend. This was also my first time developing a frontend using pure HTML and CSS, which helped me understand the fundamentals of web layout and styling.