Agentic Pdf App
Automatically fills California court PDF forms by extracting and mapping data from donor documents through AI analysis. Features a minimalist interface and a modular microservices architecture for easy deployment using Docker.
Author

mawazawa
No License
Quick Info
Tools 1
Last Updated 14/9/2025
Actions
Tags
microservices documents document documents ai document processing pdf app
Agentic PDF Form Filler
A visually stunning, minimalist system for automatically filling California court PDF forms using information extracted from donor documents.
Features
- Intelligent Document Extraction: Uses Perplexity Sonar API or OpenAI API to extract data from various document types
- Smart Field Mapping: Automatically maps extracted data to form fields
- Beautiful UI: Clean, minimalist interface for easy form processing
- Docker-Based: Simple deployment with Docker for both development and production
- Modular Design: Microservices architecture for maintainability and scalability
Quick Start
Prerequisites
- Docker and Docker Compose installed
- API keys for Perplexity and/or OpenAI
Setup
- Clone the repository:
git clone https://github.com/yourusername/agentic-pdf.git
cd agentic-pdf
- Create an
.env
file in the root directory:
PERPLEXITY_API_KEY=your_perplexity_api_key
OPENAI_API_KEY=your_openai_api_key
- Start the application in development mode:
docker-compose up --build
The services will be available at:
- UI: http://localhost:8080
- Orchestration Service API: http://localhost:3002
- Other microservices: ports 3000-3005
Usage
- Open http://localhost:8080 in your browser
- Enter the URL of the California court form to fill (or use the default)
- Upload supporting documents (ID cards, previous forms, etc.)
- Wait for the system to process and fill the form
- Download the completed form
Architecture
This project follows a modern microservices architecture:
- UI Layer (Next.js): Provides a clean, responsive interface
- MCP Servers (Node.js/TypeScript): Implements Model Context Protocol servers for various services:
- Puppeteer Server: Downloads PDFs from URLs
- AI Analysis Server: Extracts form fields using AI vision
- Document Extraction Server: Analyzes donor documents
- Field Mapping Service: Maps donor data to form fields
- Form Filling Server: Fills the PDF with mapped data
- Orchestration Layer: Coordinates the workflow between services
Development
Project Structure
agentic-pdf/
├── docker-compose.yml # Main docker-compose configuration
├── docker-compose.override.yml # Development overrides
├── docker-compose.prod.yml # Production configuration
├── nginx.conf # Nginx config for production
├── src/
│ └── mcp-servers/ # Backend services (TypeScript)
│ ├── src/
│ │ ├── config/ # Configuration
│ │ ├── orchestration/ # Workflow orchestrators
│ │ ├── servers/ # MCP server implementations
│ │ └── services/ # Service implementations
│ └── Dockerfile # Multi-stage Dockerfile
└── ui/ # Frontend (Next.js)
├── src/
│ ├── components/ # React components
│ ├── pages/ # Next.js pages
│ └── styles/ # CSS styles
└── Dockerfile # Multi-stage Dockerfile
Local Development
For local development with automatic reloading:
docker-compose up
Production Deployment
For a production deployment:
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
Design Principles
This project adheres to several key design principles:
- Minimalism: Clean interface and streamlined user experience
- Separation of Concerns: Each component has a single, well-defined responsibility
- Visual Harmony: Consistent use of typography, color, and space
- Progressive Disclosure: Complexity is revealed only when needed
- Error Prevention: Validation and clear user guidance
License
MIT