Turn every dollar into opportunity!
BuckBounty is an AI-powered personal finance assistant that maximizes savings through intelligent credit card reward optimization, automated deal discovery, and personalized wealth-building strategies.
The average American leaves over $3,000 on the table every year through:
- Suboptimal credit card usage (wrong cards for wrong categories)
- Missed promotional deals and coupons
- Lack of financial awareness and poor spending decisions
- Not investing saved money for wealth building
Traditional budgeting apps just show you numbersβthey don't actively help you make money.
BuckBounty solves this by combining AI-powered transaction analysis, multi-agent orchestration, and advanced retrieval techniques to turn your spending into savings and wealth.
- MARK (Main Agent): Orchestrates user queries, provides financial advice, budget analysis
- BountyHunter1: Automated coupon scraping from Gmail, Honey, Rakuten (cron-based)
- BountyHunter2: Personalized financial news aggregation from Yahoo Finance (24-hour cycles)
- Analyzes spending patterns across 10+ categories
- Recommends optimal credit cards for maximum rewards
- Calculates annual savings potential (up to $2,400/year)
- @ Mentions:
@Starbucksinstantly analyzes merchant-specific spending and finds coupons - Voice Interface: Speech-to-text input + ElevenLabs TTS output for hands-free control
- Bill Splitting: Gemini Vision scans receipts and auto-splits via Stripe
- Investment Advisor: Converts savings into personalized portfolios with 10-year projections
- PolyMarket Integration: Prediction market analysis with risk assessment
- Radar charts comparing current vs previous month spending
- Pie charts for category breakdown
- Real-time budget tracking with overspending alerts
- Transaction search with semantic understanding
BuckBounty uses a novel dual-index architecture with FAISS for optimal retrieval speed:
βββββββββββββββββββββββββββββββββββββββββββββββ
β Transaction Ingestion β
β (Plaid API β Embedding β Vector DB) β
ββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββ
β Current Month β β FLAT Index (Exact Search, <50ms)
βββββββββ¬βββββββββ
β Auto-migration after 30 days
βΌ
βββββββββββββββββ
β Historical β β HNSW Index (Approximate NN, scales to millions)
ββββββββββββββββββ
Why This Matters:
- 2x faster than traditional single-index systems
- FLAT index: Perfect accuracy for recent transactions (most queries)
- HNSW index: Memory-efficient for historical data (infrequent queries)
- Automatic migration keeps both indices optimized
User Query β Hash with Embeddings β Check Redis Cache
β
Cache Hit? (50ms)
β
ββ Yes β Return cached response
β
ββ No β Call Gemini API (2.5s)
β
Store in Redis with TTL
β
Return response
Performance Gains:
- 50x speedup on repeated queries (<50ms vs 2.5s)
- 70% reduction in API costs
- Semantic cache matching (similar questions hit same cache)
- UI indicators show time saved from cache hits
BuckBounty processes multiple data modalities:
- Text: Natural language queries via Gemini
- Voice: Web Speech API (input) + ElevenLabs (output)
- Vision: Gemini Vision for receipt scanning
- Structured Data: Transaction JSON, budget data, coupon databases
- Time-Series: Historical spending patterns for trend analysis
Cron Jobs (Backend Scheduling)
β
ββ BountyHunter1: Every 6 hours
β β
β Gmail API + Web Scraping (Honey, Rakuten)
β β
β Extract coupons β Generate embeddings
β β
β Store in JSON + Vector DB
β
ββ BountyHunter2: Every 24 hours
β
Yahoo Finance API (personalized by spending categories)
β
Fetch market news + trends
β
Store in JSON with metadata
Benefits:
- No blocking on main user queries
- Always-fresh data without user intervention
- Pre-processed embeddings for instant RAG retrieval
- Framework: Next.js 14 with App Router, React 18, TypeScript
- UI Components: ShadCN UI (Radix primitives), Tailwind CSS
- Visualizations: Recharts (Radar, Pie charts)
- 3D Graphics: Vanta.js for animated backgrounds
- State Management: Zustand
- Banking: Plaid Link (react-plaid-link)
- Voice: Web Speech API (STT), ElevenLabs API (TTS)
- Framework: FastAPI + Uvicorn (Python 3.11)
- LLM/AI:
- Google Gemini (text generation, embeddings, vision)
- OpenAI (fallback LLM support)
- Sentence Transformers (local embeddings: all-MiniLM-L6-v2)
- Vector Database: FAISS (FLAT + HNSW dual indexing)
- Caching: Redis (response cache, conversation history)
- Payment: Stripe API (bill splitting)
- Banking: Plaid API (transaction syncing)
- Web Scraping: BeautifulSoup, Selenium (coupon aggregation)
| API | Purpose |
|---|---|
| Plaid | Bank account linking, transaction syncing |
| Gemini | LLM reasoning, embeddings, vision (receipt scanning) |
| ElevenLabs | Natural text-to-speech for voice output |
| Stripe | Payment processing for bill splits |
| Yahoo Finance | Market news and financial trends |
| PolyMarket | Prediction market data and analysis |
| Gmail API | Email coupon extraction (optional) |
- Transactions: FAISS vector DB with metadata
- Coupons: Versioned JSON files with embeddings
- Finance News: JSON with category tagging
- Cache: Redis with TTL expiration
- Budgets: Embedded in vector DB
- Node.js 18+ and npm
- Python 3.11+
- Redis server (local or cloud)
- Git
git clone https://github.com/yourusername/buckbounty.git
cd buckbountyCopy the example environment file and fill in your API keys:
cp .env.example .envEdit .env with your credentials:
# LLM APIs
GEMINI_API_KEY=your_gemini_api_key_here
# Financial APIs
PLAID_CLIENT_ID=your_plaid_client_id
PLAID_SECRET=your_plaid_sandbox_secret
STRIPE_API_KEY=your_stripe_test_key
# Application
NEXT_PUBLIC_API_URL=http://localhost:8000
PORT=8000cd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Mac/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Start Redis (in a separate terminal)
redis-server
# Run the FastAPI server
uvicorn main:app --reload --host 0.0.0.0 --port 8000Backend will be available at http://localhost:8000
# From project root
npm install
# Run development server
npm run devFrontend will be available at http://localhost:3000
- Navigate to
http://localhost:3000 - Click "Connect Your Bank Account"
- Follow Plaid Link flow (use Plaid Sandbox credentials for testing)
- Start chatting with MARK!
We provide a complete Docker setup with frontend, backend, and Redis:
# Build and start all services
docker-compose up --build
# Run in detached mode
docker-compose up -d
# View logs
docker-compose logs -f
# Stop all services
docker-compose downServices:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- Redis: localhost:6379 (internal)
Backend:
cd backend
docker build -t buckbounty-backend .
docker run -p 8000:8000 --env-file ../.env buckbounty-backendFrontend:
docker build -t buckbounty-frontend .
docker run -p 3000:3000 --env-file .env buckbounty-frontendFor production (AWS, GCP, Azure):
- Update environment variables with production API keys
- Set up Redis (AWS ElastiCache, Redis Cloud, etc.)
- Configure CORS in
backend/main.py - Enable HTTPS (use nginx reverse proxy or cloud load balancer)
- Scale horizontally using Kubernetes or ECS
Example production URLs:
NEXT_PUBLIC_API_URL=https://api.buckbounty.com
REDIS_URL=redis://production-redis:6379-
Google Gemini (Free tier available)
- Get key: https://makersuite.google.com/app/apikey
- Used for: LLM reasoning, embeddings, vision
-
Plaid (Free sandbox)
- Sign up: https://dashboard.plaid.com/signup
- Get sandbox credentials
- Used for: Bank connections, transactions
-
Stripe (Free test mode)
- Sign up: https://dashboard.stripe.com/register
- Get test API key
- Used for: Bill splitting payments
-
ElevenLabs (Free tier: 10k characters/month)
- Sign up: https://elevenlabs.io
- Used for: High-quality text-to-speech
-
Gmail API (Free)
- Enable in Google Cloud Console
- Used for: Coupon email extraction
User: "Maximize my savings"
MARK: Analyzes spending across categories
β Recommends best credit cards
β Shows annual savings: $2,400
β Generates investment portfolio from savings
User: "@Starbucks"
MARK: Total spent: $347.82 (23 transactions)
Average: $15.12 per visit
Available coupons: 2 promo codes
Suggestion: Try local coffee shop (save 40%)
User: "Can I afford AirPods Pro 2 ($249)?"
MARK: Current month spending: $1,847
Remaining budget: $653
Recommendation: YES (within 10% safe purchase rule)
Alternative: Klarna 4 payments of $62.25
User: [Speaks] "What did I spend on food last month?"
MARK: [Voice response] "You spent $487 on food delivery
and $312 on groceries. I found 3 active DoorDash
coupons that could save you 20% on your next order."
cd backend
pytest# Test MARK agent
python -m agents.mark_agent
# Test mention handler
python test_mention_handler.pynpm run lint
npm run build| Metric | Traditional Approach | BuckBounty |
|---|---|---|
| Transaction search (10k records) | ~500ms | ~250ms (FLAT/HNSW) |
| Repeated LLM queries | 2.5s | <50ms (Redis cache) |
| API cost per 1000 queries | $20 | $6 (70% savings) |
| Coupon data freshness | Manual refresh | Auto-update every 6h |
| Multi-modal support | Text only | Text + Voice + Vision |
buckbounty/
βββ app/ # Next.js app directory
β βββ page.tsx # Main landing page
β βββ layout.tsx # Root layout
β βββ globals.css # Global styles
βββ components/ # React components
β βββ ChatInterface.tsx # AI chat UI
β βββ Dashboard.tsx # Financial dashboard
β βββ TransactionList.tsx # Transaction table
β βββ PlaidLink.tsx # Bank connection
β βββ ui/ # ShadCN components
βββ backend/ # FastAPI backend
β βββ main.py # API server entry
β βββ agents/
β β βββ mark_agent.py # Main orchestrator
β β βββ bounty_hunter_1.py # Coupon scraper
β β βββ bounty_hunter_2.py # Finance news
β βββ vector_db.py # FAISS wrapper
β βββ rag_service.py # Dual-index RAG
β βββ redis_cache.py # Caching layer
β βββ credit_card_optimizer.py
β βββ investment_advisor.py
β βββ mention_handler.py # @ mention processing
β βββ data/
β βββ coupons/ # Scraped coupon JSON
β βββ finance_news/ # News JSON
βββ docker-compose.yml # Multi-service orchestration
βββ Dockerfile # Frontend container
βββ backend/Dockerfile # Backend container
βββ .env.example # Environment template
βββ README.md # This file
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Plaid for making bank integration accessible
- Google Gemini for powerful multimodal AI
- ElevenLabs for natural voice synthesis
- Vercel for Next.js and deployment platform
- ShadCN for beautiful UI components
Project Maintainer: [Your Name]
- Email: your.email@example.com
- Twitter: @yourusername
- LinkedIn: [Your Profile]
Project Link: https://github.com/yourusername/buckbounty
Check out our roadmap:
- Machine learning budget predictions
- Tax optimization agent
- Automated bill negotiation
- Mobile app (React Native)
- Cryptocurrency portfolio tracking
- International banking support
- Social spending leaderboards
Turn every dollar into opportunity with BuckBounty! π°