AI-powered pension management platform with real-time chatbot assistance, Monte Carlo simulations, and interactive scenario analysis for retirement planning.
- 🤖 AI Chatbot - Real-time retirement planning guidance with LLM integration (Mistral/LLaVA)
- 📊 What-If Simulations - Monte Carlo analysis and stress testing for portfolio scenarios
- 📈 Interactive Dashboards - Role-based analytics for Members, Advisors, and Regulators
- 🔐 Secure Authentication - NextAuth.js with JWT and role-based access control
- 💹 Financial Modeling - Advanced algorithms for retirement projections and optimization
- 📱 Responsive UI - Modern interface built with Next.js 15 and Tailwind CSS
Frontend: Next.js 15, React, NextAuth.js, Tailwind CSS, Plotly.js
Backend: Node.js, Express, PostgreSQL
AI/ML: LLM Integration (Mistral/LLaVA), Monte Carlo Simulations
Security: JWT, Role-Based Access Control, Helmet, CORS
RetireWise/
├── frontend/ # Next.js Frontend Application
│ ├── src/
│ │ ├── app/ # App Router (Next.js 15)
│ │ │ ├── (auth)/ # Authentication pages
│ │ │ ├── api/ # API routes & proxy
│ │ │ └── dashboard/ # Protected dashboards
│ │ ├── components/ # React components
│ │ │ ├── auth/ # Auth components
│ │ │ ├── charts/ # Chart components
│ │ │ └── roles/ # Role-specific dashboards
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # API services & utilities
│ │ └── styles/ # Styles
│ └── public/ # Static assets
│
├── backend/ # Express.js Backend Server
│ ├── src/
│ │ ├── routes/ # API routes
│ │ ├── controllers/ # Business logic
│ │ ├── services/ # Core services
│ │ │ ├── ChatbotService.js
│ │ │ ├── WhatIfSimulatorService.js
│ │ │ └── GraphInsightsService.js
│ │ ├── middleware/ # Auth & validation
│ │ ├── config/ # Configuration
│ │ └── models/ # Data models
│ ├── database/ # Migrations & seeders
│ ├── logs/ # Audit logs
│ └── tests/ # Test suites
│
├── documentation/ # Project documentation
└── scripts/ # Utility scripts
# Clone repository
git clone https://github.com/sahilgoyal7214/MUFG.git
cd MUFG
# Install dependencies
pnpm install
cd frontend && pnpm install && cd ..
cd backend && pnpm install && cd ..
# Start backend (port 4000)
cd backend && pnpm start &
# Start frontend (port 3000)
cd frontend && pnpm devAccess: http://localhost:3000
API Docs: http://localhost:4000/api-docs
Test Login: advisor1 / password123
# Frontend
cd frontend
pnpm dev # Development server
pnpm build # Production build
# Backend
cd backend
pnpm start # Production server
node generate-test-token.js [role] # Generate JWT tokensFrontend (.env.local)
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret-key
BACKEND_URL=http://localhost:4000Backend (.env)
PORT=4000
JWT_SECRET=your-secret-key
DATABASE_URL=postgresql://username:password@host:5432/database
LOCAL_LLM_URL=http://localhost:11434/api/generateSwagger UI: http://localhost:4000/api-docs
Key Endpoints:
/api/auth/*- Authentication and JWT verification/api/members/*- Pension data management/api/chatbot/message- AI-powered guidance/api/graph-insights/analyze- Visual chart analysis/api/analytics/dashboard- Role-based analytics
- MEMBER - Personal pension data and chatbot access
- ADVISOR - Client portfolio management and analytics
- REGULATOR - System-wide access and compliance monitoring
backend/README.md- Backend setup guidedocumentation/PROJECT-SETUP-COMPLETE.md- Complete setup instructionsdocumentation/backend/SWAGGER-API-DOCUMENTATION.md- API reference
Contributions welcome! Please fork the repository and submit a pull request.
MIT License