Skip to content

codinggita/codeavengers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

57 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AI Voice-Driven Mutual Fund Advisor

AI Voice-Driven Mutual Fund Advisor

Your voice-powered financial guide โ€” simplifying mutual fund investments through natural conversation.

Hackathon Voice First LLM FastAPI

Stars Forks Issues License Contributors


Overview

Millions of beginners find mutual funds intimidating โ€” jargon, endless choices, and complex data create a barrier to informed investing.

Advisor breaks that barrier. It's a voice-first AI assistant that understands natural language, adaptively profiles your risk appetite, analyzes real market data, and generates a personalized investment report โ€” all through a conversation that feels human.

Who it helps: Young professionals exploring their first investments, families seeking simplified guidance, beginners wanting to learn without the jargon, and anyone who prefers speaking over filling out forms.


Features

Category Features
๐ŸŽ™๏ธ Voice Speech-to-Text, Text-to-Speech, real-time transcription, noise handling
๐Ÿง  AI Natural language understanding via Ollama + Gemma 3, conversation memory, adaptive questioning, risk classification
๐Ÿ“Š Analytics CAGR, volatility, Sharpe ratio, maximum drawdown, historical NAV (10+ yrs)
๐Ÿ”’ Security Input validation, rate limiting, centralized error handling, env isolation
๐Ÿšง Future Multi-language, portfolio simulation, fund comparison, SIP calculator

Demo

๐Ÿ”— Live Demo ๐ŸŽฅ Demo Video ๐Ÿ“Š Presentation
Coming Soon Coming Soon Coming Soon


Tech Stack

Category Technology
Frontend React 18 + Vite ยท Web Speech API
Backend Node.js + Express ยท MongoDB + Mongoose
AI / LLM Ollama + Gemma 3 (local)
Analytics Python + FastAPI ยท pandas + NumPy
Data Source mfapi.in (Mutual Fund Data)

Architecture

graph TB
    User -->|Voice| WS[Web Speech API<br/>STT / TTS]
    WS -->|Text| FE[Frontend<br/>React + Vite]
    FE -->|API| BE[Backend<br/>Node.js + Express]
    BE -->|LLM Prompt| OLLAMA[Ollama ยท Gemma 3]
    BE -->|Fetch & Analyze| ANALYTICS[Analytics<br/>Python + FastAPI]
    ANALYTICS -->|NAV Data| MFAPI[mfapi.in]
    BE -->|Store| DB[(MongoDB)]
    BE -->|Report| FE
Loading

Flow: User speaks โ†’ Speech-to-Text โ†’ LLM risk analysis โ†’ Fetch real fund data โ†’ Compute metrics โ†’ Generate personalized report โ†’ Display in frontend.


Installation

Prerequisites

Make sure the following are installed on your machine:

  • Node.js 18+ and npm
  • Python 3.10+
  • Ollama installed and available in your PATH
  • MongoDB running locally or a MongoDB Atlas connection string

1) Clone the repo

git clone https://github.com/HARSHILL2023/codeavengers.git
cd advisor-project

2) Install dependencies

# Backend
cd advisor-backend
npm install
Copy-Item .env.example .env

# Frontend
cd ../advisor-frontend
npm install
Copy-Item .env.example .env

# Analytics
cd ../advisor-analytics
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt

If PowerShell blocks script activation, run:

Set-ExecutionPolicy -Scope Process Bypass

3) Pull the local LLM model

ollama pull llama3.2:3b

4) Run the services

Open separate terminals and run the following commands.

Terminal 1 โ€” Analytics API

cd advisor-project\advisor-analytics
.\.venv\Scripts\Activate.ps1
uvicorn main:app --reload --port 8000

Terminal 2 โ€” Backend API

cd advisor-project\advisor-backend
ollama serve
node server.js

Terminal 3 โ€” Frontend

cd advisor-project\advisor-frontend
npm run dev

You can also start everything from the repo root with:

.\start-all.ps1

Sample environment files

Backend environment variables in advisor-backend/.env.example:

PORT=5000
MONGODB_URI=mongodb://127.0.0.1:27017/advisorDB
ANALYTICS_SERVICE_URL=http://localhost:8000
OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=llama3.2:3b

Frontend environment variables in advisor-frontend/.env.example:

VITE_API_URL=http://localhost:5000/api
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key

Environment Variables

Service Variable Description Required
Backend PORT Backend port โŒ
Backend MONGODB_URI MongoDB connection string โœ…
Backend ANALYTICS_SERVICE_URL Analytics service base URL โŒ
Backend OLLAMA_URL Ollama base URL โŒ
Backend OLLAMA_MODEL Ollama model name โŒ
Frontend VITE_API_URL Backend API URL โŒ
Frontend VITE_SUPABASE_URL Supabase project URL โŒ
Frontend VITE_SUPABASE_ANON_KEY Supabase anonymous key โŒ

Usage

  1. Open http://localhost:5173 in Chrome/Edge
  2. Click the microphone and start speaking
  3. The AI asks about your financial goals, income, and timeline
  4. Your risk profile is classified as Conservative ๐ŸŸข, Moderate ๐ŸŸก, or Aggressive ๐Ÿ”ด
  5. Real fund data is fetched matching your profile
  6. A personalized investment report is generated with CAGR, volatility, Sharpe ratio, and recommendations

Screenshots


Landing

Voice

Chat

Report


AI Workflow

Step Description
Speech โ†’ Text Web Speech API captures audio and transcribes in-browser โ€” zero external STT services
Conversation Memory Full session history stored in MongoDB, fed to LLM for coherent multi-turn dialogue
Adaptive Questioning LLM assesses information gaps and dynamically generates follow-up questions
Risk Classification Structured prompting classifies users into Conservative / Moderate / Aggressive
Analytics Engine Python service fetches NAV data via mfapi.in, computes CAGR/volatility/Sharpe/drawdown with pandas
Report Generation LLM receives analytics data and produces a human-readable investment report

Roadmap

Phase Features
โœ… v1.0 Voice conversation, adaptive risk profiling, real fund data, personalized reports, financial analytics
๐Ÿšง v1.5 Multi-language support, fund comparison, portfolio simulation, PDF export
๐Ÿ”ฎ v2.0 User accounts, email/SMS delivery, SIP calculator, mobile app, real-time market data

Authors

NameGitHub
Harshil Patel@HARSHILL20233
Anand Suthar@anand880441-source
Trikum Devasi@TrikamDevasi
Pritesh Bachhav@BachhavPritesh


License

MIT โ€” see LICENSE.


Acknowledgements

Hackathon organizers ยท mfapi.in (free mutual fund data) ยท Ollama (local LLMs) ยท React + Vite ยท FastAPI + pandas



Star
If you found this helpful, give it a โญ on GitHub!

Stars Forks

Built with โค๏ธ for hackathon

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages