This project is a web application for a financial calculator that helps users plan their retirement by providing various investment strategies based on their current age, desired retirement age, current savings, annual contributions, and desired net worth at retirement.
The financial calculator allows users to input their financial data and provides a set of recommendations for Conservative, Moderate, and Aggressive investment strategies. This helps users make informed decisions about their investments to achieve their desired retirement goals.
The application is built using Flask, a Python-based micro-framework. It utilizes:
- Flask-SQLAlchemy for database management.
- Flask-Migrate for database migration.
- Flask-Login for user authentication and session management.
- Flask-Session for server-side session storage.
The application follows the MVC (Model-View-Controller) design pattern. The User
and CalculationResult
models handle the database schema and relationships. The app.py
file contains the views and routes for handling user registration, login, calculator, and results pages.
To set up the project locally, follow these steps:
-
Clone the repository to your local machine.
git clone https://github.com/hammadali224/cs222-web-project.git cd cs222-web-project
-
Create a virtual environment and activate it:
python3 -m venv venv source venv/bin/activate
-
Install the required packages using the
requirements.txt
file:pip install -r requirements.txt
-
Run the database migration to set up the database:
python3 -m flask db init python3 -m flask db migrate python3 -m flask db upgrade
-
Run the application:
python3 app.py
-
Access the application in your browser at
http://localhost:5000
.
- Open the application in your web browser.
- Register a new user account or log in with an existing account.
- Enter your financial information and desired retirement age in the calculator form.
- Click "Calculate" to view your projected retirement savings for different investment strategies.
- Flask web framework
- Flask-SQLAlchemy for database management
- Flask-Migrate for database migrations
- Flask-Login for user authentication
- SQLite as the database
This project is released under the MIT License.
Feel free to modify, distribute, or use this project as you see fit, provided you include the copyright notice and the permission notice in all copies or substantial portions of the software.
- Siddhesh Agarwal - Backend development, database management, and Flask integration.