This project is a backend system built using Django and Django REST Framework that processes financial transactions from CSV files and automatically categorizes them using an AI model.
It allows users to upload transaction data, stores it efficiently, and provides analytics like category-wise, daily, and monthly summaries.
-
📤 Upload transactions via CSV file
-
🤖 Automatic categorization using AI
-
⚡ Optimized bulk database operations
-
📊 Analytics APIs:
- Category-wise summary
- Daily spending summary
- Monthly spending summary
-
🧾 Logging for debugging and monitoring
- Backend: Django, Django REST Framework
- Database: PostgreSQL
- AI/NLP: Hugging Face Transformers
- Data Processing: Pandas
fintech_ai/
│
├── config/ # Django settings & main URLs
├── transactions/ # Core app
│ ├── models.py
│ ├── serializers.py
│ ├── ai_service.py # AI categorization logic
│ ├── urls.py
│ └── views/
│ ├── upload.py
│ └── analytics.py
│
├── manage.py
└── requirements.txt
POST
/api/upload/
Upload a CSV file containing transactions.
file: CSV file
description,amount
Uber ride,250
Swiggy food order,450
Amazon shopping,1200
{
"message": "Uploaded and categorized successfully",
"records_processed": 10
}GET
/api/analytics/category/
[
{"category": "Food", "total": 950},
{"category": "Transport", "total": 250}
]GET
/api/analytics/daily/
[
{"date": "2026-04-30", "total": 1200}
]GET
/api/analytics/monthly/
[
{"month": "2026-04-01", "total": 5000}
]git clone <your-repo-url>
cd fintech_aipython -m venv venv
source venv/bin/activatepip install -r requirements.txtUpdate config/settings.py:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'fintech_db',
'USER': 'fintech_user',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '5432',
}
}python manage.py makemigrations
python manage.py migratepython manage.py runserverYou can test APIs using:
- Browser (DRF browsable API)
- Postman
Start with:
http://127.0.0.1:8000/api/upload/
✅ CSV upload working ✅ AI categorization working ✅ Analytics APIs working ✅ Logging enabled
- Asynchronous processing using Celery
- Frontend dashboard (React)
- Better AI model optimization
- Duplicate detection
- User authentication