A comprehensive banking application with real-time fraud detection, analytics dashboards, and multi-channel alerts powered by machine learning.
- π Setup Guide - Complete installation and configuration
- π Project Summary - Full project documentation
- π§ Backend Docs - Django API documentation
β¨ User Management
- Secure registration and login
- JWT-based authentication
- User profiles with contact info
π³ Transaction Processing
- Create and track transactions
- Real-time fraud scoring
- Transaction history with analytics
π¨ Fraud Detection
- Machine learning-based scoring
- Intelligent risk assessment
- Multi-factor fraud analysis
- Risk categorization (Low/Medium/High)
π§ Alerts & Notifications
- In-app notifications
- Email alerts with HTML formatting
- SMS alerts via Twilio
- Alert management dashboard
π Analytics & Insights
- Real-time transaction trends
- Fraud rate visualization
- Amount analysis charts
- Admin monitoring panel
- 30-day historical data
π Security
- Password hashing
- JWT token authentication
- CORS protection
- Input validation
- Next.js 16 - React framework with App Router
- shadcn/ui - Component library
- Recharts - Data visualization
- Tailwind CSS - Styling
- TypeScript - Type safety
- Django 4.2 - Web framework
- Django REST Framework - API development
- PyMongo - MongoDB driver
- JWT - Authentication
- Twilio - SMS service
- MongoDB - Document database
- MongoDB Atlas - Cloud hosting (optional)
- Python 3.10+
- Node.js 18+
- MongoDB (local or Atlas)
npm install
npm run devFrontend runs at: http://localhost:3000
cd backend
pip install -r requirements.txt
# Create .env file with configuration
cp .env.example .env
# Run server
python run_server.pyBackend runs at: http://localhost:8000
- Login: http://localhost:3000/login
- Dashboard: http://localhost:3000/dashboard
- Analytics: http://localhost:3000/analytics
- Admin Panel: http://localhost:3000/admin
Email: demo@smartbank.com
Password: demo123456
βββ app/ # Next.js pages and layouts
βββ components/ # React components
βββ lib/ # Utilities and hooks
βββ backend/ # Django REST API
β βββ models.py # MongoDB models
β βββ views.py # API endpoints
β βββ serializers.py # Data serialization
β βββ notifications.py # Email/SMS service
βββ SETUP_GUIDE.md # Detailed setup instructions
βββ PROJECT_SUMMARY.md # Full documentation
βββ README.md # This file
POST /auth/register/- Register userPOST /auth/login/- Login userGET /auth/profile/- Get user profile
POST /transactions/create/- Create transactionGET /transactions/- List transactionsGET /transactions/<id>/- Get transaction details
GET /alerts/- List alertsPOST /alerts/<id>/read/- Mark alert as read
GET /analytics/dashboard/- Dashboard statsGET /analytics/data/- Historical data
The system uses intelligent scoring:
- Amount Analysis - Large transactions trigger higher risk
- Merchant Categories - High-risk categories (crypto, wire transfer)
- Frequency Analysis - Multiple transactions in short time
- Location Validation - International transactions
Risk Levels:
- π’ Low (0.0-0.4) - Approved
- π‘ Medium (0.4-0.7) - Review needed
- π΄ High (0.7-1.0) - Flagged for investigation
Frontend (.env.local)
NEXT_PUBLIC_API_URL=http://localhost:8000
Backend (.env)
MONGODB_URI=mongodb://localhost:27017/bank_fraud_db
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password
TWILIO_ACCOUNT_SID=your-twilio-sid
TWILIO_AUTH_TOKEN=your-twilio-token
See SETUP_GUIDE.md for complete configuration.
| Page | URL | Purpose |
|---|---|---|
| Login | /login |
User authentication |
| Register | /register |
Create new account |
| Dashboard | /dashboard |
Main overview & statistics |
| Transactions | /transactions |
Transaction history |
| Alerts | /alerts |
Fraud notifications |
| Analytics | /analytics |
Charts & trends |
| Admin | /admin |
System monitoring |
git push
# Auto-deploys on push# Set NEXT_PUBLIC_API_URL in environment
# Deploy with requirements.txt
gunicorn --bind 0.0.0.0:8000 wsgi:application- π See SETUP_GUIDE.md for detailed setup
- π See PROJECT_SUMMARY.md for full documentation
- π§ See backend/README.md for API details
MongoDB Connection Error
- Ensure MongoDB is running:
mongod - Check MONGODB_URI in .env
CORS Error
- Verify CORS_ALLOWED_ORIGINS in Django settings
- Frontend URL must match allowed origins
Email Not Sending
- Use Gmail App Password (not regular password)
- Enable 2FA on Google account
SMS Not Working
- Verify Twilio credentials
- Check phone number format
Open source - modify and deploy freely.
- Read SETUP_GUIDE.md for detailed setup
- Configure MongoDB connection
- Setup email (Gmail) and SMS (Twilio)
- Start frontend and backend
- Create test transactions
- Monitor fraud detection
Built with β€οΈ using Next.js, Django, and MongoDB