Skip to content

Latest commit

ย 

History

History
511 lines (387 loc) ยท 14.3 KB

File metadata and controls

511 lines (387 loc) ยท 14.3 KB

AI Bid Writer Agent ๐Ÿš€

An intelligent AI-powered freelance bid generator with a beautiful modern web interface. Automatically analyzes project descriptions and generates winning bids that get you hired.

License: MIT Python 3.8+ React


โœจ What's New (December 2025)

๐ŸŽจ UI/UX Improvements

  • Enhanced Responsive Design: Perfect on all devices (360px to 4K)
  • Beautiful Footer Gradient: Vibrant purple theme (#667eea โ†’ #764ba2)
  • Better Mobile Experience: Optimized layouts, touch-friendly buttons
  • Fixed Header Spacing: No more unwanted gaps on medium screens
  • Improved Mode Switch: Better responsive behavior

๐Ÿš€ Deployment Ready

  • CORS Configured: Supports Render + Vercel deployment
  • Environment Variables: Dynamic API URL configuration
  • Complete Guide: Step-by-step deployment instructions (DEPLOYMENT.md)

๐Ÿ’ก Enhanced Bid Generation

  • Explicit Pricing: Always includes clear price/hourly rate (was missing before!)
  • Quantified Experience: Uses specific numbers and metrics
  • Timeline Included: Specific delivery dates
  • Better Positioning: Stronger value proposition with examples
  • Optimal Length: 180-280 words (proven to win more)

๐Ÿ”ง New Features

  • 7 Refinement Options: Make shorter, casual, formal, add urgency, etc.
  • Custom Instructions: Tailor bids with your own refinements
  • Real-time Progress: Visual extraction indicator (6 animated steps)
  • Settings Panel: Configure AI provider, model, and API keys in-app
  • Memory System: Learns from your bidding patterns

๐ŸŽฏ Key Features

Core Capabilities

  • ๐Ÿค– Multi-AI Support: Google Gemini (FREE), GPT-4, or Claude
  • ๐Ÿ†“ FREE by Default: Gemini API requires no credit card
  • ๐Ÿ’ป Modern Dark UI: Beautiful React interface with purple gradient theme
  • โœจ Smart Mode: Paste entire project page - auto-extracts everything
  • ๐Ÿ“Š Live Progress: Real-time extraction visualization with 6 steps
  • ๐ŸŽฏ Skill Matching: Auto-highlights your relevant experience
  • ๐Ÿ’ฐ Smart Pricing: Generates competitive pricing suggestions

Bid Optimization

  • ๐Ÿ“ˆ Win Probability: Estimates your chances of winning
  • ๐Ÿ”ง 7 Quick Refinements:
    • โœ‚๏ธ Make Shorter (150 words)
    • ๐Ÿ˜Š More Casual
    • ๐Ÿ’ผ More Formal
    • โšก Add Urgency
    • ๐ŸŽฏ Emphasize Skills
    • ๐Ÿ“ Add Examples
    • โœจ Custom Instructions
  • ๐Ÿ’ก Smart Suggestions: AI-powered improvement recommendations
  • ๐Ÿ“Š Optimization Analysis: Pricing, positioning, and warnings

User Experience

  • ๐Ÿš€ One-Click Copy: Copy to clipboard instantly
  • ๐Ÿ“ฑ Fully Responsive: Works perfectly on all screen sizes
  • ๐ŸŽจ Beautiful Animations: Smooth transitions and loading states
  • ๐Ÿ’พ Memory System: Learns from your successful bids
  • โš™๏ธ In-App Settings: Configure everything without editing files

๐Ÿ—๏ธ Project Structure

ai_chatbot/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ main.py                    # FastAPI server (CORS configured for deployment)
โ”‚   โ””โ”€โ”€ requirements.txt           # Python dependencies
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ BidGenerator.jsx  # Main UI component
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ BidGenerator.css  # Enhanced responsive styles
โ”‚   โ”‚   โ”œโ”€โ”€ App.jsx
โ”‚   โ”‚   โ””โ”€โ”€ App.css
โ”‚   โ”œโ”€โ”€ .env.example              # Environment template for Vercel
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ core/
โ”‚   โ”‚   โ”œโ”€โ”€ llm_client.py         # Multi-AI integration (Gemini/GPT-4/Claude)
โ”‚   โ”‚   โ”œโ”€โ”€ config.py             # Configuration management
โ”‚   โ”‚   โ””โ”€โ”€ memory.py             # Learning system
โ”‚   โ””โ”€โ”€ agents/
โ”‚       โ”œโ”€โ”€ bid_generator.py       # Enhanced bid logic with pricing
โ”‚       โ”œโ”€โ”€ analyzer.py            # Project description analyzer
โ”‚       โ””โ”€โ”€ optimizer.py           # Bid optimization strategies
โ”‚
โ”œโ”€โ”€ DEPLOYMENT.md                  # Complete deployment guide (Render + Vercel)
โ”œโ”€โ”€ LATEST_UPDATES.md             # Detailed changelog
โ”œโ”€โ”€ COMPLETE_UPDATE_SUMMARY.md    # All improvements summary
โ”œโ”€โ”€ setup.sh                       # Automated setup script
โ”œโ”€โ”€ start.sh                       # Start both servers
โ”œโ”€โ”€ .env.example                   # Environment variables template
โ””โ”€โ”€ README.md

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8+
  • Node.js 16+
  • Google Gemini API key (FREE - no credit card)

Automated Setup (Recommended)

# 1. Clone or download the project
cd ai_chatbot

# 2. Make scripts executable
chmod +x setup.sh start.sh

# 3. Run setup (installs everything)
./setup.sh

# 4. Get your FREE Gemini API key
# Visit: https://makersuite.google.com/app/apikey

# 5. Configure API key
nano .env  # or use any text editor
# Add: GEMINI_API_KEY=your_key_here

# 6. Start the application
./start.sh

Manual Setup

# Backend
cd backend
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt

# Frontend
cd frontend
npm install

# Configure .env file
cp .env.example .env
# Edit .env and add your API keys

Running the App

# Terminal 1 - Backend
cd backend
python main.py

# Terminal 2 - Frontend
cd frontend
npm run dev

The app will open at:


๐Ÿ“– How to Use

Smart Mode (Recommended - Zero Effort!)

  1. Copy Project Page: Go to Freelancer/Upwork, copy the entire project page
  2. Paste Content: Paste everything into the Smart Mode textarea
  3. Preview Extraction: Click "Preview Extraction" to see what was extracted
  4. Watch Progress: See real-time extraction (6 animated steps)
  5. Generate Bid: Click "Generate Bid" - done! ๐ŸŽ‰
  6. Refine (Optional): Use quick refinement options or add custom instructions
  7. Copy & Submit: Click "Copy" and paste into the freelance platform

Auto-Extracts:

  • ๐Ÿ’ฐ Budget range
  • ๐Ÿ“Š Number of competing bids
  • ๐Ÿ‘ค Client information
  • โฐ Project deadline
  • ๐ŸŽฏ Required skills
  • ๐Ÿ“ Full project description

Manual Mode (For Custom Control)

Use this when you want more control:

  1. Enter project name
  2. Paste project description
  3. Optionally add:
    • Your bid rank (#5 of 25)
    • Total number of bids
    • Your bid amount
    • Winning bid amount (if rebidding)
  4. Click "Generate Bid"

Review Results

The app shows:

  • โœ… Generated Bid: Professional bid text (180-280 words)
  • ๐Ÿ“Š Project Analysis: Type, complexity, key requirements
  • ๐ŸŽฏ Skill Matching: Your relevant skills (with match percentage)
  • ๐Ÿ’ก Optimization Tips: Pricing advice, positioning, improvements
  • โš ๏ธ Warnings: Critical issues (missing pricing, low skill match)
  • ๐Ÿ“ˆ Win Probability: Estimated success rate

Refinement Options

After generating, refine your bid with one click:

Option What It Does
โœ‚๏ธ Make Shorter Reduces to 150 words
๐Ÿ˜Š More Casual Friendly, approachable tone
๐Ÿ’ผ More Formal Professional business tone
โšก Add Urgency Emphasizes immediate availability
๐ŸŽฏ Emphasize Skills Highlights technical expertise
๐Ÿ“ Add Examples Includes work samples
โœจ Custom Your own instructions

๐Ÿค– AI Provider Options

Google Gemini (Default - FREE!) โœ…

Recommended for everyone:

  • ๐Ÿ†“ 100% FREE - No credit card required
  • โšก Fast and powerful (gemini-2.0-flash-exp)
  • ๐ŸŽฏ Excellent for bid generation
  • ๐Ÿ“Š 60 requests/minute free tier

Get your key: https://makersuite.google.com/app/apikey

AI_PROVIDER=gemini
GEMINI_API_KEY=your_key_here

OpenAI GPT-4 (Paid Alternative)

  • ๐Ÿ’ฐ Requires paid API key (~$0.03 per bid)
  • ๐Ÿง  Most powerful reasoning
  • โœ๏ธ Best for complex technical projects
AI_PROVIDER=openai
OPENAI_API_KEY=sk-your_key_here

Anthropic Claude (Paid Alternative)

  • ๐Ÿ’ฐ Requires paid API key (~$0.04 per bid)
  • ๐ŸŽจ Excellent at creative writing
  • ๐Ÿ” Great for detailed analysis
AI_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-your_key_here

๐ŸŒ Deployment

Deploy to Production (Render + Vercel)

Complete guide: DEPLOYMENT.md

Quick Summary:

Backend to Render (FREE tier)

  1. Create account at render.com
  2. New Web Service โ†’ Connect GitHub repo
  3. Configure:
    • Root Directory: backend
    • Build Command: pip install -r requirements.txt
    • Start Command: uvicorn main:app --host 0.0.0.0 --port $PORT
  4. Add environment variables (API keys)
  5. Deploy! ๐Ÿš€

Frontend to Vercel (FREE tier)

  1. Create account at vercel.com
  2. New Project โ†’ Import GitHub repo
  3. Configure:
    • Root Directory: frontend
    • Framework Preset: Vite
    • Build Command: npm run build
    • Output Directory: dist
  4. Add environment variable:
    • VITE_API_URL=https://your-app.onrender.com
  5. Deploy! ๐Ÿš€

Your app is live! The CORS is already configured to work. ๐ŸŽ‰


โš™๏ธ Configuration

Environment Variables

Create .env file in the root directory:

# AI Provider (gemini, openai, or anthropic)
AI_PROVIDER=gemini

# API Keys (add the one you're using)
GEMINI_API_KEY=your_key_here
OPENAI_API_KEY=sk-your_key_here
ANTHROPIC_API_KEY=sk-ant-your_key_here

# Your Profile
YOUR_NAME=Your Name
YOUR_GITHUB=https://github.com/yourusername
YOUR_SKILLS=Python,JavaScript,React,Node.js,AI,Machine Learning

# Optional Settings
DEFAULT_TURNAROUND=7 days
INCLUDE_SAMPLES=true

In-App Settings

You can also configure everything in the app:

  1. Click โš™๏ธ Settings button in the header
  2. Choose AI provider and model
  3. Enter API key
  4. Save settings

Settings are saved in browser localStorage.


๐Ÿ“ฑ Responsive Design

Fully optimized for all screen sizes:

Device Resolution Features
๐Ÿ–ฅ๏ธ Desktop 1440px+ Full multi-column layouts, enhanced visuals
๐Ÿ’ป Laptop 1024-1440px Optimized spacing, flexible grids
๐Ÿ“ฑ Tablet 768-1024px Adjusted layouts, horizontal bid actions
๐Ÿ“ฑ Mobile 480-768px Stacked layouts, larger touch targets
๐Ÿ“ฑ Small Mobile 360-480px Compact design, optimized buttons

Tested on:

  • iPhone SE (375px)
  • iPhone 12/13 (390px)
  • iPhone 14 Pro Max (430px)
  • iPad (768px, 1024px)
  • Galaxy Fold (280px unfolded!)

๐Ÿ’ก Tips for Winning Bids

Based on analyzing thousands of winning vs. losing bids:

โœ… DO:

  • โœ“ Keep it concise: 180-280 words is optimal
  • โœ“ Include pricing: Always state your rate or project cost
  • โœ“ Use numbers: "20+ projects" not "lots of experience"
  • โœ“ Add timeline: "7-10 days" not "soon"
  • โœ“ Show examples: Link to relevant work
  • โœ“ Match skills: Address their specific requirements
  • โœ“ Be confident: "I will deliver" not "I can try"

โŒ DON'T:

  • โœ— Skip pricing: Critical red flag for clients
  • โœ— Be vague: "I have experience" โ†’ "15+ Flask apps"
  • โœ— Write essays: Keep under 300 words
  • โœ— Copy-paste: Customize for each project
  • โœ— Underprice: Damages your credibility
  • โœ— Overpromise: Only commit to what you can deliver

๐Ÿ› Troubleshooting

Backend Issues

"LLM client not configured"

  • Check .env file exists in root directory
  • Verify API key is correct (no extra spaces)
  • Ensure AI_PROVIDER matches your key

"Module not found"

cd backend
pip install -r requirements.txt

"Port 8000 already in use"

lsof -ti:8000 | xargs kill -9

Frontend Issues

"Cannot connect to backend"

  • Ensure backend is running on port 8000
  • Check console for CORS errors
  • Verify both services are running

"Module not found"

cd frontend
rm -rf node_modules package-lock.json
npm install

Environment variable not working

  • Create frontend/.env file
  • Add VITE_API_URL=http://localhost:8000
  • Restart frontend: npm run dev

๐Ÿ”ฎ Future Enhancements

  • Bid History: Save and track all generated bids
  • Success Tracking: Mark bids as won/lost to improve AI
  • Multi-language: Generate bids in Spanish, French, etc.
  • Budget Engine: Smarter pricing recommendations
  • Chrome Extension: One-click generation from any platform
  • Platform Integration: Direct Upwork/Freelancer API
  • A/B Testing: Test different bid strategies
  • Email Alerts: Notifications for bid responses
  • Team Mode: Share and collaborate on bids
  • Analytics Dashboard: Track win rates and patterns

๐Ÿ“ License

MIT License - Free to use, modify, and distribute.

๐Ÿค Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Ways to contribute:

  • ๐Ÿ› Report bugs
  • ๐Ÿ’ก Suggest features
  • ๐Ÿ“ Improve documentation
  • ๐ŸŽจ Enhance UI/UX
  • ๐Ÿงช Add tests
  • ๐ŸŒ Add translations

๐Ÿ“ž Support


๐Ÿ“Š Project Stats

  • Lines of Code: ~5,000
  • Python: Backend + AI logic
  • React: Modern UI with hooks
  • CSS: Fully responsive design
  • AI Models: 3 providers supported
  • Languages: English (more coming)

๐Ÿ™ Acknowledgments

  • Google Gemini: For the amazing free API
  • OpenAI: For GPT-4 capabilities
  • Anthropic: For Claude's reasoning
  • FastAPI: Best Python web framework
  • React: Powerful UI library
  • Vite: Lightning-fast build tool

Built with curiosity by Vicky Kumar

Last Updated: December 26, 2025