A modern web application that converts PDF documents into clean, semantic HTML. Built with Next.js 15 and powered by AI for intelligent content extraction and formatting.
- Dual Input Methods: Upload PDF files or provide URLs to publicly accessible PDFs
- AI-Powered Conversion: Uses advanced AI models to extract and structure content intelligently
- Background Processing: Leverages Trigger.dev for reliable, scalable PDF processing jobs
- Modern UI: Clean, responsive interface with dark/light theme support
- Real-time Updates: Live processing status and seamless user experience
- Multiple Output Formats: Generates screenshots, markdown, and clean HTML from PDFs
- Large File Support: Handles PDFs up to 32MB in size
- Frontend: Next.js 15, React 19, TypeScript, Tailwind CSS
- Background Jobs: Trigger.dev for reliable PDF processing
- File Storage: UploadThing for secure file uploads
- Database: Upstash Redis for caching and session management
- AI Integration: OpenAI and Mistral AI for content processing
- PDF Processing: pdf-to-img for screenshot generation
- Styling: Tailwind CSS with custom theming and animations
- Node.js 18+ or Bun
- Redis instance (Upstash recommended)
- Trigger.dev account
- UploadThing account
- OpenAI or Mistral AI API key
- Clone the repository:
git clone <repository-url>
cd pdf-to-html- Install dependencies:
bun install
# or
npm install- Set up environment variables:
cp .env.example .env.localFill in your environment variables:
UPSTASH_REDIS_REST_URL- Your Upstash Redis URLUPSTASH_REDIS_REST_TOKEN- Your Upstash Redis tokenTRIGGER_SECRET_KEY- Your Trigger.dev secret keyUPLOADTHING_SECRET- Your UploadThing secretUPLOADTHING_APP_ID- Your UploadThing app IDOPENAI_API_KEY- Your OpenAI API key (optional)MISTRAL_API_KEY- Your Mistral AI API key (optional)
- Run the development server:
bun dev
# or
npm run dev- Start the Trigger.dev development server (in a separate terminal):
bunx trigger.dev@latest devOpen http://localhost:3000 to view the application.
- Choose Input Method: Select either "PDF URL" or "Upload File"
- Provide PDF: Enter a public PDF URL or upload a file (max 32MB)
- Convert: Click "Convert PDF" to start the processing
- View Results: The app will process your PDF and display the converted HTML
src/
├── actions/ # Server actions
├── app/ # Next.js app router pages
├── components/ # React components
├── lib/ # Utility functions and configurations
├── prompts/ # AI prompts for content processing
└── trigger/ # Background job definitions
bun dev- Start development server with Turbopackbun build- Build for productionbun start- Start production serverbun lint- Run ESLintbun biome- Run Biome formatter and linter
This project uses:
- Biome for code formatting and linting
- TypeScript for type safety
- Tailwind CSS for styling
- ESLint for additional linting
The easiest way to deploy is using the Vercel Platform:
- Connect your repository to Vercel
- Configure environment variables
- Deploy automatically on every push
This is a standard Next.js application and can be deployed to any platform that supports Node.js applications.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js for the amazing React framework
- Trigger.dev for reliable background job processing
- UploadThing for seamless file uploads
- Tailwind CSS for utility-first styling