MA
marcusmcb/ai-pdf-tutor
Demo AI app that summarizes PDF documents via text & voice
AI PDF Tutor
A modern web app for uploading, viewing, and chatting with your PDFs using AI. Built with Next.js (App Router), TypeScript, Prisma, NextAuth, and Tailwind CSS.
Features
- User Authentication: Secure sign-in/sign-out with NextAuth.
- PDF Upload & Management: Upload, list, and view your PDFs in a responsive dashboard.
- PDF Viewing: Native
<iframe>for fast, reliable PDF rendering (no PDF.js/react-pdf dependencies). - AI Chat Interface: Ask questions about your PDFs and get AI-powered answers (backend integration pending).
- Modern UI: Responsive, two-column dashboard with Tailwind CSS.
- Robust Backend: Prisma ORM with a singleton pattern for efficient DB access.
Quick Start
-
Install dependencies:
npm install
-
Set up environment variables:
- Copy
.env.exampleto.envand fill in your database and NextAuth secrets.
- Copy
-
Run database migrations:
npx prisma migrate dev
-
Start the development server:
npm run dev
-
Sign in and use the dashboard:
- Upload PDFs, view them, and chat (AI Q&A coming soon).
Project Structure
src/app/dashboard/— Main dashboard UI, PDF viewer, chat interfacesrc/app/api/— API routes for auth, PDF upload, listing, (AI chat coming soon)src/lib/prisma.ts— PrismaClient singletonprisma/schema.prisma— Database schemapublic/uploads/— Uploaded PDF files
Tech Stack
- Next.js (App Router)
- TypeScript
- Prisma ORM
- NextAuth (authentication)
- Tailwind CSS
Roadmap
- PDF upload, listing, and viewing
- User authentication
- Responsive dashboard UI
- Chat UI scaffold
- AI backend integration (PDF text extraction, OpenAI/LLM Q&A)
- Persist chat history per user/PDF
- Advanced PDF analysis tools
Contributing
PRs and issues welcome! Please open an issue to discuss major changes first.
License
MIT
On this page
Contributors
Created June 16, 2025
Updated July 2, 2025