bashaimmortal/Bidanalyzer_Pro
0
Bidanalyzer Pro
AI-powered tool to analyze and summarize tender / bid documents.
BidAnalyzer Pro
A powerful document analysis tool that extracts and analyzes tender/bid documents using AI (Google Gemini) and generates professional PDF reports.
๐ Features
- AI-Powered Analysis: Uses Google Gemini 2.5 Flash for intelligent document extraction
- Multi-Language Support: Translate reports to multiple languages (Hindi, Telugu, Tamil, Spanish, French, etc.)
- PDF Generation: Creates professional, branded PDF reports with custom templates
- React Frontend: Modern, responsive UI built with React & Vite
- FastAPI Backend: High-performance Python backend with async support
๐ Tech Stack
Frontend
- React 19
- Vite
- Lucide React (icons)
- HTML2Canvas & jsPDF
Backend
- FastAPI
- Google Generative AI (Gemini)
- PDFPlumber (text extraction)
- ReportLab (PDF generation)
- Deep Translator
๐ง Local Development
Prerequisites
- Node.js 18+
- Python 3.11+
- Google Gemini API Key
Setup
- Clone the repository
git clone <your-repo-url>
cd "Bidanalyzer Pro"- Install Frontend Dependencies
npm install- Install Backend Dependencies
pip install -r requirements.txt- Configure Environment Variables
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY- Run Development Servers
Backend (Terminal 1):
python server.py
# Runs on http://localhost:8000Frontend (Terminal 2):
npm run dev
# Runs on http://localhost:5173๐ Deployment to Render
Option 1: Using Render Blueprint (Recommended)
- Push to GitHub
git init
git add .
git commit -m "Initial commit"
git remote add origin <your-github-repo-url>
git push -u origin main- Deploy on Render
- Go to Render Dashboard
- Click "New" โ "Blueprint"
- Connect your GitHub repository
- Render will automatically detect
render.yamland create both services
- Configure Environment Variables
- Go to your backend service settings
- Add environment variable:
GEMINI_API_KEY=<your-key>
- Update Frontend API URL
- After backend deploys, copy its URL (e.g.,
https://bidanalyzer-api.onrender.com) - Update the API URL in
src/App.jsx(search forlocalhost:8000) - Redeploy frontend
Option 2: Manual Deployment
Deploy Backend
- Go to Render Dashboard โ New โ Web Service
- Connect your repository
- Configure:
- Name: bidanalyzer-api
- Runtime: Python
- Build Command:
pip install -r requirements.txt - Start Command:
uvicorn server:app --host 0.0.0.0 --port $PORT - Add environment variable:
GEMINI_API_KEY - Deploy
Deploy Frontend
- Go to Render Dashboard โ New โ Static Site
- Connect your repository
- Configure:
- Name: bidanalyzer-frontend
- Build Command:
npm install && npm run build - Publish Directory:
dist - Deploy
๐ Environment Variables
Create a .env file in the root directory:
GEMINI_API_KEY=your_gemini_api_key_hereGet your API key from Google AI Studio
๐ Project Structure
Bidanalyzer Pro/
โโโ src/ # React frontend source
โ โโโ App.jsx # Main application component
โ โโโ main.jsx # React entry point
โ โโโ index.css # Global styles
โโโ public/ # Static assets
โโโ server.py # FastAPI backend
โโโ requirements.txt # Python dependencies
โโโ package.json # Node dependencies
โโโ render.yaml # Render deployment config
โโโ vite.config.js # Vite configuration
โโโ README.md # This file๐ฏ API Endpoints
POST /analyze- Analyze uploaded documentPOST /translate- Translate analysis resultsPOST /generate-pdf- Generate PDF report
๐ Troubleshooting
Common Issues
1. CORS Errors
- Ensure backend URL is correctly configured in frontend
- Check CORS settings in
server.py
2. PDF Generation Fails
- Ensure Chrome/Chromium is installed on the server
- For Render, this is included in the Python runtime
3. API Key Issues
- Verify GEMINIAPIKEY is set in Render environment variables
- Check API quota limits in Google AI Studio
๐ License
MIT License - feel free to use this project for your own purposes!
๐ค Contributing
Contributions, issues, and feature requests are welcome!
Made with โค๏ธ using React, FastAPI, and Google Gemini
