Skip to content

thisisAtharv/ExpenseTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💸 Smart Expense Tracker

Java MySQL UI License: MIT

Smart Expense Tracker is a desktop application built with Java Swing and MySQL that lets you record, categorize, and analyze income and expenses. Features include category management with colors, transaction filtering & search, year-wise analytics with bar charts (JFreeChart), and a customizable FlatLaf theme for a modern UI.


📷 Preview

Login Page
User login screen.

Register Page
New user registration form.

Home Page
Main dashboard with theme customization using FlatLaf. Easily switch between themes via the dropdown, alongside quick navigation to core features.

Add Expense Page
Form to add a new income or expense entry.

Transactions Page
Page showing a list of all income/expense transactions with filter, search, update and delete transactions features.

Analytics Page
Analytics view with month-wise income and expense bar chart. Also you can filter by year.

Create Category Page
Form to create a new category with a name and color.

Manage Categories Page
View, edit, or delete existing categories.


🧠 Features

  • ✅ User Registration & Secure Login
  • ✅ Add/Edit/Delete Transactions
  • ✅ Manage Custom Categories (Name + Color)
  • ✅ Income/Expense Summary Panel
  • ✅ Real-time Minimum Balance Warning
  • ✅ Monthly Analytics with Bar Charts (via JFreeChart)
  • ✅ Filter & Search Transactions by Type/Keyword
  • ✅ Clean, intuitive Swing UI with modern layout

🗃️ Tech Stack

Layer Technology
💻 Language Java (JDK 17+)
🖥️ UI Java Swing (AWT/Swing)
🗄️ Database MySQL 8.x
📊 Charts JFreeChart

⚙️ Database Schema

🔐 users Table

CREATE TABLE users (
  id INT AUTO_INCREMENT PRIMARY KEY,
  username VARCHAR(50) NOT NULL UNIQUE,
  email VARCHAR(100),
  password VARCHAR(100) NOT NULL
);

🗂️ categories Table

CREATE TABLE categories (
  id INT AUTO_INCREMENT PRIMARY KEY,
  user_id INT NOT NULL,
  name VARCHAR(50) NOT NULL,
  color VARCHAR(7) NOT NULL,
  FOREIGN KEY (user_id) REFERENCES users(id)
);

💳 transactions Table

CREATE TABLE transactions (
  id INT AUTO_INCREMENT PRIMARY KEY,
  username VARCHAR(50) NOT NULL,
  category_name VARCHAR(50) NOT NULL,
  description VARCHAR(255),
  amount DECIMAL(10,2) NOT NULL,
  date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  type ENUM('income','expense') NOT NULL DEFAULT 'expense'
);

🚀 Getting Started

1. Clone the Repo

git clone https://github.com/thisisAtharv/ExpenseTracker.git
cd ExpenseTracker

2. Configure MySQL

  • Create a database: expense_tracker
  • Run the provided SQL script (schema.sql) or create tables manually (see above)

3. Update DB Credentials

Open your relevant .java files and update the database connection info:

String url = "jdbc:mysql://localhost:3306/expense_tracker";
String user = "root";
String password = "your_password";

4. Build & Run

  • Compile the project using your IDE (e.g., IntelliJ, Eclipse) or the terminal
  • Run the Main.java or Login.java class to launch the application

📂 Project Structure

src/
├── db/
│   └── DBConnection.java
├── model/
│   ├── AddExpense.java
│   ├── Analytics.java
│   ├── Category.java
│   ├── CreateCategory.java
│   ├── Home.java
│   ├── LoginPage.java
│   ├── RegisterPage.java
│   ├── ViewCategory.java
│   └── ViewExpense.java

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙌 Acknowledgements

About

A smart and simple Java app to track income and expenses, includes dynamic charts, category management, and transaction filters.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages