Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Halify.ai - AI-Powered Proposal & Business Intelligence Platform

Halify.ai is a full-stack web application that leverages AI (OpenAI GPT) and web scraping technologies to help freelancers and professionals generate intelligent proposals, verify contacts, find domain information, and scrape business data. It combines a modern React frontend with a robust FastAPI backend to provide a comprehensive toolkit for business development.

🎯 Project Overview

Halify.ai is designed to streamline and automate the proposal creation process for freelancers and consultants. The platform integrates multiple AI-powered tools and services to help users:

  • Generate Professional Proposals - AI-driven proposal generation based on job requirements and GitHub portfolio
  • Scrape Business Data - Extract business information from Google Maps
  • Verify Email Addresses - Bulk email verification for lead generation
  • Find Company Domains - AI-powered company domain discovery
  • Manage History - Store and retrieve past proposals and searches
  • User Authentication - Secure account management with session tokens

✨ Key Features

1. AI-Powered Proposal Generation πŸ“

  • Generates professional, customized proposals using OpenAI GPT models
  • Analyzes job requirements and GitHub profile
  • Automatically selects 2 most relevant GitHub repositories based on job description
  • Provides multiple proposal templates (3 different designs)
  • Real-time preview of generated proposals
  • Download proposals as PDF
  • Support for different OpenAI models (gpt-4o-mini, gpt-4, etc.)

2. Google Maps Business Scraper πŸ—ΊοΈ

  • Search and scrape business data from Google Maps
  • Extract business information: name, rating, reviews, address, phone, website, email
  • Social media links: Facebook, Instagram, TikTok, Twitter, YouTube
  • Streaming progress updates for large scraping operations
  • Customizable result limits (up to configured maximum)
  • Bulk data export capabilities

3. Email Verification βœ‰οΈ

  • Single email verification
  • Bulk email verification (up to 200 emails)
  • Verify email deliverability and validity
  • Real-time verification feedback
  • Perfect for lead validation and list cleaning

4. Domain Finder 🌐

  • AI-powered company domain discovery
  • Single domain lookup
  • Bulk domain lookup (up to 30 companies)
  • Uses OpenAI to intelligently find official company domains
  • Helps with lead research and outreach preparation

5. User Authentication & Account Management πŸ”

  • Secure user registration and login
  • Session-based authentication with Bearer tokens
  • OpenAI API key management (stored securely)
  • User preferences (selected AI model)
  • User dashboard with account information

6. History & Preferences πŸ’Ύ

  • Save and manage proposal history
  • Track scraping operations
  • Store user preferences
  • Quick retrieval of past work

πŸ—οΈ Architecture

Tech Stack

Frontend:

  • Framework: React 19 with TypeScript
  • Build Tool: Vite
  • Styling: Tailwind CSS 4
  • UI Components: Lucide React (icons), Framer Motion (animations)
  • HTTP Client: Axios
  • State Management: React Context API
  • Data Export: XLSX (Excel export)

Backend:

  • Framework: FastAPI (Python)
  • Server: Uvicorn
  • Database: SQLite (with custom schema for users, sessions, history, preferences)
  • AI Integration: OpenAI Python SDK
  • Web Scraping: Custom Google Maps scraper
  • Email Verification: SMTP/Email validation service
  • PDF Generation: Custom PDF rendering
  • CORS: Enabled for frontend-backend communication

πŸ“ Project Structure

Upwork-Proposal/
β”œβ”€β”€ frontend/                    # React Frontend Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ pages/              # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ProposalPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ MapScraperPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ EmailVerifyPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DomainFinderPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ HistoryPage.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ LoginPage.tsx
β”‚   β”‚   β”‚   └── SignupPage.tsx
β”‚   β”‚   β”œβ”€β”€ components/          # Reusable React components
β”‚   β”‚   β”‚   └── Sidebar.tsx      # Main navigation sidebar
β”‚   β”‚   β”œβ”€β”€ context/             # React Context providers
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthContext.tsx
β”‚   β”‚   β”‚   └── ScraperContext.tsx
β”‚   β”‚   β”œβ”€β”€ App.tsx              # Main App component
β”‚   β”‚   └── main.tsx             # Application entry point
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.ts
β”‚
β”œβ”€β”€ backend/                     # FastAPI Backend Application
β”‚   β”œβ”€β”€ main.py                  # FastAPI app and route definitions
β”‚   β”œβ”€β”€ auth.py                  # Authentication and database logic
β”‚   β”œβ”€β”€ halify.db                # SQLite database
β”‚   β”œβ”€β”€ .env                     # Environment variables
β”‚   β”‚
β”‚   β”œβ”€β”€ proposal/                # Proposal generation module
β”‚   β”‚   β”œβ”€β”€ agent.py            # GitHub repository fetcher
β”‚   β”‚   β”œβ”€β”€ prompts.py          # AI prompts and system messages
β”‚   β”‚   └── templates.py        # HTML/PDF templates for proposals
β”‚   β”‚
β”‚   β”œβ”€β”€ maps/                    # Google Maps scraping module
β”‚   β”‚   └── scraper.py          # Maps scraping logic
β”‚   β”‚
β”‚   β”œβ”€β”€ emailverify/             # Email verification module
β”‚   β”‚   └── verifier.py         # Email verification logic
β”‚   β”‚
β”‚   β”œβ”€β”€ domainfinder/            # Domain finder module
β”‚   β”‚   └── finder.py           # AI-powered domain lookup
β”‚   β”‚
β”‚   └── templates/               # HTML templates and static files
β”‚       β”œβ”€β”€ index.html
β”‚       └── static/
β”‚
β”œβ”€β”€ package.json                 # Root npm configuration (for concurrently)
└── README.md                    # Project documentation

πŸš€ Getting Started

Prerequisites

  • Node.js (v16 or higher) - for frontend
  • Python (v3.8 or higher) - for backend
  • npm or yarn - package manager
  • OpenAI API Key - for AI-powered features
  • Git - for version control

Installation

1. Clone the Repository

git clone https://github.com/alihassanml/Upwork-Proposal.git
cd Upwork-Proposal

2. Install Root Dependencies

npm install

This installs concurrently which allows running both frontend and backend with a single command.

3. Frontend Setup

cd frontend
npm install
cd ..

4. Backend Setup

cd backend
pip install -r requirements.txt  # Create requirements.txt if not present
# Or install dependencies manually:
pip install fastapi uvicorn openai python-dotenv pydantic jinja2 aiosqlite openpyxl
cd ..

5. Environment Configuration

Create a .env file in the backend directory:

OPENAI_API_KEY=your_openai_api_key_here
DATABASE_URL=sqlite:///halify.db
JWT_SECRET=your_secret_key_here

Running the Application

Option 1: Run Both Projects Together (Recommended)

npm run dev

This starts:

Option 2: Run Frontend Only

npm run frontend

Option 3: Run Backend Only

npm run backend

Option 4: Manual Startup

# Terminal 1 - Frontend
cd frontend && npm run dev

# Terminal 2 - Backend
cd backend && python main.py

πŸ”Œ API Endpoints

Authentication

  • POST /register - Register new user
  • POST /login - Login user
  • POST /logout - Logout user
  • GET /me - Get current user info
  • POST /update-api-key - Update OpenAI API key

Proposal Generation

  • POST /generate - Generate AI proposal
  • GET /preview/{template} - Preview proposal template
  • POST /render-preview - Render proposal preview
  • POST /download-pdf - Download proposal as PDF

Google Maps Scraping

  • GET /scrape-maps/stream - Stream scraping with progress
  • POST /scrape-maps - Scrape and return all results

Email Verification

  • GET /email/verify?email=... - Verify single email
  • POST /email/verify/bulk - Verify multiple emails

Domain Finder

  • POST /find-domain - Find domain for single company
  • POST /find-domain/bulk - Find domains for multiple companies

User Data

  • GET /history - Get user's history
  • POST /history - Save history entry
  • DELETE /history/{id} - Delete history entry
  • GET /preferences - Get user preferences
  • POST /preferences - Save user preferences

πŸ” Authentication

The application uses Bearer Token Authentication:

  1. User registers or logs in
  2. Server returns a JWT-like session token
  3. Token is stored in localStorage (frontend)
  4. Token is sent in Authorization: Bearer <token> header for authenticated requests
  5. Backend validates token and retrieves user information

πŸ’Ύ Database Schema

Users Table

  • id - User ID (primary key)
  • name - User full name
  • email - User email (unique)
  • password_hash - Hashed password
  • openai_api_key - Encrypted OpenAI API key
  • created_at - Account creation timestamp

Sessions Table

  • id - Session ID
  • user_id - Foreign key to users
  • token - Session token
  • expires_at - Token expiration time

History Table

  • id - History entry ID
  • user_id - Foreign key to users
  • type - Type of entry (proposal, scrape, etc.)
  • title - Entry title
  • summary - Brief summary
  • data - Full data (JSON)
  • created_at - Creation timestamp

Preferences Table

  • id - Preference ID
  • user_id - Foreign key to users
  • model - Selected AI model (gpt-4o-mini, gpt-4, etc.)
  • other_settings - Additional preferences (JSON)

🎨 Frontend Features

Responsive Design

  • Mobile-friendly interface using Tailwind CSS
  • Sidebar navigation for easy access
  • Responsive grid layouts

State Management

  • AuthContext - User authentication state
  • ScraperContext - Scraping operation state
  • Real-time updates and progress tracking

User Experience

  • Loading indicators and spinners
  • Error handling and user feedback
  • Smooth animations with Framer Motion
  • Toast notifications for actions
  • Auto-saving of user preferences

πŸ”„ Workflow Examples

Proposal Generation Workflow

  1. User navigates to Proposal tab
  2. Enters job requirements, GitHub URL, timeline
  3. Selects proposal template
  4. Clicks "Generate" button
  5. Backend fetches relevant repos from GitHub
  6. AI generates proposal based on requirements and repos
  7. User sees real-time preview
  8. Can download as PDF or make adjustments
  9. History is saved automatically

Email Verification Workflow

  1. User navigates to Email Verify tab
  2. Enters single email or uploads list of emails
  3. Clicks "Verify" button
  4. Backend verifies each email address
  5. Results show delivery status
  6. Can export verified emails as CSV/Excel

Maps Scraping Workflow

  1. User navigates to Maps Scraper tab
  2. Enters search query (e.g., "restaurants in New York")
  3. Sets maximum results
  4. Clicks "Scrape" button
  5. Backend scrapes Google Maps with progress updates
  6. Results are displayed in real-time
  7. Can export data as Excel file

πŸ› οΈ Development

Building for Production

Frontend Build:

cd frontend && npm run build

Outputs optimized files to frontend/dist/

Backend Production:

cd backend && python main.py

Or deploy with Gunicorn:

gunicorn -w 4 -b 0.0.0.0:8000 main:app

Running Tests

cd frontend && npm run lint

Code Style

  • Frontend uses ESLint with TypeScript support
  • Backend follows PEP 8 Python conventions

πŸ”’ Security Considerations

  • OpenAI API keys are stored securely in the database
  • Passwords are hashed using bcrypt
  • Session tokens are used for authentication
  • CORS is enabled for frontend-backend communication
  • Input validation on both frontend and backend
  • Environment variables for sensitive data

πŸ“Š Features in Detail

Proposal Generation

  • AI Models: Support for multiple OpenAI models
  • Repository Analysis: Automatically analyzes GitHub repos
  • Multiple Templates: 3 different proposal design templates
  • PDF Export: Professional PDF download
  • Customizable: Users can edit generated content

Business Intelligence

  • Maps Scraping: Extract competitor and business data
  • Email Validation: Ensure lead list quality
  • Domain Discovery: Find company contact information
  • Bulk Operations: Process multiple items efficiently

πŸ› Troubleshooting

Issue: OpenAI API Key not working

Solution:

  • Verify API key is valid on OpenAI dashboard
  • Ensure API key has sufficient credits
  • Check .env file configuration

Issue: Database locked error

Solution:

  • Close other instances of the app
  • Delete old database connections
  • Restart the backend

Issue: CORS errors

Solution:

  • Verify frontend and backend are running
  • Check CORS middleware is configured in main.py
  • Ensure correct API URLs in frontend

πŸ“ License

This project is created for Upwork proposals and freelance work.


πŸ‘€ Author

Ali Hassan - AI/ML Developer & Freelancer


πŸš€ Future Enhancements

  • Support for additional AI models
  • Advanced filtering in Maps scraper
  • Team collaboration features
  • API rate limiting and usage analytics
  • Custom proposal templates upload
  • Email campaign integration
  • LinkedIn profile scraping
  • Advanced reporting dashboard

πŸ“§ Support & Contact

For issues, questions, or feature requests, please reach out through:

  • GitHub Issues
  • Email: [contact info]
  • Upwork Messages

Last Updated: May 2026 Version: 1.0.0

About

Halify.ai is a full-stack web application that leverages AI (OpenAI GPT) and web scraping technologies to help freelancers and professionals generate intelligent proposals, verify contacts, find domain information, and scrape business data.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages