Skip to content

Repository files navigation

💸 Smart Expense Analyzer & Fraud Risk Detector

An AI-powered full-stack financial analytics system that classifies expenses, detects fraudulent transactions, and forecasts future spending.


🚀 Features

  • 🔍 Expense Classification – Categorizes transactions using a trained ML model
  • 🚨 Fraud Detection – Detects anomalies using Isolation Forest
  • 📈 Spending Forecast – Predicts future expenses using LSTM
  • 📊 Dashboard Analytics – Visual insights of user spending
  • 🔐 Authentication System – Secure login/signup with JWT

image

🛠️ Tech Stack

Frontend: React (Vite) Backend: FastAPI Database: PostgreSQL (Render) ML Models: Scikit-learn, PyTorch Deployment:

  • Backend → Render
  • Frontend → Vercel

🌐 Live Demo


📂 Project Structure

project-root/
│
├── backend/          # FastAPI backend
├── frontend/         # React frontend
├── models/           # ML models (.pkl, .pt)
├── requirements.txt
└── README.md

⚙️ Setup Instructions

1️⃣ Clone repo

git clone https://github.com/your-username/your-repo.git
cd your-repo

2️⃣ Backend setup

cd backend
pip install -r requirements.txt
uvicorn main:app --reload

3️⃣ Frontend setup

cd frontend
npm install
npm run dev

4️⃣ Environment Variables

Create .env file:

DATABASE_URL=your_postgres_url
SECRET_KEY=your_secret_key

🧠 ML Models

  • Classifier: Expense category prediction
  • Fraud Model: Isolation Forest for anomaly detection
  • LSTM Model: Time-series forecasting

📌 Future Improvements

  • Use real-world financial datasets
  • Improve model accuracy
  • Add explainability (why fraud detected)
  • Enhance UI/UX

⭐ If you like this project, give it a star!

Releases

Packages

Contributors

Languages