help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
finance-assistant-bot
/
static
/
css
RSK World
finance-assistant-bot
Finance Assistant Bot - Python + Flask + Banking APIs + Finance Bot + Account Management + Transaction Processing
css
  • style.css10.1 KB
ADVANCED_FEATURES.mdERROR_CHECK_REPORT.mdsample_documents.txtstyle.css
ADVANCED_FEATURES.md
Raw Download

ADVANCED_FEATURES.md

# Finance Assistant Bot - Advanced Features Guide

> Comprehensive guide to all advanced features added to the Finance Assistant Bot

## Developer Information
**Founder:** Molla Samser
**Email:** help@rskworld.in
**Phone:** +91 93305 39277
**Address:** Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India, 713147
**Website:** https://rskworld.in
**Year:** 2026

---

## 🚀 New Advanced Features

### 1. Multiple Account Management
- **Feature:** Users can now have multiple accounts (Savings, Checking, etc.)
- **Usage:**
- Chat: "Show all accounts" or "List accounts"
- API: `GET /api/accounts`
- **Benefits:** Separate finances for different purposes

### 2. Account Transfers
- **Feature:** Transfer funds between your own accounts
- **Usage:**
- Chat: "Transfer $X from ACCOUNT1 to ACCOUNT2"
- API: `POST /api/transfer`
- **Security:** Only transfers between user's own accounts

### 3. Budget Tracking
- **Feature:** Set monthly budgets by category and track spending
- **Database Table:** `budgets`
- **Usage:**
- Chat: "Budget status", "My budgets", "Show budgets"
- API: `GET /api/budgets`, `POST /api/budgets`
- **Features:**
- Category-based budgets (Food, Utilities, Entertainment, etc.)
- Monthly spending tracking
- Budget vs. actual spending comparison
- Over/under budget alerts

### 4. Transaction Categories
- **Feature:** Automatically categorize all transactions
- **Categories:** Income, Withdrawal, Payment, Transfer, Utilities, Food & Dining, etc.
- **Usage:**
- Transactions are automatically categorized
- Filter by category: `GET /api/transactions?category=Food`
- Chat: "Spending by category"

### 5. Spending Analysis
- **Feature:** Analyze spending patterns by category
- **Usage:**
- Chat: "Spending analysis", "Where did my money go", "Expenses"
- API: `GET /api/spending-analysis?days=30`
- **Features:**
- Spending breakdown by category
- Percentage calculations
- Time period filtering (days parameter)
- Budget comparison

### 6. Savings Goals
- **Feature:** Set and track financial goals
- **Database Table:** `savings_goals`
- **Usage:**
- Chat: "My goals", "Savings goals", "Show goals"
- API: `GET /api/goals`, `POST /api/goals`
- **Features:**
- Goal name and target amount
- Current progress tracking
- Target date tracking
- Progress percentage calculation

### 7. Investment Tracking
- **Feature:** Track investment portfolio
- **Database Table:** `investments`
- **Usage:**
- Chat: "My investments", "Investment portfolio", "Portfolio"
- API: `GET /api/investments`, `POST /api/investments`
- **Features:**
- Track multiple investment types (Stocks, Bonds, Mutual Funds, etc.)
- Purchase price vs. current value
- Gain/loss calculations
- Portfolio summary

### 8. Financial Reports
- **Feature:** Comprehensive financial overview
- **Usage:**
- Chat: "Financial report", "Report", "Summary"
- API: `GET /api/financial-report`
- **Includes:**
- Total account balance
- Total investments
- Net worth calculation
- Monthly spending summary
- Account count
- Goals progress

### 9. Transaction Filtering & Export
- **Feature:** Advanced transaction filtering and CSV export
- **Usage:**
- API: `GET /api/transactions?account=ACC123&category=Food&days=30`
- API: `GET /api/export-transactions?days=30` (Downloads CSV)
- **Filter Options:**
- By account number
- By category
- By time period (days)
- Combined filters

### 10. Recurring Bills
- **Feature:** Mark bills as recurring for automatic management
- **Database Field:** `recurring` flag in bills table
- **Usage:** Bills can be marked as recurring during creation

### 11. Enhanced Chat Interface
- **New Quick Actions:**
- All Accounts button
- Budget button
- Goals button
- Investments button
- Analysis button
- Report button
- **Smart Responses:** Chatbot automatically suggests actions based on responses
- **Action Buttons:** Contextual buttons appear after relevant responses

---

## 📊 Database Schema Updates

### New Tables Added:
1. **budgets** - Budget tracking by category
2. **savings_goals** - Financial goals tracking
3. **investments** - Investment portfolio
4. **alerts** - Account alerts (prepared for future use)

### Updated Tables:
1. **transactions** - Added `category` field
2. **bills** - Added `recurring` field
3. **accounts** - Multiple accounts per user support

---

## 💡 Chat Commands Reference

### Account Commands
- "Check my balance" - Check single account balance
- "Show all accounts" - List all accounts with balances
- "Account details" - Detailed account information

### Transaction Commands
- "Transaction history" - Recent transactions
- "Show transactions" - View all transactions
- "Spending by category" - Category breakdown

### Budget Commands
- "Budget status" - View all budgets and spending
- "My budgets" - List budgets
- "Budget [category]" - Specific category budget

### Goal Commands
- "My goals" - List all savings goals
- "Savings goals" - Show goal progress
- "Show goals" - Display goals with progress

### Investment Commands
- "My investments" - View portfolio
- "Investment portfolio" - Investment summary
- "Portfolio" - Quick portfolio view

### Analysis Commands
- "Spending analysis" - Category spending breakdown
- "Where did my money go" - Spending summary
- "Expenses" - Monthly expenses

### Report Commands
- "Financial report" - Comprehensive report
- "Report" - Quick financial summary
- "Summary" - Overview of finances

---

## 🔧 API Usage Examples

### Get All Accounts
```javascript
fetch('/api/accounts')
.then(res => res.json())
.then(data => console.log(data.accounts));
```

### Transfer Funds
```javascript
fetch('/api/transfer', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
from_account: 'ACC001234567',
to_account: 'ACC001234568',
amount: 500.00
})
});
```

### Create Budget
```javascript
fetch('/api/budgets', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
category: 'Food & Dining',
budget_amount: 500.00,
period: 'monthly'
})
});
```

### Get Spending Analysis
```javascript
fetch('/api/spending-analysis?days=30')
.then(res => res.json())
.then(data => {
console.log('Total spent:', data.total_spent);
console.log('By category:', data.analysis);
});
```

### Export Transactions
```javascript
// This will download a CSV file
window.location.href = '/api/export-transactions?days=30';
```

---

## 🎯 Sample Data

The demo account comes pre-loaded with:
- 2 accounts (Savings and Checking)
- Sample transactions with categories
- 3 budgets (Food, Utilities, Entertainment)
- 2 savings goals (Emergency Fund, Vacation)
- 2 investments (Stocks, Bonds)
- 3 bills (Electricity, Internet, Credit Card)

---

## 🔐 Security Features

- All API endpoints require authentication (`@login_required`)
- Account transfers only allowed between user's own accounts
- SQL injection prevention with parameterized queries
- Session-based authentication
- Password hashing with Werkzeug

---

## 📈 Future Enhancement Ideas

- Monthly/yearly reports comparison
- Bill reminder notifications
- Automatic transaction categorization using ML
- Goal contribution tracking
- Investment performance charts
- Email/SMS alerts
- Multi-currency support
- Tax reporting features
- Loan calculator
- Credit score tracking

---

## 🐛 Known Limitations

- Transaction categories are basic (can be enhanced)
- Budget alerts not implemented (structure ready)
- Investment values must be updated manually
- No automatic recurring bill payments (structure ready)
- Export format is CSV only (can add PDF/Excel)

---

**Last Updated:** 2026
**Version:** 2.0 (Advanced Features)
static/css/style.css
Raw Download
Find: Go to:
/*
Finance Assistant Bot - Stylesheet
===================================
Project: Finance Assistant Bot
Category: Custom Chatbots
Description: Financial chatbot for account inquiries, transaction history, and financial advice.

Developer Information:
----------------------
Founder: Molla Samser
Email: help@rskworld.in
Phone: +91 93305 39277
Address: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India, 713147
Website: https://rskworld.in
Year: 2026
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #28a745;
    --secondary-color: #007bff;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 20px rgba(0,0,0,0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: white;
    box-shadow: var(--shadow);
    padding: 1rem 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    font-size: 2rem;
    color: var(--primary-color);
}

.logo h1 {
    color: var(--dark-color);
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info span {
    color: var(--dark-color);
    font-weight: 600;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn-login, .btn-register, .btn-logout {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-login {
    background: var(--secondary-color);
    color: white;
}

.btn-register {
    background: var(--primary-color);
    color: white;
}

.btn-logout {
    background: #dc3545;
    color: white;
}

.btn-login:hover, .btn-register:hover, .btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
}

/* Welcome Screen */
.welcome-screen {
    background: white;
    border-radius: 10px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.welcome-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.welcome-content h2 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.welcome-content > p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 10px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #666;
    font-size: 0.9rem;
}

.demo-info {
    background: #e7f3ff;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 2rem;
    border-left: 4px solid var(--secondary-color);
}

.demo-info code {
    background: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Chat Container */
.chat-container {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    max-height: 800px;
}

.chat-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #20c997 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

.chat-header h2 {
    margin-bottom: 0.5rem;
}

.chat-header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8f9fa;
}

.message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: var(--secondary-color);
    color: white;
}

.bot-message .message-avatar {
    background: var(--primary-color);
    color: white;
}

.message-content {
    max-width: 70%;
    padding: 1rem;
    border-radius: 10px;
    position: relative;
}

.user-message .message-content {
    background: var(--secondary-color);
    color: white;
    border-bottom-right-radius: 3px;
}

.bot-message .message-content {
    background: white;
    color: var(--text-color);
    border-bottom-left-radius: 3px;
    box-shadow: var(--shadow);
}

.message-content p {
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
    line-height: 1.6;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Chat Input */
.chat-input-container {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 10px 10px;
}

.quick-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 0.5rem 1rem;
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quick-btn i {
    font-size: 0.9rem;
}

.action-buttons {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-buttons .quick-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.input-wrapper {
    display: flex;
    gap: 0.5rem;
}

#chatInput {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

#chatInput:focus {
    border-color: var(--primary-color);
}

.btn-send {
    width: 50px;
    height: 50px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send:hover {
    background: #218838;
    transform: scale(1.05);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-color);
}

.modal-content h2 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.modal-footer {
    margin-top: 1rem;
    text-align: center;
    color: #666;
}

.modal-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .logo h1 {
        font-size: 1.2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .message-content {
        max-width: 85%;
    }

    .chat-container {
        height: calc(100vh - 150px);
    }
}
567 lines•10.1 KB
css
🚀 Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work ❤️

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer