AI-Powered Personal Finance Intelligence
AI Financial Coach β’ Financial Health Score β’ Smart Budgeting β’ Expense Tracking β’ Risk Simulation β’ Goal Planning
- Overview
- Key Features
- Tech Stack
- Project Structure
- Prerequisites
- Installation
- Configuration
- Running the Project
- API Documentation
- Database Setup
- Project Architecture
- Features in Detail
- Contributing
- License
Finexa is an AI-powered personal finance management platform designed to help users take control of their financial health. The platform leverages advanced machine learning, real-time data processing, and intuitive user interfaces to provide comprehensive financial insights, automated expense tracking, and intelligent financial recommendations.
Empower individuals to achieve financial wellness through AI-driven insights, habit building, and personalized financial guidance.
- π Dashboard Overview - Real-time financial health score, income/expense tracking, savings visualization
- π° Wallet Management - Multi-currency support, balance tracking, transaction history
- π Document Upload & Processing - PDF/image-based expense extraction using AI, automatic transaction categorization
- π³ Transaction Tracking - Detailed transaction logs, category-wise breakdown, spending patterns analysis
- π€ AI Coach - Intelligent chatbot providing personalized financial advice using LLM (Google Gemini/OpenAI)
- π‘ Spending Analysis - Automatic identification of spending patterns, anomalies, and optimization opportunities
- π― Financial Recommendations - AI-generated suggestions for budget optimization and expense reduction
- π Spending Insights - Category analysis, trend detection, comparative financial metrics
- π― Goals Tracker - Create, track, and manage savings goals with progress visualization
- πΎ Savings Automation - Automatic savings tracking and goal-based fund allocation
- π Expense Budget - Set category-wise budgets and monitor spending against limits
- π Habit Challenges - Engagement-driven financial habits with streak tracking, points, and rewards
- ποΈ Achievement Badges - Earn badges for financial milestones and consistent behavior
- π Financial Education - Interactive learning modules covering financial concepts and best practices
β οΈ Emergency Risk Assessment - Calculate emergency fund coverage and financial safety ratings- πΉ Income Simulator - Model different income scenarios and financial projections
- π Financial Health Score - Comprehensive scoring based on income stability, savings rate, expense ratio, and more
Logic_Legion_Finexa/
βββ backend/
β βββ ai_assistant/ # AI & document processing module
β β βββ migrations/ # Database migrations
β β βββ services/
β β β βββ agent.py # LLM agent for conversation
β β β βββ expense_extraction.py # Document-to-expense extraction
β β β βββ financial_health.py # Health score calculation
β β β βββ spending_analysis.py # Pattern analysis
β β β βββ goal_planning.py # Goal optimization
β β βββ views.py # API endpoints
β β βββ serializers.py # Data serialization
β β βββ models.py # Database models
β β βββ urls.py # Routing
β βββ core/
β β βββ settings.py # Django configuration
β β βββ urls.py # Main URL routing
β β βββ asgi.py # ASGI config
β β βββ wsgi.py # WSGI config
β βββ users/ # User authentication & management
β β βββ models.py # User model
β β βββ views.py # Auth endpoints
β β βββ serializers.py # User serializers
β βββ transactions/ # Transaction management
β βββ sockets/ # WebSocket support
β βββ gamification/ # Badges & challenges
β βββ savings_goals/ # Goals tracking
β βββ manage.py # Django CLI
β βββ requirements.txt # Python dependencies
β βββ Dockerfile # Docker image config
β βββ .env.example # Environment template
β βββ README.md # Backend documentation
β
βββ frontend/
β βββ src/
β β βββ components/ # Reusable React components
β β β βββ ProtectedRoute.tsx # Route protection
β β β βββ CursorFX.tsx # UI effects
β β βββ contexts/
β β β βββ AuthContext.tsx # Authentication state
β β β βββ ThemeContext.tsx # Theme configuration
β β βββ pages/
β β β βββ auth/
β β β β βββ SignIn.tsx # Login page
β β β β βββ SignUp.tsx # Registration page
β β β βββ dashboard/
β β β β βββ Overview.tsx # Main dashboard
β β β β βββ Wallet.tsx # Wallet management
β β β β βββ Transactions.tsx # Transaction list
β β β β βββ Documents.tsx # File upload
β β β β βββ SpendingInsights.tsx # Analytics
β β β β βββ GoalsTracker.tsx # Goals management
β β β β βββ AICoach.tsx # AI chatbot
β β β β βββ HabitChallenges.tsx # Gamification
β β β β βββ FinancialEducation.tsx # Learning
β β β β βββ BudgetOptimizer.tsx # Budget planning
β β β β βββ IncomeSimulator.tsx # Scenario modeling
β β β β βββ EmergencyRisk.tsx # Risk assessment
β β β β βββ Cards.tsx # Card management
β β β β βββ Subscription.tsx # Subscription management
β β β β βββ Settings.tsx # User settings
β β β βββ Landing/
β β β β βββ index.tsx # Landing page
β β β βββ Onboarding.tsx # Onboarding flow
β β βββ layouts/
β β β βββ DashboardLayout.tsx # Main layout
β β βββ lib/
β β β βββ api.ts # API client
β β β βββ calculations.ts # Financial calculations
β β β βββ mockData.ts # Mock data for testing
β β βββ App.tsx # Main app component
β β βββ main.tsx # Entry point
β β βββ index.css # Global styles
β βββ public/ # Static assets
β βββ package.json # Node dependencies
β βββ tsconfig.json # TypeScript config
β βββ vite.config.ts # Vite configuration
β βββ tailwind.config.js # Tailwind CSS config
β βββ postcss.config.js # PostCSS config
β
βββ docker-compose.yml # Multi-container orchestration
βββ .gitignore # Git ignore rules
βββ README.md # This file
- Node.js 18.0 or higher
- Python 3.10 or higher
- npm 9.0 or higher (comes with Node.js)
- pip 21.0 or higher (comes with Python)
- Docker & Docker Compose (optional, for containerized setup)
- PostgreSQL or SQLite (database)
- MongoDB 5.0+ (for document storage)
- Redis (optional, for caching and task queuing)
- API Keys:
- Google Gemini API key OR OpenAI API key
- MongoDB Atlas connection string
git clone https://github.com/yourusername/Logic_Legion_Finexa.git
cd Logic_Legion_Finexacd backend
python -m venv venv
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activatepip install -r requirements.txt# Copy the example file
cp .env.example .env
# Edit .env with your configuration
nano .envpython manage.py migratepython manage.py createsuperusercd frontend
npm install# Django Settings
DEBUG=True
SECRET_KEY=your-secret-key-here
ALLOWED_HOSTS=localhost,127.0.0.1
# Database Configuration
DATABASE_ENGINE=django.db.backends.postgresql
DATABASE_NAME=finexa_db
DATABASE_USER=postgres
DATABASE_PASSWORD=your-password
DATABASE_HOST=localhost
DATABASE_PORT=5432
# MongoDB Configuration
MONGO_URI=mongodb+srv://username:password@cluster.mongodb.net/finexa
# AI/LLM Configuration
OPENAI_API_KEY=sk-proj-your-key-here
GOOGLE_GEMINI_API_KEY=your-gemini-key-here
# Redis Configuration
REDIS_URL=redis://localhost:6379/0
# JWT Settings
JWT_SECRET_KEY=your-jwt-secret-key
JWT_ALGORITHM=HS256
# Email Configuration (Optional)
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password
# Allowed Origins (CORS)
CORS_ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000
# AWS S3 (Optional, for file storage)
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
AWS_STORAGE_BUCKET_NAME=your-bucket-nameEnvironment variables are handled in the API client (src/lib/api.ts):
const API_BASE_URL = process.env.REACT_APP_API_URL || 'http://localhost:8000/api';cd backend
source venv/bin/activate # or venv\Scripts\activate on Windows
python manage.py runserver 8000cd frontend
npm run devThe application will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000/api
- Admin Panel: http://localhost:8000/admin
# Build and start all services
docker-compose up -d
# To stop services
docker-compose down
# View logs
docker-compose logs -fServices will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000/api
- PostgreSQL: localhost:5432
- MongoDB: localhost:27017
- Redis: localhost:6379
https://api.finexa.com/api/v1
All API endpoints require JWT token in headers:
Authorization: Bearer <your-jwt-token>
POST /auth/register/- Register new userPOST /auth/login/- Login and get JWT tokenPOST /auth/refresh/- Refresh JWT tokenPOST /auth/logout/- Logout user
GET /finance/overview/- Get dashboard overview with health scoreGET /finance/transactions/- List all transactionsPOST /finance/transactions/- Create new transactionGET /finance/health-score/- Get detailed health score
POST /documents/upload/- Upload and process financial documentGET /documents/- List uploaded documentsGET /documents/{id}/summary/- Get document summary
POST /ai/chat/- Chat with AI coachPOST /ai/analyze/spending/- Get spending analysisGET /ai/recommendations/- Get recommendationsPOST /ai/extract-expenses/- Extract expenses from document
GET /goals/- List all goalsPOST /goals/- Create new goalPUT /goals/{id}/progress/- Update goal progressDELETE /goals/{id}/- Delete goal
GET /wallet/- Get wallet balanceGET /wallet/transactions/- Get wallet transactionsPOST /wallet/transfer/- Transfer funds
GET /user/profile/- Get user profilePUT /user/profile/- Update profilePOST /user/settings/- Update settings
For complete API documentation, see API_DOCS.txt
# Create database
createdb finexa_db
# Create user
createuser finexa_user -P
# Grant privileges
psql -c "GRANT ALL PRIVILEGES ON DATABASE finexa_db TO finexa_user;"The MongoDB collections are created automatically. Key collections:
- users - User profiles
- transactions - Transaction records
- documents - Uploaded documents and summaries
- expense_patterns - Spending analysis data
- financial_health - Health score history
- ai_conversations - Chat history with AI
# Show pending migrations
python manage.py showmigrations
# Run all migrations
python manage.py migrate
# Create migration for changes
python manage.py makemigrations
# Reverse migration
python manage.py migrate <app-name> <migration-name>βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FRONTEND (React + TypeScript) β
β Vite | Tailwind | Framer Motion β
ββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β HTTP/WebSocket (Axios)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β API GATEWAY & MIDDLEWARE β
β JWT Auth | CORS | Request Validation β
ββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ
β REST API β β WebSocket β β Admin Panel β
β (Django REST) β β (Channels) β β (Django Admin) β
ββββββββββ¬ββββββββββ ββββββββββ¬ββββββββββ ββββββββββ¬ββββββββββ
β β β
ββββββββββββββββββββββΌβββββββββββββββββββββ
β
βββββββββββββββββββββββΌββββββββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββ
β PostgreSQL β β MongoDB β β Redis β
β (Relational) β β (NoSQL/Docs) β β (Cache/Queue) β
ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββ
External Services:
βββ Google Gemini API (AI/LLM)
βββ OpenAI GPT-4 (Expense Extraction)
βββ Celery (Async Tasks)
βββ Email Service (Notifications)
User Upload Document
β
βΌ
Document Processing Service
β
ββ Validate file format & size
ββ Extract text using OCR
β
βΌ
Entity Recognition & Extraction
β
ββ Date extraction
ββ Amount extraction
ββ Category classification
ββ Merchant identification
β
βΌ
Validation & Enrichment
β
ββ Format validation
ββ Duplicate detection
β
βΌ
Store in Database
β
ββ Save to MongoDB (documents)
ββ Save to PostgreSQL (transactions)
ββ Update financial metrics
β
βΌ
Return Structured Response
β
ββ JSON with extracted expenses
Calculation Formula:
Health Score = (Income Stability Γ 20%) + (Expense Ratio Γ 25%) +
(Savings Rate Γ 25%) + (Debt-to-Income Γ 20%) +
(Emergency Buffer Γ 10%)
Score Ranges:
- 80-100: Excellent
- 60-79: Good
- 40-59: Fair
- 20-39: Poor
- 0-19: Critical
Powered by LLM (Google Gemini or OpenAI GPT-4), the system can:
- Extract expenses from bank statements (PDF/Image)
- Automatically categorize transactions
- Identify merchants and amounts
- Handle multiple date formats
- Detect and prevent duplicate entries
Conversational AI assistant that:
- Answers financial questions
- Provides personalized advice
- Suggests budget optimizations
- Explains financial concepts
- Tracks conversation history
Analyzes financial data to provide:
- Category-wise spending breakdown
- Trend detection (increases/decreases)
- Anomaly identification
- Benchmarking against user's own history
- Pattern-based recommendations
Users can:
- Create savings goals with targets
- Set monthly contribution amounts
- Track progress with visualizations
- Get achievement notifications
- Adjust goals dynamically
- Habit Challenges: Daily/weekly financial tasks
- Achievement Badges: Earned for milestones
- Streak Tracking: Maintain positive financial behaviors
- Points System: Reward financial actions
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes
- Write tests for new functionality
- Submit a pull request
- Follow PEP 8 for Python
- Use TypeScript for frontend code
- Write meaningful commit messages
- Add documentation for new features
# Backend tests
python manage.py test
# Frontend tests
npm run test
# End-to-end tests (if applicable)
npm run test:e2eThis project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Backend README
- Issue Tracker: GitHub Issues
- Email: sakshi.s.nikam05@gmail.com
- Built with Django, React, and modern web technologies
- Powered by Google Gemini and OpenAI APIs
- Community contributions and feedback
- β Core financial tracking functionality
- β AI-powered expense extraction
- β Health score calculation
- β Goal tracking system
- β Gamification features
- π Mobile app (In Progress)
- π Advanced analytics dashboard (In Progress)
- π Integration with banking APIs (Planned)
- π Multi-currency support enhancement (Planned)
![]() Sakshi |
![]() Sukhada |
![]() Atharva |
![]() Yash |
ββββββββββββββββββββββββββββββββββββ
π Built with passion by the Logic Legion Team
Finexa Β© 2026 β’ All rights reserved
ββββββββββββββββββββββββββββββββββββ




