A full-stack, modular web application that provides intelligent financial guidance and wellness tracking through a modern chat interface. Chanakya combines ancient wisdom with modern AI to offer personalized financial advice and emotional wellness support.
- Personalized budgeting advice and financial planning
- Income and expense tracking with smart categorization
- Savings goals and investment recommendations
- Financial health score and progress tracking
- PERMA-based wellness assessment (Positive Emotions, Engagement, Relationships, Meaning, Accomplishment)
- Mood tracking and emotional state analysis
- Personalized wellness recommendations
- Progress visualization and trend analysis
- Gender-aware AI assistant (Rukmini/Krishna/Chanakya)
- Context-aware conversations with memory
- Mood-adaptive responses and theming
- Natural language understanding for financial queries
- Modern, responsive UI with dark/light mode
- Real-time chat with typing indicators
- Gamification elements (Wisdom Level, XP)
- Quick replies and voice input support
- Smooth animations and transitions
- Secure user registration and login
- JWT-based authentication
- Password reset via email
- Profile management with validation
- Rate limiting and security measures
- React 18 with TypeScript
- Tailwind CSS for styling
- Framer Motion for animations
- Recharts for data visualization
- Axios for API communication
- FastAPI (Python) REST API
- SQLAlchemy ORM
- Alembic for database migrations
- LangChain for AI integration
- OpenAI GPT-4 or Groq API
- Docker containerization
- PostgreSQL database
- Environment-based configuration
- CI/CD ready
├── backend/
│ ├── main.py # Main FastAPI application
│ ├── routes/ # API endpoints
│ │ ├── auth.py # Authentication routes
│ │ ├── chat.py # Chat interface routes
│ │ ├── budget.py # Budget management routes
│ │ └── mood.py # Mood tracking routes
│ ├── chanakya_chain/ # AI integration
│ │ ├── memory.py # Chat memory management
│ │ └── prompts.py # AI prompt templates
│ ├── db/ # Database models
│ │ └── models.py # SQLAlchemy models
│ ├── utils/ # Helper functions
│ │ └── helpers.py # Utility functions
│ └── alembic/ # Database migrations
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── RukminiChat/ # Chat interface
│ │ │ ├── BudgetForm/ # Budget management
│ │ │ ├── MoodTracker/ # Mood tracking
│ │ │ └── Dashboard/ # Main dashboard
│ │ ├── contexts/ # React contexts
│ │ ├── services/ # API services
│ │ └── types/ # TypeScript types
│ └── public/ # Static assets
├── .env # Environment variables
├── docker-compose.yml # Docker configuration
└── README.md # Project documentation
- Python 3.9+
- Node.js 16+
- PostgreSQL 13+
- Docker (optional)
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
cd backend
pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Initialize database
alembic upgrade head
# Run the server
uvicorn main:app --reload
# Install dependencies
cd frontend
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# Start development server
npm start
# Build and run containers
docker-compose up --build
FASTAPI_APP=main.py
FASTAPI_ENV=development
DATABASE_URL=postgresql://user:password@localhost:5432/chanakya
JWT_SECRET_KEY=your-secret-key
OPENAI_API_KEY=your-openai-key
GROQ_API_KEY=your-groq-key
MAIL_SERVER=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your-email
MAIL_PASSWORD=your-password
REACT_APP_API_URL=http://localhost:5001
REACT_APP_WS_URL=ws://localhost:5001
POST /auth/register
- Register new userPOST /auth/login
- User loginGET /auth/profile
- Get user profilePUT /auth/profile
- Update user profilePOST /auth/reset-password
- Reset password
POST /chat
- Send message to AIGET /chat/history
- Get chat historyDELETE /chat/history
- Clear chat history
POST /budget
- Create budgetGET /budget
- Get budget detailsPUT /budget
- Update budgetGET /budget/analytics
- Get budget analytics
POST /mood
- Log moodGET /mood/history
- Get mood historyGET /mood/analytics
- Get mood analytics
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for GPT-4 API
- Groq for alternative AI API
- The open-source community for various tools and libraries