Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation



🌿 Concierge

AI-Powered FIRE Path Planner for India

Making financial planning as accessible as checking WhatsApp.

Turning confused savers into confident investors — in seconds, at zero cost.


📖 Docs🚀 Quick Start🏗️ Architecture🤝 Contributing


🚨 The Problem

95% of Indians have no financial plan.

Traditional financial advisors charge ₹25,000+ per year and cater exclusively to High Net-worth Individuals (HNIs). Hundreds of millions of middle-class Indians navigate SIPs, tax regimes, insurance gaps, and retirement planning completely alone.

Concierge democratizes expert-grade financial advice using AI.


✨ Key Features

Feature Description
🔥 FIRE Path Planner 4-step wizard generating personalized retirement roadmaps
🤖 AI Mentor Chat LLM-powered conversational advisor with RAG
👤 Profile Dashboard Track FIRE progress, corpus targets, SIP metrics
🌐 Multilingual English, Hindi & Hinglish support
🔒 Secure & Private Rate limiting, input validation, session isolation

🔥 FIRE Path Planner — How It Works

The core feature guides users through a 4-step onboarding wizard and outputs a complete financial roadmap.

Input → Output Flow

flowchart TD
    A([👤 User Starts]) --> B

    subgraph WIZARD ["📋 4-Step Onboarding Wizard"]
        B[Step 1\nName & Current Age]
        B --> C[Step 2\nIncome · Expenses · Savings · Investments]
        C --> D[Step 3\nTarget Retirement Age\nPost-Retirement Expenses]
        D --> E[Step 4\nRisk Profile · Language Preference]
    end

    E --> F{⚙️ FIRE Calculator Engine}

    subgraph ENGINE ["🧮 calculator.py"]
        F --> G[Inflation Adjustment\n6% annual rate]
        G --> H[Corpus Calculation\n25x–35x Rule + 10% healthcare buffer]
        H --> I[Risk-Based Returns\n8% / 11% / 14% CAGR]
        I --> J[Existing Wealth Projection\nCompound forward & deduct]
        J --> K[SIP Calculation\nPMT formula on corpus gap]
        K --> L[FIRE Classification\nLean / Moderate / Fat]
    end

    L --> M{🤖 AI Roadmap Generator}

    subgraph AI ["🧠 ai_advisor.py — LLM + RAG"]
        M --> N[Retrieve Financial Knowledge\nFAISS Vector Store]
        N --> O[Generate Personalized Plan\nDeepSeek via LangChain]
    end

    O --> P

    subgraph OUTPUT ["📊 Results Dashboard"]
        P[FIRE Corpus Range\nMin–Max]
        P --> Q[Monthly SIP Range]
        Q --> R[Years to FIRE + FIRE Type]
        R --> S[Asset Allocation by Risk Profile]
        S --> T[6-Month Action Plan\nMonthly Milestones]
        T --> U[Tax Optimization\n80C · NPS · ELSS]
        U --> V[Emergency Fund Target]
        V --> W[Insurance Recommendations\nTerm + Health]
    end

    style WIZARD fill:#1a1a2e,stroke:#e94560,color:#fff
    style ENGINE fill:#16213e,stroke:#0f3460,color:#fff
    style AI fill:#0f3460,stroke:#533483,color:#fff
    style OUTPUT fill:#1a1a2e,stroke:#2ecc71,color:#fff
Loading

🗺️ System Architecture

flowchart LR
    subgraph FRONTEND ["🖥️ Frontend — Vanilla HTML/CSS/JS + Tailwind"]
        FP1[firststep_page.html\nStep 1]
        FP2[fire_wizard.html\nStep 2]
        FP3[thirdstep.html\nStep 3]
        FP4[fourthstep.html\nStep 4]
        FPR[fire_plan.html\nResults]
        FPC[ai_mentor.html\nChat]
        FPRO[profile_page.html\nProfile]
    end

    subgraph BACKEND ["⚙️ Backend — Python FastAPI"]
        MAIN[main.py\nRoutes · Middleware · CORS]
        MODEL[model.py\nPydantic v2 Validation]
        CALC[calculator.py\nFIRE Math Engine]
        AI[ai_advisor.py\nLLM + RAG Layer]
        DB[database.py\nSupabase / In-Memory]
    end

    subgraph INFRA ["☁️ Infrastructure & AI"]
        SUPA[(Supabase\nPostgreSQL)]
        FAISS[(FAISS\nVector Store)]
        DS[DeepSeek LLM\nvia LangChain]
        GEMINI[Gemini\nIntegration]
        ST[Sentence Transformers\nEmbeddings]
    end

    FRONTEND -->|REST API Calls| MAIN
    MAIN --> MODEL
    MODEL --> CALC
    MODEL --> AI
    CALC --> DB
    AI --> FAISS
    AI --> DS
    AI --> GEMINI
    FAISS --> ST
    DB --> SUPA

    style FRONTEND fill:#1a1a2e,stroke:#e94560,color:#fff
    style BACKEND fill:#16213e,stroke:#0f3460,color:#fff
    style INFRA fill:#0f3460,stroke:#533483,color:#fff
Loading

🤖 AI Mentor Chat Flow

sequenceDiagram
    participant U as 👤 User
    participant FE as 🖥️ Frontend
    participant API as ⚙️ FastAPI
    participant RAG as 🔍 RAG (FAISS)
    participant LLM as 🧠 DeepSeek LLM
    participant DB as 🗄️ Supabase

    U->>FE: Sends question (EN/HI/Hinglish)
    FE->>API: POST /chat/message
    API->>DB: Fetch session + FIRE plan context
    DB-->>API: User profile & plan data
    API->>RAG: Retrieve relevant financial docs
    RAG-->>API: Top-k chunks
    API->>LLM: Prompt = question + context + RAG chunks
    LLM-->>API: Personalized response
    API->>DB: Save message to history
    API-->>FE: Response text
    FE-->>U: Display answer
Loading

🧮 FIRE Math Engine — Deep Dive

flowchart TD
    A[Monthly Post-Retirement Expenses\ne.g. ₹60,000] --> B

    B["Inflation Adjust to Retirement Year\nExpenses × (1.06)^years_to_retire"]
    B --> C

    C["Calculate Annual Expenses\nMonthly × 12"]
    C --> D

    D["FIRE Corpus Range\nMin = 25 × Annual Expenses\nMax = 35 × Annual Expenses\n+ 10% Healthcare Buffer"]
    D --> E

    E["Project Existing Wealth\nSavings + Investments × (1 + CAGR)^years"]

    subgraph CAGR_TABLE ["📊 Risk-Based CAGR"]
        C1[🛡️ Conservative\n8% CAGR]
        C2[⚖️ Moderate\n11% CAGR]
        C3[🚀 Aggressive\n14% CAGR]
    end

    E --> F["Remaining Corpus Gap\nTarget Corpus − Projected Wealth"]
    F --> G["Monthly SIP\nPMT formula on remaining gap"]
    G --> H{FIRE Type Classification}
    H -->|< ₹30k/month| I[🟡 Lean FIRE]
    H -->|₹30k–₹1L/month| J[🟢 Moderate FIRE]
    H -->|> ₹1L/month| K[🔵 Fat FIRE]

    style CAGR_TABLE fill:#16213e,stroke:#0f3460,color:#fff
Loading

🏗️ Tech Stack

Backend

AI / Machine Learning

Frontend

Database & Infrastructure


📁 Project Structure

concierge/
│
├── 📂 backend/
│   ├── 🐍 main.py           # FastAPI app, routes, middleware, CORS
│   ├── 🐍 model.py          # Pydantic v2 input models & injection protection
│   ├── 🐍 calculator.py     # FIRE math engine (corpus, SIP, allocation)
│   ├── 🐍 ai_advisor.py     # AI roadmap generation via LLM + RAG
│   ├── 🐍 database.py       # Supabase + in-memory fallback layer
│   └── 📄 requirements.txt
│
└── 📂 frontend/
    ├── 🌐 firststep_page.html   # Step 1 — Name & Age
    ├── 🌐 fire_wizard.html      # Step 2 — Income & Savings
    ├── 🌐 thirdstep.html        # Step 3 — FIRE Goals
    ├── 🌐 fourthstep.html       # Step 4 — Risk & Language
    ├── 🌐 fire_plan.html        # Results dashboard
    ├── 🌐 ai_mentor.html        # Chat interface
    ├── 🌐 profile_page.html     # User profile
    ├── 🎨 style.css
    └── ⚡ app.js

🚀 Getting Started

Prerequisites

  • Python 3.10+
  • Node.js (optional — for frontend tooling only)

Installation

# 1. Clone the repository
git clone https://github.com/your-org/concierge.git
cd concierge

# 2. Install Python dependencies
pip install -r backend/requirements.txt

Environment Setup

Create a .env file inside the backend/ directory:

# ─── Supabase (optional — falls back to in-memory if not set) ───────────────
SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_service_role_key   # Use service_role, NOT publishable key

# ─── LLM ────────────────────────────────────────────────────────────────────
DEEPSEEK_API_KEY=your_deepseek_api_key

# ─── CORS ───────────────────────────────────────────────────────────────────
ALLOWED_ORIGINS=http://localhost:8000,http://127.0.0.1:8000

💡 Note: The app runs fully without Supabase using an in-memory fallback. Data will not persist across server restarts in this mode.

Run

cd backend
uvicorn main:app --reload --port 8000

Open your browser at http://127.0.0.1:8000 🎉


🔌 API Reference

Method Endpoint Description
POST /fire-plan Generate a complete FIRE plan from user inputs
POST /chat/start Start a new AI Mentor chat session
POST /chat/message Send a message to the AI Mentor
GET /chat/history/{session_id} Retrieve full chat history
GET /chat/sessions/{user_id} List all sessions for a user
DELETE /user/{user_id} Delete all user data (GDPR compliant)
GET /search?query=... Search the RAG knowledge base

Example: Generate a FIRE Plan

curl -X POST http://127.0.0.1:8000/fire-plan \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Arjun Mehta",
    "age": 30,
    "monthly_income": 150000,
    "monthly_expenses": 70000,
    "current_savings": 500000,
    "existing_investments": 200000,
    "fire_target_age": 50,
    "monthly_expenses_post_fire": 60000,
    "risk_profile": "moderate",
    "language": "english"
  }'
📦 Sample Response (click to expand)
{
  "fire_corpus": {
    "min": 28500000,
    "max": 39900000
  },
  "monthly_sip": {
    "min": 42000,
    "max": 58000
  },
  "years_to_fire": 20,
  "fire_type": "Moderate FIRE",
  "asset_allocation": {
    "equity": "60%",
    "debt": "30%",
    "gold": "10%"
  },
  "emergency_fund_target": 420000,
  "action_plan": ["Month 1: ...", "Month 2: ..."],
  "tax_suggestions": ["80C: ₹1.5L via ELSS", "NPS: Additional ₹50K deduction"],
  "insurance": {
    "term": "₹1 Cr cover recommended",
    "health": "₹10L family floater"
  }
}

🛡️ Security

flowchart LR
    A[Incoming Request] --> B{Body Size Check\n< 1 MB}
    B -->|Pass| C{CORS Validation\nAllowed Origins Only}
    C -->|Pass| D{Rate Limiter\nSlowAPI}
    D -->|Pass| E{Pydantic v2\nInput Validation}
    E -->|Pass| F{Injection Scanner\nPattern Matching}
    F -->|Pass| G[✅ Process Request]

    B -->|Fail| X1[❌ 413 Payload Too Large]
    C -->|Fail| X2[❌ 403 Forbidden]
    D -->|Fail| X3[❌ 429 Too Many Requests]
    E -->|Fail| X4[❌ 422 Validation Error]
    F -->|Fail| X5[❌ 400 Bad Request]

    style G fill:#2ecc71,color:#000
    style X1 fill:#e74c3c,color:#fff
    style X2 fill:#e74c3c,color:#fff
    style X3 fill:#e74c3c,color:#fff
    style X4 fill:#e74c3c,color:#fff
    style X5 fill:#e74c3c,color:#fff
Loading
Layer Measure
🚦 Rate Limiting 5 req/min /fire-plan · 20 req/min chat · 200 req/day global
📦 Body Size Cap 1 MB limit via middleware
🔍 Injection Guard Inputs scanned against known prompt injection patterns
🌐 CORS Only explicitly allowed origins accepted
Input Validation Pydantic v2 strict types, ranges & length constraints
🔒 Session Isolation Chat summaries keyed by session ID — never leaked across users

🌐 Multilingual Support

Language Code Description
🇬🇧 English english Full professional financial English
🇮🇳 Hindi hindi Complete Hindi with financial terms preserved (SIP, ELSS, PPF)
🗣️ Hinglish hinglish Natural Hindi + English mix, as spoken by urban Indians

Language preference flows through both the AI roadmap generator and the chat advisor for a fully consistent experience.


🔮 Roadmap

gantt
    title Concierge — Feature Roadmap
    dateFormat  YYYY-Q[Q]
    axisFormat %Y Q%q

    section ✅ Shipped
    FIRE Path Planner          :done, 2025-01-01, 90d
    AI Mentor Chat             :done, 2025-01-01, 90d
    Multilingual Support       :done, 2025-01-01, 90d

    section 🚧 Coming Soon
    Money Health Score         :active, 2025-04-01, 60d
    Life Event Advisor         :2025-05-01, 60d
    Tax Wizard (Form 16)       :2025-06-01, 60d

    section 🔮 Future
    Couple's Money Planner     :2025-08-01, 90d
    MF Portfolio X-Ray         :2025-10-01, 90d
Loading
# Feature Status
💰 Money Health Score — 6-dimension financial wellness assessment 🚧 In Progress
💍 Life Event Advisor — Bonus, inheritance, marriage, new baby planning 📋 Planned
📄 Tax Wizard — Form 16 upload + old vs. new regime comparison 📋 Planned
👫 Couple's Money Planner — Joint income optimization across both partners 🔮 Future
📊 MF Portfolio X-Ray — CAMS/KFintech statement upload with XIRR & overlap analysis 🔮 Future

🤝 Contributing

Contributions are welcome! Here's how to get involved:

flowchart LR
    A[🍴 Fork the Repo] --> B[🌿 Create Feature Branch\ngit checkout -b feature/your-feature]
    B --> C[💻 Make Changes]
    C --> D[✅ Commit\ngit commit -m 'Add feature']
    D --> E[📤 Push\ngit push origin feature/your-feature]
    E --> F[🔃 Open Pull Request]
    F --> G[🎉 Merged!]
Loading
  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/money-health-score
  3. Commit your changes: git commit -m 'Add Money Health Score module'
  4. Push to the branch: git push origin feature/money-health-score
  5. Open a Pull Request

For major changes, please open an issue first to discuss what you'd like to change.


👥 Contributors

Built with ❤️ by two engineers from RGIPT for the Economic Times AI Hackathon.


Apurva Sinha

Apurva Sinha

@apurvafx

🧠 Backend · RAG Pipeline · FIRE Engine · Database · Security

Electrical Engineering @ RGIPT · AI/ML Developer
Deep Learning · Computer Vision · Embedded Systems

Aashish Chandra

Aashish Chandra

@Aashish-Chandr

🎨 UI/UX Design · Frontend Development · Backend Integration

Undergrad @ RGIPT · Computer Vision Enthusiast
Vehicle Plate Detection · Emotion Recognition · Deep Learning

Prateek Raj

Prateek Raj

@prs-24

💻 Frontend Development · Database

Electrical Engineering @ RGIPT · AI/ML Developer
Deep Learning · Computer Vision · Embedded Systems · IoT


📄 License

This project is licensed under the MIT License — see the LICENSE file for details.


Built with ❤️ for the Economic Times AI Hackathon

Democratizing financial planning for 1.4 billion Indians.


"Financial independence is not about being rich. It's about having choices."


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages