Skip to content

A modern desktop expense tracker application built with Java Swing. This app simplifies expense management by allowing users to add expenses manually or by simply uploading a picture of a receipt, which is then automatically processed by the Gemini AI to extract the relevant details.

Notifications You must be signed in to change notification settings

akshxdhh/Expense-Tracker-Using-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expense Tracker

A simple desktop application built with Java Swing for manually tracking your daily expenses. This project uses JDBC to connect to a local SQLite database, providing a straightforward way to manage your finances without any external dependencies.*

✨ Features

⌨ Manual Data Entry: A straightforward interface to add expenses by typing the name, amount, and category.

💯 View All Expenses: See a clear, sortable table of all your past expenses.

🚮 Delete Expenses: Remove expenses you no longer need.

📁 Local Database Storage: All expenses are securely saved in a local SQLite database file expensetracker.db, making the application self-contained and portable.

📊 Clear Expense Table: View all your past expenses in a simple, sortable table.

🛠️ Technology Stack

           • Core: Java 11
           • GUI: Java Swing
           • Database: SQLite with JDBC Driver
           • Dependency Management: Apache Maven

📂 Project Structure

The project follows the standard Maven directory layout for clean and organized code:

ai-expense-tracker/
├── pom.xml                   # Maven configuration file for dependencies
├── .gitignore                # Specifies files for Git to ignore
├── README.md                 # This project overview file
└── src/
    └── main/
        └── java/
            └── com/
                └── expensetracker/
                    ├── Expense.java            # Data model for an expense
                    ├── DatabaseHelper.java     # Handles all JDBC/SQLite operations
                    └── ExpenseTrackerApp.java  # Main class with the Swing GUI

🕶 Design

Image

🚀 Getting Started

Follow these steps to get the project running on your local machine.

1. Prerequisites
   Git: To download the source code. (Download Git)
   Java Development Kit (JDK): Version 11 or higher. (Download OpenJDK)
   Apache Maven: To build the project. (Download Maven)

How to Set Up and Run

You can run this project either directly from an IDE like IntelliJ IDEA or from your computer's command line.

Option 1: Running from an IDE (IntelliJ IDEA)

  1. Clone the Repository:
git clone [https://github.com/akshxdhh/Ai-Expense-Tracker.git](https://github.com/akshxdhh/Ai-Expense-Tracker.git)
  1. Open in IntelliJ IDEA:

    • Launch IntelliJ IDEA.
    • Select File > Open....
    • Navigate to the cloned project folder and select the pom.xml file.
    • Choose "Open as Project".
  2. Load Maven Dependencies:

    • IntelliJ will automatically read the pom.xml file.
    • If prompted, click "Load Maven Changes" or open the Maven tool window on the right and click the "Reload All Maven Projects" button. This will download the necessary SQLite-JDBC driver.
  3. Run the Application:

    • Navigate to the src/main/java/com/expensetracker folder.
    • Right-click on the ExpenseTrackerApp.java file and select "Run ExpenseTrackerApp.main()".

Option 2: Running from the Command Line

Prerequisites Before you begin, you must have the following software installed and configured in your system's PATH.

Steps

  1. Clone the Repository: Open your command prompt, navigate to a directory of your choice, and run:
git clone [https://github.com/akshxdhh/Ai-Expense-Tracker.git](https://github.com/akshxdhh/Ai-Expense-Tracker.git)
  1. Navigate to the Project Directory:
cd Ai-Expense-Tracker
  1. Build the Project: Use Maven to compile the code and package it into a runnable.jar file.
mvn clean package

You will see a BUILD SUCCESS message when it's done. The output file will be located in the target/ directory.

  1. Run the Application: Execute the packaged .jar file using the java command.
java -jar target/ai-expense-tracker-1.0.0.jar

The application window should now appear. The expensetracker.db file will be created in the project folder as you add your first expense.

Warning

If you modify the code to change the database structure (e.g., add a new field to Expense.java), you must delete the existing expensetracker.db file. The application will generate a new, correct database file on the next run.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

About

A modern desktop expense tracker application built with Java Swing. This app simplifies expense management by allowing users to add expenses manually or by simply uploading a picture of a receipt, which is then automatically processed by the Gemini AI to extract the relevant details.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages