# Expense Tracker
## Project Overview
The Expense Tracker is a web application that allows users to track their income and expenses. It helps users manage their budgets, monitor spending patterns, and generate financial reports.
## Features
- User Authentication (Registration and Login)
- Add, Edit, Delete Expenses
- Categorize Expenses (Food, Transport, Bills, etc.)
- View Expenses by Date Range
- Generate Reports (Monthly, Yearly)
- Dashboard with Summary and Charts
## Technologies Used
- **Backend**: Java (JSP, Servlets)
- **Frontend**: HTML, CSS, JavaScript
- **Database**: MySQL (or PostgreSQL)
- **Server**: Apache Tomcat
- **Libraries**: JFreeChart (for charts)
## Prerequisites
- Java Development Kit (JDK) 8 or higher
- Apache Tomcat 9 or higher
- MySQL (or PostgreSQL) Database
- IDE (Eclipse, IntelliJ IDEA, or similar)
## Project Structure
ExpenseTracker/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ ├── com/
│ │ │ │ ├── example/
│ │ │ │ │ ├── controllers/
│ │ │ │ │ ├── dao/
│ │ │ │ │ ├── model/
│ │ │ │ │ ├── services/
│ │ │ ├── web/
│ │ │ │ ├── servlets/
│ ├── webapp/
│ │ ├── WEB-INF/
│ │ │ ├── web.xml
│ │ ├── assets/
│ │ ├── views/
│ │ │ ├── index.jsp
│ │ │ ├── login.jsp
│ │ │ ├── register.jsp
│ │ │ ├── dashboard.jsp
│ │ │ ├── addExpense.jsp
│ │ │ ├── editExpense.jsp
│ │ │ ├── reports.jsp
├── README.md
├── pom.xml (if using Maven)
git clone https://github.com/yourusername/expensetracker.git
cd expensetracker
- Create a database named
expense_tracker
. - Execute the SQL scripts in
src/main/resources/sql/
to create the necessary tables.
Update the database connection settings in your project. You can usually find these settings in a configuration file like db.properties
or directly in your DAO classes.
# db.properties example
jdbc.url=jdbc:mysql://localhost:3306/expense_tracker
jdbc.username=root
jdbc.password=yourpassword
- Using Maven: If you are using Maven, build the project using the following command:
This will generate a WAR file in the
mvn clean install
target
directory. - Manually: If you are not using Maven, compile the project and package it as a WAR file using your IDE.
- Copy the generated WAR file to the
webapps
directory of your Apache Tomcat installation. - Start (or restart) Apache Tomcat.
- Open a web browser and navigate to
http://localhost:8080/ExpenseTracker
(or the appropriate URL based on your Tomcat configuration).
- JSP Pages:
register.jsp
,login.jsp
- Servlets:
RegisterServlet
,LoginServlet
- Database Tables:
users
- JSP Pages:
addExpense.jsp
,editExpense.jsp
- Servlets:
AddExpenseServlet
,EditExpenseServlet
,DeleteExpenseServlet
- Database Tables:
expenses
- JSP Pages:
dashboard.jsp
,reports.jsp
- Servlets:
ViewExpensesServlet
,GenerateReportServlet
- Libraries: JFreeChart for generating charts
- Fork the repository
- Create your feature branch (
git checkout -b feature/YourFeature
) - Commit your changes (
git commit -m 'Add some feature'
) - Push to the branch (
git push origin feature/YourFeature
) - Open a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to all the open-source contributors whose libraries and tools were used in this project.