Skip to content

JoydeepKrGhosh/Fintrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Fintrack — Smart Financial Tracking with ML & Blockchain

Fintrack is a powerful personal finance backend system that automates the ingestion, categorization, integrity-checking, and scoring of financial transactions using modern tools such as Machine Learning, Blockchain (Solana), and intelligent background workers.

Frontend Repo: FinApp — React Native App


📲 Features

✉️ Transaction Ingestion

  • SMS Parsing: Ingests transactions from SMS (via Android app - external).
  • Gmail Parsing: Connects to user's Gmail using the Gmail API to fetch and parse transactional emails.

🧠 ML-Based Categorization

  • A pre-trained Python-based ML model (served via Docker) classifies transactions into categories like Food, Bills, Shopping, etc.
  • Features used: amount, merchant name, and description text.

⏳ Asynchronous Processing

  • Custom workers handle background tasks like ML model execution, hashing, and DB operations.
  • Keeps the main server responsive and scalable.

🔐 Blockchain Integrity via Solana

  • Cryptographic hash (SHA-256) of each transaction is recorded on the Solana Devnet in the memo field.
  • Verifies that transaction data hasn’t been altered — proof-of-integrity design.

📊 Monthly Financial Scoring

  • Cron jobs calculate a financial health score per user based on:

    • Spending vs. income
    • Debt
    • Spending distribution

💳 Shared Debt Tracking

  • Users can record debts (borrow/lend) and track shared expenses between peers.

🛠️ Tech Stack

Component Tech
Backend Node.js (Express)
Database PostgreSQL via Neon + Prisma
ML Python, joblib, Docker
Blockchain Solana Devnet
Worker Queue Custom JS worker system
OTP/Notifications Twilio, Redis

🔹 Project Structure

Fintrack/
├── server.js                   # Main Express server
├── workers/                   # Async workers for background processing
├── utils/                     # Utility scripts: Gmail, SMS, Solana, etc.
├── prisma/                    # DB schema and migrations
├── src/                       # Core backend logic
│   ├── controllers/           # API controllers
│   ├── routes/                # Express routes
│   ├── service/               # Business logic, ML service, Financial scoring
│   └── middleware/            # Auth and middleware
├── ML models/                # Python-based ML model
│   └── Categorization/app     # model.pkl, vectorizer, Flask server
├── Dockerfile
└── requirements.txt

🔗 API Overview (Key Routes)

Endpoint Description
POST /auth/login User login via OTP
GET /gmail/fetch Triggers Gmail sync
POST /transaction/ Ingest a new transaction manually
GET /debt/summary Fetch user's debt/credit status

(Full API docs coming soon)


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors