Skip to content

rithunkp/ExpenseTracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💰 Aegis - AI-Powered Expense Tracker v2.0

Aegis is a modern, intelligent full-stack expense tracking application that leverages AI to help you manage your finances smarter. Built with a Node.js/Express backend, SQLite, and vanilla JavaScript, it offers a premium futuristic UI, conversational AI assistance, automated insights, and personalized financial recommendations.

Version License Backend Database AI

✨ Features

🎯 Core Functionality

  • User Authentication - Secure JWT-based registration and login with bcrypt password hashing
  • Income & Expense Tracking - Track all your financial transactions with categorized tags
  • Recurring Expenses - Manage subscriptions and bills that auto-generate transactions when due
  • Real-time Balance Dashboard - Instantly see your available balance and spending breakdown
  • Visual Analytics - Interactive charts (Chart.js) showing expense distribution, monthly comparisons, and trends
  • Advanced Filtering - Search, filter, and sort transactions with server-side pagination
  • Persistent Storage - All data saved securely in a local SQLite database

🤖 AI-Powered Features

Aegis securely proxies all AI requests through the backend using either xAI (Grok) or Groq APIs.

1. AI Chat Assistant 💬

Conversational financial advisor:

  • Ask questions about your spending: "How much did I spend on food this month?"
  • Get personalized saving tips based on your actual data
  • Context-aware responses that know your balance and transaction history

2. Financial Forecasting & Predictions 📈

Dashboard AI integration:

  • Predicts your end-of-month spending based on the last 7 days' trend
  • Alerts you if you're projected to exceed your income
  • Offers quick, actionable daily advice

3. Smart Tagging & Fast Entry 🏷️

Intelligent categorization:

  • Learns from your recent spending history
  • Automatically suggests the best category for new expenses
  • Parses natural language (e.g., "50 on coffee" → Food expense)

4. AI Budget Planner 📊

Personalized budget recommendations on the Analytics page:

  • Analyzes current spending patterns
  • Suggests optimized category allocations
  • Generates a custom budget aiming for a 20%+ savings rate

5. Anomaly Detection ⚠️

Intelligent spending pattern analysis:

  • Detects unusually high expenses
  • Identifies duplicate transactions
  • Flags suspicious patterns

🚀 Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • Modern web browser (Chrome, Firefox, Safari, Edge)
  • xAI API Key (or Groq API Key)

Installation

  1. Clone the repository
git clone https://github.com/rithunkp/Aegis.git
cd Aegis/server
  1. Install dependencies
npm install
  1. Set up environment variables Create a .env file in the server directory:
PORT=3000
JWT_SECRET=your_super_secret_jwt_key
GROQ_API_KEY=xai-your_api_key_here  # Can be an xAI or Groq key
  1. Start the server
npm start

The server will automatically initialize the SQLite database on first run.

  1. Open in browser Navigate to http://localhost:3000

📖 Usage Guide

  • Registration: Create a new account on the login page. Your data is isolated and persistent.
  • Dashboard: View your overall financial health, top categories, and AI end-of-month predictions. Use the "Quick Add" bar for fast entries.
  • Transactions: View, search, filter, edit, and delete your complete transaction history.
  • Analytics: Analyze your spending with interactive doughnut, line, and bar charts. Generate an AI budget plan based on your habits.
  • AI Assistant: Chat directly with the AI about your finances for insights and advice.
  • Recurring: Set up automated monthly, weekly, or daily expenses (like Netflix or Rent).
  • Settings: Customize your own tags, update your profile, and toggle between Light and Dark themes.

🛠️ Technology Stack

Frontend

  • HTML5 & CSS3 - Modern futuristic UI, glassmorphism, responsive mesh gradients
  • Vanilla JavaScript (ES6+) - Modular SPA architecture with hash routing
  • Chart.js - Interactive data visualization
  • Font Awesome - Icon library

Backend

  • Node.js & Express - RESTful API server
  • SQLite3 - Zero-configuration relational database
  • JWT (JSON Web Tokens) - Stateless authentication
  • Bcrypt.js - Passion hashing

AI Integration

  • xAI & Groq APIs - Dynamic endpoint switching based on API key
  • Features: JSON parsing, natural language understanding, financial context injection

📁 Project Structure

Aegis/
├── public/                 # Frontend SPA
│   ├── index.html          # Login/Register page
│   ├── app.html            # Main application shell
│   ├── css/
│   │   └── style.css       # Unified design system
│   └── js/
│       ├── api.js          # Backend API client
│       ├── auth.js         # Authentication logic
│       └── app.js          # Router and page controllers
├── server/                 # Node.js Backend
│   ├── index.js            # Express entry point
│   ├── .env                # Secret keys (not tracked)
│   ├── db/                 
│   │   ├── database.js     # SQLite connection & init
│   │   ├── schema.sql      # Database structure
│   │   └── database.sqlite # Auto-generated DB file
│   ├── middleware/
│   │   └── auth.js         # JWT verification
│   ├── routes/             # API Endpoints
│   │   ├── auth.js
│   │   ├── transactions.js
│   │   ├── tags.js
│   │   ├── recurring.js
│   │   ├── analytics.js
│   │   └── ai.js           # Secure AI proxy
│   └── services/
│       └── groqService.js  # AI API logic
└── README.md

🤝 Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Commit changes: git commit -m 'Add feature'
  4. Push to branch: git push origin feature-name
  5. Open a Pull Request

📞 Support


Made by Rithun KP

About

A JS-based expense tracking system that allows users to record, categorize, and analyze personal spending with summary statistics and visual insights.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors