GitHub - iamkishor07/expense-tracker-java: technical task by Alephys , where user can 1. Add income and expenses Categorize their transactions (e.g., Food, Rent, Travel) View monthly summaries Save/load data from a file

Expense Tracker – SOLID Java Console Application

A simple, console-based Java application that helps users track income and expenses, categorize transactions,
generate monthly summaries, and save/load data to/from files. Built with clean design principles
using SOLID architecture.

🚀 Features

Add income or expense transactions
Categorize entries (e.g., Food, Rent, Travel, Salary, Business)
View monthly summaries of income, expenses, and savings
Save data to a txt file (in Downloads folder or custom path)
Load data from a previously saved file
Supports structured txt input for bulk transaction loading

📂 Project Structure

├── Main.java                # Application entry point
├── ExpenseTracker.java      # Main application logic
├── Transaction.java         # Represents an income/expense record
├── TransactionType.java     # Enum: INCOME or EXPENSE
├── transaction.txt          # Generated txt file
├── README.md                # Breif Description on Expense Tracker

📄 File Format (.txt)

Your txt file should follow this structure:

TYPE,AMOUNT,CATEGORY,DATE
INCOME,10000,Salary,2025-05-01
EXPENSE,3000,Food,2025-05-05

‍💻 How to Use

1.Clone this repositry to your local machine git clone https://github.com/your-username/expense-tracker-java.git cd expense-tracker-java Replace your-username with your actual GitHub username.

2.Compile and run: Before Running Your Application pls change the path to download/load Files in ExpenseTracker.java img_7 javac Main.java java Main

3.Application Options img 4.Enter your option

➕ Add Transaction

# For Exp: I'm adding a transcation of 45000 , which is INCOME,category salary
Once You've Entered the option 1, ie, add transcation It'll ask for the Type of the Transcation (Income /Expense)

img_1 Once You've Entered the Type, It'll ask for the amount img_2 Once You've Entered the amount, It'll ask for the Category like food,salary etc img_3 Once You've Entered the category , it will added the transcation successfully img_4

📊 View Monthly Summary

# For Exp : If you want to see the Monthly Summary you can see via option 2.

img_6

# You Want to Save all the transactions you've done till know
Once You run the Application , It'll give you options, In that choose 4.Save to the file

img_5 It'll give the specific path where the file is saved.

📂 Load from File

#You want to load data/Transaction from a file 
#Make sure you have change the path in ExpenseTracker.java & Inorder to load,make sure there exist one txt
#file with the name as specified int ExpenseTracker.java or Incase if you've change , your file name
Once this is done, it will load data form the file, 

img_8 My transaction.txt file contains the below data Once Application started, I'll give option : 3 to load img_9 Once that is completed, Now see the monthly summary via Option:2 img_10 So the data/Summary which i've got is from the file

👨‍💻 Author

Built by Kishor Kumar - writing clean, maintainable Java code with SOLID design and real-world use cases in mind.