A finance tracking application built with Flask and Python. This application allows you to add, view, and filter financial transactions, and also provides instant feedback through success and error messages.
- Add Transactions: Add new financial transactions with date, amount, category, and description.
- View Transactions: View a list of transactions within a specific date range.
- Flash Messages: Receive instant feedback on actions performed, such as adding transactions.
- Python 3.x
- Flask
- pandas
- matplotlib
- Clone the repository:
git clone https://github.com/your-username/your-repository.git
cd your-repository
- Install the dependencies:
Create a virtual environment and install the required libraries.
python -m venv venv
source venv/bin/activate # For Windows use: venv\Scripts\activate
pip install -r requirements.txt
- Create the requirements.txt file:
If you don't already have one, create a requirements.txt file with the following content:
Flask
pandas
matplotlib
- Run the Flask application:
python app.py
The application will be available at http://127.0.0.1:5000/.
- app.py: The main script that defines the routes and logic for the Flask application.
- templates/: Contains the HTML files for the application.
- base.html: Base template for the application's layout.
- index.html: The index page for the application
- view_transactions.html: The home page that displays the list of transactions and forms for adding and filtering transactions.
- add_transaction.html: Page for adding new transactions.
- static/: Contains static files such as CSS.
- styles.css: CSS file for application styles.
- finance_data.csv: CSV file where transactions are stored.
- Go to the page to add a new transaction (/add).
- Fill in the form with the date, amount, category, and description of the transaction.
- Click "Add Transaction". A success message will be displayed, and you will be redirected to the main page.
- Go to the main page (/transactions).
- Use the form to filter transactions by date range.
- Click "Filter". The filtered transactions will be displayed, and if there are any transactions within the range, the list will be updated.