Plan Smart, Retire Confident.
An AI-assisted, privacy-first platform that helps retirees and near-retirees maximize their lifetime pension benefits through smart scenario modeling, optimization, and plain-language guidance.
- Data-Driven Modeling: Verified formulas, not AI guesses.
- Scenario Generation: Compares various payout options.
- Portfolio Analysis: Track and analyze investment portfolios
- Risk Assessment: Evaluate risk tolerance and investment preferences
- Retirement Planning: Calculate retirement needs and projections
- Stock Market Integration: Real-time financial data integration
- Intelligent Conversations: Context-aware chatbot with conversation history
- Document Analysis: Upload PDFs for information extraction or Q&A
- RAG (Retrieval-Augmented Generation): Semantic search through uploaded documents using Pinecone
- Multi-Intent Processing: Handles questions, document extraction, and general queries
- Life Expectancy Prediction: ML models for health-based life expectancy estimation
- Retirement Optimization: Predictive algorithms for optimal retirement strategies
- Risk Profiling: Advanced risk assessment using machine learning
- Responsive Design: Built with React and Tailwind CSS
- Interactive Charts: Data visualization with Chart.js
- Real-time Updates: Live data synchronization
- User-friendly UX: Intuitive interface for all user types
WealthWise/
├── frontend/ # React.js web application
├── backend/ # Django REST API
├── predictions/ # FastAPI ML service
└── README.md
- Users App: User management, authentication, profile data
- Chatbot App: AI conversation engine with RAG capabilities
- Financial Data App: Market data and portfolio management
- RESTful APIs: Comprehensive API endpoints
- Modern Stack: React 19, Redux Toolkit, React Router
- Styling: Tailwind CSS with responsive design
- Charts: Interactive visualizations with Chart.js
- State Management: Redux for global state
- Prediction Models: XGBoost, Scikit-learn models
- Health Analytics: Life expectancy and risk assessment
- Fast API: High-performance ML inference endpoints
- Python 3.8+
- Node.js 16+
- Git
git clone <repository-url>
cd WealthWisecd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
pip install -r requirements_rag.txt
# Environment setup
cp .env.example .env
# Edit .env with your API keys (see Configuration section)
# Database setup
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
# Run server
python manage.py runservercd frontend
# Install dependencies
npm install
# Start development server
npm run devcd predictions
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run FastAPI server
fastapi run app.pyCreate .env file in the backend/ directory:
# ===========================================
# ENVIRONMENT MODE (Change this to switch between dev/prod)
# ===========================================
ENV_MODE=dev # dev or prod
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# Google AI Configuration
GOOGLE_API_KEY=your_google_api_key_here
# ===========================================
# DEVELOPMENT ENVIRONMENT CONFIGS
# ===========================================
SITE_URL_DEV=http://localhost:3000
FASTAPI_URL_DEV=http://localhost:5000
KITE_API_KEY_DEV=
KITE_API_SECRET_DEV=
# ===========================================
# PRODUCTION ENVIRONMENT CONFIGS
# ===========================================
SITE_URL_PROD=
FASTAPI_URL_PROD=
KITE_API_KEY_PROD=
KITE_API_SECRET_PROD=
# Pinecone Configuration for RAG
PINECONE_API_KEY=your_pinecone_api_key_here
PINECONE_ENVIRONMENT=us-east-1
PINECONE_INDEX_NAME=pension-chatbot-
Google AI API Key
- Visit Google AI Studio
- Create new API key
- Add to
GOOGLE_API_KEYin.env
-
Pinecone API Key (for RAG functionality)
- Sign up at Pinecone
- Create new project and get API key
- Add to
PINECONE_API_KEYin.env
User: "Extract my personal information from this PDF"
System: Processes PDF and returns structured JSON which updates global user states:
- Personal details (name, age, location)
- Financial information (salary, investments)
- Health data (BMI, medical conditions)
- Retirement plans
User: "What does my pension document say about early retirement?"
System:
1. Processes PDF into chunks
2. Stores embeddings in Pinecone
3. Retrieves relevant sections
4. Provides contextual answers
User: "Should I increase my pension contribution?"
System: Analyzes user profile and provides personalized advice
POST /api/auth/register/- User registrationPOST /api/auth/login/- User loginPOST /api/auth/logout/- User logout
GET /api/users/profile/- Get user profilePUT /api/users/profile/- Update user profilePOST /api/users/income-status/- Add income informationPOST /api/users/retirement-info/- Add retirement plans
POST /api/chatbot/chat/- Send message to chatbotGET /api/chatbot/history/- Get conversation historyDELETE /api/chatbot/history/- Clear conversation history
GET /api/financial/stocks/- Get stock dataPOST /api/financial/portfolio/- Add portfolio data
POST /predictions/life-expectancy/- Predict life expectancyPOST /predictions/risk-profile/- Calculate risk profile
- Intent Classification: Automatically categorizes user requests
- Context Awareness: Maintains conversation history
- Multi-turn Conversations: Handles complex, ongoing discussions
- PDF Text Extraction: Extracts text from uploaded documents
- Information Extraction: Uses LLM to extract structured data
- Semantic Search: Vector-based document search with Pinecone
- Health-based Life Expectancy: ML model considering lifestyle factors
- Risk Assessment: Portfolio risk analysis
- Retirement Projections: Financial planning algorithms
{
"personal": {
"name": "string",
"age": "number",
"dateOfBirth": "date",
"gender": "string",
"location": "string",
"maritalStatus": "string",
"numberOfDependants": "number"
},
"financial": {
"currentSalary": "number",
"yearsOfService": "number",
"employerType": "string",
"pensionScheme": "string",
"pensionBalance": "number",
"portfolioValue": "number"
},
"health": {
"height": "number",
"weight": "number",
"bmi": "number",
"physicalActivity": "string",
"smokingStatus": "string",
"medicalConditions": "object"
}
}- JWT Authentication: Secure token-based authentication
- User Isolation: Each user's data and documents are isolated
- API Rate Limiting: Protection against abuse
- Input Validation: Comprehensive data validation
- CORS Configuration: Secure cross-origin requests
-
Backend (Django)
# Set production environment variables DEBUG=False ALLOWED_HOSTS=your-domain.com # Use production database (PostgreSQL recommended) # Configure static files serving python manage.py collectstatic # Use production WSGI server (Gunicorn) pip install gunicorn gunicorn wealthwise.wsgi:application
-
Frontend (React)
# Build for production npm run build # Serve with nginx or deploy to Vercel/Netlify
-
ML Service (FastAPI)
# Use production ASGI server (Uvicorn) pip install uvicorn uvicorn app:app --host 0.0.0.0 --port 8001
-
Pinecone Connection Error
Solution: Check PINECONE_API_KEY and PINECONE_ENVIRONMENT in .env -
Google AI API Error
Solution: Verify GOOGLE_API_KEY and check API quotas -
CORS Issues
Solution: Update CORS_ALLOWED_ORIGINS in Django settings -
Database Migration Errors
python manage.py makemigrations --empty appname python manage.py migrate --fake-initial
For support and questions:
- Create an issue in the repository
- Contact: mailto:miranfirdausi027@gmail.com
- Onkar Mendhapurkar
- Miran Firdausi
- Janmejay Pandya
- Parimal Kulkarni Built with ❤️ for better financial planning and retirement security.