A checklist application for analyzing public tender documents using AI. This application allows users to upload tender documents, define custom questions and conditions, and automatically extract answers and evaluate conditions using advanced language models.
- Document Upload: Upload PDF tender documents to the system
- Question Management: Create and manage custom questions and true/false conditions
- AI Processing: Automatically extract answers and evaluate conditions using Claude AI
- File Selection: Select specific documents for processing
- Real-time Results: View question answers and condition evaluations in a user-friendly interface
demo.mp4
- FastAPI: Modern Python web framework for building APIs
- Anthropic Claude: Advanced AI model for document analysis
- SQLite: Lightweight database for storing files and questions
- Python: Core backend language
- Next.js 14: React framework with App Router
- TypeScript: Type-safe JavaScript
- Tailwind CSS: Utility-first CSS framework
- Lucide React: Icon library
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Frontend │ │ Backend │ │ Anthropic API │
│ (Next.js) │◄──►│ (FastAPI) │◄──►│ (Claude AI) │
│ │ │ │ │ │
│ - File Upload │ │ - File Storage │ │ - Doc Analysis │
│ - Question Mgmt │ │ - API Endpoints │ │ - Q&A │
│ - Results UI │ │ - Database │ │ - Evaluation │
└─────────────────┘ └─────────────────┘ └─────────────────┘
- Python 3.8+
- pipenv (for Python dependency management)
- Node.js 18+
- npm or yarn
The fastest way to get started is using the included Makefile:
# Clone and navigate to the project
git clone <your-repository-url>
cd ai_doc_processor
# Full setup (install dependencies + run migrations)
make setup
# Start both services
make dev
This will install all dependencies, run database migrations, and start both the backend (http://localhost:8000) and frontend (http://localhost:3000) automatically.
For more options, run make help
to see all available commands.
This project uses Alembic for database migrations. Common database commands:
# Run pending migrations
make migrate
# Create a new migration
make migration MESSAGE="add user table"
# Auto-generate migration from model changes
make migration-auto MESSAGE="update user model"
# Show current migration version
make db-current
# Show migration history
make db-history
# Downgrade by one revision
make db-downgrade
git clone <your-repository-url>
cd ai_doc_processor
# Navigate to backend directory
cd backend
# Install Python dependencies with pipenv
pipenv install
# Run database migrations
pipenv run alembic upgrade head
# Start the backend server
pipenv run python main.py
The backend server will start on http://localhost:8000
# Navigate to frontend directory (from project root)
cd frontend
# Install Node.js dependencies
npm install
# Start the development server
npm run dev
The frontend will be available at http://localhost:3000
Use the included Makefile for easier project management:
# Install all dependencies
make install
# Start both services concurrently
make dev
# Or start services individually:
make backend # Start backend only
make frontend # Start frontend only
# Stop all services
make stop
# See all available commands
make help
Make the scripts executable:
chmod +x start_backend.sh
chmod +x start_frontend.sh
Then run:
# Terminal 1 - Backend
./start_backend.sh
# Terminal 2 - Frontend
./start_frontend.sh
- Click on the upload area in the "Document Upload" section
- Select PDF files (supports German tender documents)
- Files are automatically uploaded to Anthropic's file storage
- Select "Question" tab
- Enter your question (e.g., "In welcher Form sind die Angebote einzureichen?")
- Click "Add" to save
- Select "Condition" tab
- Enter a true/false condition (e.g., "Ist die Abgabefrist vor dem 31.12.2025?")
- Click "Add" to save
- Select the files you want to analyze by clicking "Select" on each file
- Ensure you have added questions and/or conditions
- Click "Process Checklist" to start AI analysis
- Results will appear below showing answers and evaluations
The application comes pre-loaded with these German examples:
- "In welcher Form sind die Angebote/Teilnahmeanträge einzureichen?" (In what form should offers/applications be submitted?)
- "Wann ist die Frist für die Einreichung von Bieterfragen?" (When is the deadline for submitting bidder questions?)
- "Ist die Abgabefrist vor dem 31.12.2025?" (Is the application deadline before 31.12.2025?)
POST /upload
- Upload a PDF fileGET /files
- Get list of uploaded files
POST /questions
- Create a new question/conditionGET /questions
- Get all questions/conditionsDELETE /questions/{id}
- Delete a question/condition
POST /chat
- Chat with Claude using selected filesPOST /checklist
- Process questions and conditions against documents
ai_doc_processor/
├── backend/
│ ├── main.py # FastAPI application
│ ├── requirements.txt # Python dependencies
│ ├── .env # Environment variables
│ └── documents.db # SQLite database (created on first run)
├── frontend/
│ ├── app/
│ │ ├── layout.tsx # Root layout
│ │ └── page.tsx # Main page
│ ├── components/
│ │ ├── FileUpload.tsx # File upload component
│ │ ├── QuestionManager.tsx # Question management
│ │ └── ChecklistProcessor.tsx # Processing & results
│ ├── types/
│ │ └── index.ts # TypeScript type definitions
│ ├── styles/
│ │ └── globals.css # Global styles
│ ├── package.json # Node.js dependencies
│ └── next.config.js # Next.js configuration
├── Tender documents/ # Sample German tender documents
│ ├── Bewerbungsbedingungen.pdf
│ ├── Fragebogen zur Eignungspruefung.pdf
│ └── KAT5.pdf
├── start_backend.sh # Backend startup script
├── start_frontend.sh # Frontend startup script
└── README.md # This file
The application includes three German tender documents for testing:
- Bewerbungsbedingungen.pdf - Application conditions
- Fragebogen zur Eignungspruefung.pdf - Eligibility questionnaire
- KAT5.pdf - Category 5 specifications
- Upload all three PDF files
- Select all uploaded files
- Use the pre-loaded German questions and conditions
- Click "Process Checklist"
- Review the extracted answers and condition evaluations
The backend requires the following environment variable (already configured):
ANTHROPIC_API_KEY=your_anthropic_api_key_here
- Ensure Python 3.8+ is installed
- Install dependencies:
pip install -r requirements.txt
- Check if port 8000 is available
- Verify the Anthropic API key is valid
- Ensure Node.js 18+ is installed
- Clear npm cache:
npm cache clean --force
- Delete node_modules and reinstall:
rm -rf node_modules && npm install
- Check if port 3000 is available
- Ensure the backend is running on port 8000
- Frontend must be on port 3000 for CORS configuration
# Build and start production services
make build
make prod-backend # Terminal 1
make prod-frontend # Terminal 2
# Install production dependencies with pipenv
pipenv install
# Run with gunicorn
pipenv run gunicorn main:app --host 0.0.0.0 --port 8000
# Build for production
npm run build
# Start production server
npm start
With more time, these features could be added:
- Authentication & User Management
- Advanced File Processing (Word docs, Excel files)
- Batch Processing of multiple document sets
- Export Results to PDF/Excel
- Template Management for common question sets
- Advanced Search within documents
- Multi-language Support
- Real-time Collaboration
- API Rate Limiting & Caching
- Comprehensive Testing Suite
This project is for evaluation purposes as part of the Forgent AI technical assessment.
For questions or issues, please contact the engineering team at Forgent AI.