Your intelligent companion for financial document analysis, market insights, and data-driven decision making
CKsFinBot is a sophisticated AI-powered financial analysis platform that combines the power of Large Language Models (LLMs) with advanced document processing capabilities. Built with a modern microservices architecture, it provides intelligent financial insights, document analysis, and conversational AI features tailored for finance professionals and enthusiasts.
- π§ Multi-Modal AI Chat - Text and image support with Google Gemini integration
- π Advanced Document Analysis - PDF, Excel, and financial report processing
- π Analytical Insights - Financial ratio calculations and trend analysis
- π Multi-Document Search - Cross-document comparison and analysis
- π¬ Conversational Interface - Natural language financial Q&A
- βοΈ Large File Support - S3 presigned URLs for files >10MB
- π¨ Modern UI/UX - Google AI Studio inspired interface
- π Secure Authentication - JWT-based user management
- π± Responsive Design - Works seamlessly across all devices
graph TB
A[React Frontend] --> B[Node.js Backend]
B --> C[Python AI Service]
B --> D[MongoDB Database]
B --> E[AWS S3 Storage]
C --> F[Pinecone Vector DB]
C --> G[Google Gemini API]
C --> H[LangChain Framework]
- React 19 - Modern UI framework
- Tailwind CSS 4 - Utility-first styling
- Framer Motion - Smooth animations
- Lucide React - Beautiful icons
- Axios - HTTP client
- Vite - Fast build tool
- Express.js - Web framework
- MongoDB - Document database
- Mongoose - ODM for MongoDB
- JWT - Authentication
- Multer + AWS S3 - File uploads
- Serverless Framework - Deployment
- FastAPI - High-performance API framework
- LangChain - LLM orchestration
- Google Gemini - Advanced AI model
- Pinecone - Vector database
- PyPDF - Document processing
- Sentence Transformers - Text embeddings
- AWS S3 - File storage
- AWS Lambda - Serverless functions
- MongoDB Atlas - Cloud database
- Pinecone - Vector search
- Vercel - Frontend deployment
Python-Backend/
β
βββ app/
β βββ api/
β β βββ endpoints.py
β β
β βββ core/
β β βββ config.py
β β
β βββ schemas/
β β βββ models.py
β β
β βββ services/
β βββ document_processor.py
β βββ llm_service.py
β βββ multi_modal_processor.py
β βββ pinecone_service.py
β βββ s3_service.py
β βββ main.py
β βββ prompts.py
β
βββ src/
β βββ Function/
β βββ index.js
β
βββ .gitignore
βββ handler.py
βββ package-lock.json
βββ package.json
βββ requirements.txt
βββ serverless.yml
βββ README.md
Node-Backend/
β
βββ .esbuild/
β βββ .build/
β
βββ src/
β βββ Controllers/
β βββ Middlewares/
β βββ Models/
β βββ Routes/
β βββ Utils/
β βββ db/
β
βββ Constants.js
βββ app.js
βββ index.js
βββ lambda.js
βββ .gitignore
βββ package-lock.json
βββ package.json
βββ serverless.yml
Frontend/
β
βββ public/
β βββ index.html
β βββ ...
β
βββ src/
β βββ Config/
β βββ JSX/
β βββ assets/
β βββ services/
β β
β βββ App.css
β βββ App.jsx
β βββ index.css
β βββ main.jsx
β
βββ .env
βββ .gitignore
βββ README.md
βββ eslint.config.js
βββ package-lock.json
βββ package.json
86d1d1d879489e68e675b3de0c1490d596abdd77
- Node.js 18+ and npm
- Python 3.11.9 and pip
- MongoDB instance
- AWS account (for S3)
- Google AI API key
- Pinecone account
git clone https://github.com/KrishChothani/CKsFinBot.git
cd CKsFinBotCreate .env files in each service directory:
VITE_API_URL=http://localhost:2590/api/v1PORT=2590
MONGODB_URI=mongodb://localhost:27017/cksfinbot
CORS_ORIGIN=http://localhost:5173
# JWT Secrets
ACCESS_TOKEN_SECRET=your_access_token_secret
ACCESS_TOKEN_EXPIRY=1d
REFRESH_TOKEN_SECRET=your_refresh_token_secret
REFRESH_TOKEN_EXPIRY=10d
# AWS Configuration
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=us-east-1
AWS_S3_BUCKET_NAME=your-s3-bucket
# Python Service
PYTHON_SERVICE_URL=http://127.0.0.1:8000/api/v1
# Email (Optional)
EMAIL_ID_FOR_VERIFICATION=your_email@gmail.com
EMAIL_PASSWORD_FOR_VERIFICATION=your_app_password# Google AI
GOOGLE_API_KEY=your_google_ai_api_key
# Pinecone
PINECONE_API_KEY=your_pinecone_api_key
PINECONE_ENVIRONMENT=your_pinecone_environment
# AWS (for document access)
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=us-east-1
# Database
MONGODB_URI=mongodb://localhost:27017/cksfinbotcd Frontend
npm installcd ../Node-Backend
npm installcd ../Python-Backend
pip install -r requirements.txt- Install MongoDB locally or use MongoDB Atlas
- Create a database named
cksfinbot - The application will automatically create required collections
cd Python-Backend
uvicorn app.main:app --reload --port 8000cd Node-Backend
npm run devcd Frontend
npm run devOpen your browser and navigate to http://localhost:5173
CKsFinBot offers 5 distinct modes for different use cases:
- Purpose: Intelligent conversations with text and image support
- Use Cases: General financial questions, image analysis, multi-modal queries
- Example: "Analyze this chart and explain the trends"
- Purpose: Deep analysis of financial documents and reports
- Use Cases: PDF analysis, financial statement review, report summarization
- Example: "Summarize the key insights from this quarterly report"
<<<<<<< HEAD
- Purpose: Advanced financial calculations and trend analysis
- Use Cases: Ratio calculations, performance metrics, trend analysis
- Example: "Calculate the debt-to-equity ratio trends over the last 3 years"
=======
- Purpose: Advanced financial calculations and trend analysis
- Use Cases: Ratio calculations, performance metrics, trend analysis
- Example: "Calculate the debt-to-equity ratio trends over the last 3 years"
86d1d1d879489e68e675b3de0c1490d596abdd77
- Purpose: Casual finance discussions and educational Q&A
- Use Cases: Learning financial concepts, basic questions, definitions
- Example: "What's the difference between stocks and bonds?"
<<<<<<< HEAD
- Purpose: Search and compare across multiple uploaded documents
- Use Cases: Cross-document analysis, comparative studies, research
- Example: "Compare revenue growth across all uploaded annual reports" =======
86d1d1d879489e68e675b3de0c1490d596abdd77
- PDF: Financial reports, statements, research papers
- Excel/CSV: Financial data, spreadsheets, datasets
- Images: Charts, graphs, financial diagrams
- Drag & Drop: Simply drag files into the chat interface
- Click to Browse: Use the paperclip icon to select files
- Large File Support: Files >10MB automatically use S3 direct upload
- Automatic text extraction and indexing
- Vector embeddings for semantic search
- Real-time processing status updates
- Secure cloud storage with public access URLs
- Feature mode selection with visual cards
- Example prompts for quick start
- Quick action buttons for common tasks
- Professional Google AI Studio inspired design
- Real-time messaging with typing indicators
- File attachment with preview and removal
- Message history with conversation persistence
- Export/Share functionality for conversations
- Responsive design for mobile and desktop
POST /api/v1/users/register
POST /api/v1/users/login
POST /api/v1/users/logout
GET /api/v1/users/current-user
POST /api/v1/users/refresh-tokenGET /api/v1/conversations
POST /api/v1/conversations
GET /api/v1/conversations/:id
DELETE /api/v1/conversations/:id
PATCH /api/v1/conversations/:id/feature
PATCH /api/v1/conversations/:id/titlePOST /api/v1/conversations/:id/messagesPOST /api/v1/documents/upload # Regular upload (<10MB)
POST /api/v1/documents/upload-s3 # S3 direct upload (>10MB)
POST /api/v1/s3/generate-presigned-url # Generate S3 upload URLPOST /api/v1/query # Process chat queries
POST /api/v1/process-document # Process uploaded documents
POST /api/v1/delete-documents # Cleanup documents- Build the frontend:
cd Frontend
npm run build- Deploy to Vercel:
vercel --prod- Configure AWS credentials
- Deploy Node.js backend:
cd Node-Backend
serverless deploy- Deploy Python backend:
cd Python-Backend
serverless deployUpdate your production environment variables with:
- Production database URLs
- Production API endpoints
- Production AWS credentials
- Production API keys
- JWT Authentication with access and refresh tokens
- CORS Protection with configurable origins
- Input Validation using express-validator
- File Upload Security with type and size restrictions
- Environment Variable Protection for sensitive data
- AWS IAM Roles for secure cloud resource access
cd Frontend
npm run testcd Node-Backend
npm run testcd Python-Backend
pytest- Error Tracking: Comprehensive error handling and logging
- Performance Monitoring: Response time tracking
- Usage Analytics: User interaction metrics
- Document Processing Stats: Upload and processing statistics
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow ESLint configuration for JavaScript/React
- Use Black formatter for Python code
- Write comprehensive tests for new features
- Update documentation for API changes
- Follow conventional commit messages
This project is licensed under the ISC License - see the LICENSE file for details.
<<<<<<< HEAD
Team CKsDev
- Full-stack development
- AI/ML integration
- Cloud architecture
- UI/UX design
For support and questions:
- π§ Email: support@cksfinbot.com
- π¬ Discord: Join our community
- π Documentation: docs.cksfinbot.com
- π Issues: GitHub Issues =======
86d1d1d879489e68e675b3de0c1490d596abdd77
Made with β€οΈ by Team CKsDev
β Star this repo | π Report Bug | π‘ Request Feature
<<<<<<< HEAD