Skip to content

Ebz30/PDF-Summarizer-Web-App

Repository files navigation

My AI PDF Summarizer Web App

Minimal Next.js + Tailwind scaffold that extracts text from PDFs and uses an AI provider to produce a concise summary and key points.

Features

  • Single PDF upload (drag-and-drop or file picker)
  • Client-side validation (PDF only, < 10MB)
  • Server-side PDF text extraction using pdf-parse
  • Server-side AI call to OpenAI Chat Completions (configurable via env var)
  • 30s timeout for AI requests
  • Parses AI output into summary and keyPoints array
  • Copy-to-clipboard and download .txt of results

Local setup

  1. Install dependencies
npm install
  1. Create .env.local from the example and set your API key
cp .env.local.example .env.local
# Edit .env.local and replace the placeholder with your real key
  1. Run the dev server
npm run dev

Open http://localhost:3000

Notes

  • The API route pages/api/summarize.js decodes the uploaded PDF (base64), extracts text with pdf-parse, builds a prompt, sends it to the configured AI provider, and parses the response. Update the provider integration there if you prefer Claude or another API.
  • This scaffold does not persist uploaded PDFs or summaries.

Deployment

Push the repository to GitHub, connect the project to netlify, Vercel or any other web hosting service, and add GOOGLE_API_KEY, OPENAI_API_KEY your dashboard environment variables. It will run npm run build automatically.

TODOs / Next steps

  • Improve AI response parsing and edge-case handling
  • Add server-side rate limiting
  • Add visual polish and accessibility improvements
  • Add tests and CI

Security

  • Keep API keys out of source control. Do not commit .env.local.

License

This scaffold is provided as-is for educational purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors