Skip to content

tonypark4/HackHive2026

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ez Form - PDF Voice Form Filler 🎤

A voice-enabled application that helps users fill out PDF forms using natural language conversation with an AI assistant. No typing or reading required!

Features

  • 🎤 Voice Input: Speak your answers instead of typing
  • 🔊 Voice Output: AI responses are read aloud
  • 🤖 AI-Powered: Uses Google Gemini AI for natural conversation
  • 📄 PDF Form Filling: Automatically extracts and fills PDF form fields
  • Accessible: Designed for users who prefer voice interaction

Tech Stack

Backend

  • FastAPI (Python) - High-performance web framework
  • Google Gemini API - AI conversation engine
  • PyPDF2 - PDF processing and form field extraction

Frontend

  • React with TypeScript - Modern UI framework
  • Web Speech API - Browser-native speech recognition and synthesis
  • Vite - Fast build tool

Setup Instructions

Prerequisites

Before you begin, make sure you have:

Step-by-Step Setup Guide

Step 1: Clone the Repository

git clone https://github.com/yourusername/HackHive2026.git
cd HackHive2026

Step 2: Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Create a virtual environment (recommended):

    # On Windows
    python -m venv venv
    .\.venv\Scripts\Activate.ps1
    
    # On macOS/Linux
    python3 -m venv venv
    source venv/bin/activate.ps1
  3. Install Python dependencies:

    pip install -r requirements.txt
  4. Create a .env file in the backend directory:

    # Windows
    copy .env.example .env
    
    # macOS/Linux
    cp .env.example .env
  5. Add your Gemini API key to .env:

    GEMINI_API_KEY=your_actual_api_key_here
    
  6. Start the backend server: With uvicorn:

    uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

    ✅ Backend will run at http://localhost:8000

Step 3: Frontend Setup

  1. Open a new terminal and navigate to the frontend directory:

    cd frontend
  2. Install Node dependencies:

    npm install
  3. Start the development server:

    npm run dev

    ✅ Frontend will run at http://localhost:5173

Step 4: Access the Application

Open your browser and go to:

http://localhost:5173

🎉 You're ready to use the app!

Troubleshooting

Backend won't start:

  • Make sure Python 3.8+ is installed: python --version
  • Check that all dependencies are installed: pip install -r requirements.txt
  • Make sure port 8000 is not in use, or change it: uvicorn app.main:app --port 8001

Frontend won't start:

  • Make sure Node.js 16+ is installed: node --version
  • Delete node_modules and try again:
    rm -r node_modules
    npm install
    npm run dev

API Key errors:

  • Verify your .env file is in the backend folder
  • Make sure the API key is valid: GEMINI_API_KEY=your_key_here
  • The app works without a key but with limited AI responses

Speech recognition not working:

  • Use a modern browser (Chrome or Edge recommended)
  • Ensure your microphone is connected and permitted
  • Check browser console for errors (F12 → Console)

Usage

  1. Upload a PDF: Click "Choose PDF File" and select a PDF form
  2. Start Voice Input: Click the microphone button to start speaking
  3. Answer Questions: The AI will ask you questions about each form field
  4. Review Progress: See which fields have been filled
  5. Download: Once complete, download your filled PDF

API Endpoints

  • POST /api/upload-pdf - Upload and process a PDF
  • POST /api/chat - Send a message to the AI assistant
  • POST /api/update-field - Manually update a form field
  • POST /api/fill-pdf - Generate and download filled PDF
  • GET /api/session/{sessionId} - Get session status

Browser Compatibility

  • Speech Recognition: Works best in Chrome/Edge (uses WebKit Speech API)
  • Speech Synthesis: Supported in all modern browsers
  • PDF Upload: Supported in all modern browsers

Notes

  • PDF form field extraction works best with PDFs that have proper form fields (AcroForm)

License

Contributors

  • Raihan Carder
  • Tony Park
  • Suhi Kasim
  • Aarnav Shrivastava

About

Fill out tedious online forms by simply chatting with our ai chatbot!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors