An intelligent PDF tutoring application that helps students understand documents through interactive AI-powered conversations. Built with Next.js 14, Prisma, OpenAI, and modern web technologies.
Vercel link: https://ai-tutor-1-fukhnuyaa-gaurishs-projects-ca8013fe.vercel.app/login
Note: For large pdfs with multiple high-res images, the upload process can be further improved with parallel workers on the backend processing different pages of the pdf in parallel and initiating the "image verbalization LLM requests".
- Complete Authentication System - Email/password signup and login with NextAuth
- PDF Upload & Management - Drag-and-drop upload with file validation
- Split-Screen Interface - PDF viewer with real-time chat panel
- AI-Powered Chat - OpenAI GPT-4 integration with PDF context
- Page Navigation - AI can navigate to specific pages
- Chat History - Persistent conversation storage
- Responsive Design - Modern UI with Tailwind CSS
- Voice Controls - UI ready for voice input/output implementation
- PDF annotation and highlighting system
- Advanced voice integration
- Vector search within PDFs
- Frontend: Next.js 14 (App Router), React, TypeScript, Tailwind CSS
- Backend: Next.js API Routes, Prisma ORM
- Database: PostgreSQL
- AI: OpenAI GPT-4, Vercel AI SDK
- Authentication: NextAuth.js
- File Handling: PDF.js, React Dropzone
- Deployment: Vercel-ready
- Node.js 18+
- PostgreSQL database
- OpenAI API key
- Gemini API key
git clone <repository-url>
cd ai-pdf-tutor
npm installcp env.example .env.localFill in your .env.local:
DATABASE_URL=postgresql://user:pass@localhost:5432/ai_pdf_tutor
OPENAI_API_KEY=sk-your-openai-key
NEXTAUTH_SECRET=your-secret-key
NEXTAUTH_URL=http://localhost:3000# Generate Prisma client
npx prisma generate
# Create and run migrations
npx prisma migrate dev --name init
# (Optional) Seed with test data
npm run db:seednpm run devVisit http://localhost:3000 🎉
- Push code to GitHub
- Connect repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy automatically
DATABASE_URL=your-production-postgres-url
OPENAI_API_KEY=your-production-openai-key
NEXTAUTH_SECRET=your-production-secret
NEXTAUTH_URL=https://your-domain.com