Tajiri Agent (from the Swahili word "Tajiri" meaning wealthy or rich) is an advanced Personal Financial AI Command Center. It empowers users to take total control of their financial life through deterministic financial math, artificial intelligence, automated goal tracking, budget planning, debt elimination, and secure multi-factor authentication.
# Tajiri Agent - Personal Financial AI Agent Platform
**Tajiri Agent** is a personal financial planning platform that helps users understand their money, budget effectively, manage debt, build emergency reserves, track real-time inflation, and achieve their goals through an interactive, visual GUI dashboard powered by **FastAPI**, **MongoDB**, and **Gemini AI with Google Search Grounding**.
---
## 🏗️ Core Architecture
```
[ USER ]
│
▼
┌───────────────────────────┐
│ FRONTEND GUI DASHBOARD │
│ (Vanilla JS, Dark Mode) │
└─────────────┬─────────────┘
│ HTTP REST API
▼
┌───────────────────────────┐
│ PYTHON FASTAPI BACKEND │
├───────────────────────────┤
│ • Deterministic Math │
│ • Financial Validation │
└───────┬───────────┬───────┘
│ │
▼ ▼
┌──────────────┐ ┌──────────────────────────────────┐
│ MongoDB │ │ GEMINI 2.5 / 3.6 FLASH │
│ Database │ │ (With Real-Time Search Grounding)│
└──────────────┘ └──────────────────────────────────┘
```
---
## ⚡ Key Features
1. **Structured Guided Wizard (No Chatbot Friction)**
- Step-by-step interactive popups ("What's your total monthly salary?", "Where are you located?", "What's your goal?").
2. **Deterministic Financial Math in Python**
- Salary cashflow bounds, remaining disposable income, debt payoff timeline, 6-month emergency reserve calculations, compound inflation projections.
3. **Gemini Real-Time Search Grounding**
- Fetches live car prices, local dealers, shop options, Kenya CPI inflation data, and market rates with source attribution.
4. **Resilient Data Persistence**
- Asynchronous MongoDB driver (`motor`) with automatic in-memory fallback for instant setup.
---
## 🚀 Quick Start Guide
### 1. Requirements
- Python 3.10+
- MongoDB (Optional, in-memory mode active if MongoDB service is offline)
- Gemini API Key (Optional for live web search grounding)
### 2. Environment Configuration
Create a `.env` file in the `backend/` folder:
```env
MONGODB_URI=mong …