A simple and efficient web application to track your daily expenses, manage budgets, and visualize spending patterns.
✅ Add expenses with description, amount, category, date
✅ View all expenses in a table
✅ See total expenses in INR (₹)
✅ Beautiful gradient design
✅ Different colors for different categories
✅ Indian date format (DD/MM/YYYY)
✅ Real-time expense calculations
✅ Local storage for data persistence
-
Frontend:
- HTML5
- CSS3 (Responsive Design)
- JavaScript (ES6+)
- Node.js + Express
- PostgreSQL
-
Hosting:
- AWS EC2
- PM2 (Process Manager)
- Clone the repository:
git clone https://github.com/ObaidAbdullah16/Expense-Tracker.git
cd Expense-Tracker- Install dependencies:
npm install- Create PostgreSQL database:
CREATE DATABASE expense_tracker;- Create table:
CREATE TABLE expenses (
id SERIAL PRIMARY KEY,
description VARCHAR(255) NOT NULL,
amount DECIMAL(10, 2) NOT NULL,
category VARCHAR(100) NOT NULL,
date DATE NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);-
Update database connection in
server.js -
Start the server:
npm start- Visit:
http://localhost:3000
-
Add Expense:
- Click "Add Expense" button
- Enter amount, category, and description
- Click "Add" to save
-
View Dashboard:
- See total expenses
- View monthly breakdown
- Check category-wise spending
-
Manage Expenses:
- Edit: Click the edit icon
- Delete: Click the delete icon
- Filter: Use date or category filters
-
Export Data:
- Download expense report as CSV
- Print monthly summary
Expense-Tracker/
├── server.js # Main server file
├── database.sql # Database setup
├── package.json # Dependencies
├── public/
│ ├── index.html # Main HTML
│ ├── style.css # Styling
│ └── script.js # Frontend logic
└── README.md
-
Create EC2 Instance
- Choose Ubuntu 22.04
- Instance type: t2.micro (free tier)
- Security group: Open ports 22, 80, and 3000
-
Connect to EC2
ssh -i your-key.pem ubuntu@your-ec2-ip
-
Install Node.js
sudo apt update curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt install -y nodejs -
Install PostgreSQL
sudo apt install postgresql postgresql-contrib -y sudo systemctl start postgresql
-
Setup Database
sudo -u postgres psql CREATE DATABASE expense_tracker; -
Upload Your Code
git clone https://github.com/ObaidAbdullah16/Expense-Tracker.git cd Expense-Tracker npm install -
Run with PM2
sudo npm install -g pm2 pm2 start server.js pm2 startup pm2 save
-
Access Your Site
http://your-ec2-ip:3000
"Database connection failed"
- Check if PostgreSQL is running
- Check username and password in
server.js
"Port 3000 already in use"
- Change PORT in
server.jsto something else like 3001
Can't access on EC2
- Make sure security group has port 3000 open
- Use public IP, not private
None currently. If you find any bugs, please report them.
- Cloud synchronization
- Mobile app version
- Budget alerts
- Recurring expenses
- Multi-currency support
- Advanced analytics
- Dark mode
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Obaid Abdullah
- GitHub: @ObaidAbdullah16
- Portfolio: obaidinfo.xyz
- Expense Tracker: expense.obaidinfo.xyz
If you encounter any issues or have questions:
- Open an Issue
- Check Discussions
- Visit my Portfolio
Give a ⭐️ if you found this project helpful!
Last Updated: May 26, 2026