Team Ai
Apppublic

bashaimmortal/Bidanalyzer_Pro

sourceHugging Faceapache-2.0updated 9mo agoView on Hugging Face
0likes
App README

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

  1. 1.Clone the repository
bash
git clone <your-repo-url>
cd "Bidanalyzer Pro"
  1. 1.Install Frontend Dependencies
bash
npm install
  1. 1.Install Backend Dependencies
bash
pip install -r requirements.txt
  1. 1.Configure Environment Variables
bash
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY
  1. 1.Run Development Servers

Backend (Terminal 1):

bash
python server.py
# Runs on http://localhost:8000

Frontend (Terminal 2):

bash
npm run dev
# Runs on http://localhost:5173

๐ŸŒ Deployment to Render

Option 1: Using Render Blueprint (Recommended)

  1. 1.Push to GitHub
bash
git init
git add .
git commit -m "Initial commit"
git remote add origin <your-github-repo-url>
git push -u origin main
  1. 1.Deploy on Render
  2. 2.Go to Render Dashboard
  3. 3.Click "New" โ†’ "Blueprint"
  4. 4.Connect your GitHub repository
  5. 5.Render will automatically detect render.yaml and create both services
  1. 1.Configure Environment Variables
  2. 2.Go to your backend service settings
  3. 3.Add environment variable: GEMINI_API_KEY=<your-key>
  1. 1.Update Frontend API URL
  2. 2.After backend deploys, copy its URL (e.g., https://bidanalyzer-api.onrender.com)
  3. 3.Update the API URL in src/App.jsx (search for localhost:8000)
  4. 4.Redeploy frontend

Option 2: Manual Deployment

Deploy Backend
  1. 1.Go to Render Dashboard โ†’ New โ†’ Web Service
  2. 2.Connect your repository
  3. 3.Configure:
  4. 4.Name: bidanalyzer-api
  5. 5.Runtime: Python
  6. 6.Build Command: pip install -r requirements.txt
  7. 7.Start Command: uvicorn server:app --host 0.0.0.0 --port $PORT
  8. 8.Add environment variable: GEMINI_API_KEY
  9. 9.Deploy
Deploy Frontend
  1. 1.Go to Render Dashboard โ†’ New โ†’ Static Site
  2. 2.Connect your repository
  3. 3.Configure:
  4. 4.Name: bidanalyzer-frontend
  5. 5.Build Command: npm install && npm run build
  6. 6.Publish Directory: dist
  7. 7.Deploy

๐Ÿ”‘ Environment Variables

Create a .env file in the root directory:

env
GEMINI_API_KEY=your_gemini_api_key_here

Get 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 document
  • โ€”POST /translate - Translate analysis results
  • โ€”POST /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