
Summarist.ai
AI-powered application that transforms PDFs into clear, structured visual summaries using Google Gemini AI. Users can upload PDFs, get AI-generated summaries with emojis and markdown formatting, manage their summaries in a dashboard, and download them as markdown files.
Technology Stack
Key Challenges
- PDF Text Extraction
- AI Summary Generation
- Structured Summary Formatting
- File Upload Handling
- Payment Integration
- Subscription Management
Key Learnings
- Google Gemini AI Integration
- LangChain PDF Processing
- Stripe Payment Integration
- UploadThing File Management
- Clerk Authentication
- NeonDB Serverless Database
- Structured AI Prompting
Summarist.ai: AI-Powered PDF Summarization Platform
Overview
Summarist.ai is a modern AI-powered application that transforms PDF documents into clear, structured, and visually engaging summaries. Built with Next.js and powered by Google Gemini AI, the platform allows users to upload PDFs, receive AI-generated summaries with emoji-enhanced formatting, manage their summaries in a personalized dashboard, and export them as markdown files.
What Users Can Do
- Upload PDFs: Drag and drop or click to upload PDF documents (up to 20MB)
- AI Summarization: Get instant AI-generated summaries using Google Gemini 2.5 Flash model
- Interactive Viewer: Navigate through summaries with section-based viewer and progress tracking
- Dashboard Management: Access and manage all summaries in one place
- Download Summaries: Export summaries as markdown/text files for offline use
- Subscription Plans: Choose between Basic (5 summaries/month) or Pro (unlimited summaries)
- Progress Tracking: Visual progress bar showing reading progress through summary sections
Why I Built This
I built Summarist.ai to solve several key problems I faced while working with lengthy PDF documents:
- Time Consumption: Reading long PDFs takes too much time, especially for research papers and reports
- Information Overload: Extracting key insights from dense documents is challenging
- Lack of Structure: PDFs often lack clear structure for finding important information quickly
- No Quick Summaries: Existing tools don't provide engaging, well-formatted summaries with visual elements
- Export Limitations: Need to easily save and share summaries in a portable format
Tech Stack
Frontend
- Next.js 15: React framework with App Router
- TypeScript: Type safety
- Tailwind CSS 4: Utility-first styling
- Shadcn UI: Component library
- Framer Motion: Animation library
Backend & Services
- Google Gemini AI: AI model for summary generation (Gemini 2.5 Flash)
- LangChain: PDF text extraction and processing
- NeonDB: Serverless PostgreSQL database
- Clerk: Authentication and user management
- UploadThing: File upload service
- Stripe: Payment processing and subscription management
Key Features
AI-Powered Summarization
- Uses Google Gemini 2.5 Flash for fast, accurate summaries
- Structured prompt engineering for consistent output
- Emoji-enhanced summaries for better readability
- Markdown formatting with proper sections and hierarchy
PDF Processing Pipeline
- LangChain PDFLoader for text extraction
- Handles multi-page documents seamlessly
- Error handling for corrupted or unreadable PDFs
- File size validation (20MB limit)
Interactive Summary Viewer
- Section-based navigation with smooth transitions
- Progress bar showing reading completion
- Sticky section headers for context
- Responsive design for all screen sizes
- Beautiful gradient backgrounds and animations
Subscription Management
- Two-tier pricing: Basic ($7/month) and Pro ($15/month)
- Stripe integration for secure payments
- Automatic subscription status tracking
- Upload limit enforcement based on plan
- Seamless upgrade flow
Technical Implementation
Summary Generation Flow
- User uploads PDF via UploadThing
- Server action extracts text using LangChain PDFLoader
- Text is sent to Google Gemini AI with structured prompt
- AI generates formatted summary with emojis and markdown
- Summary saved to NeonDB with user association
- User redirected to summary viewer page
Database Schema
- pdf_summaries: Stores summaries with user_id, file_url, summary_text, title, file_name
- users: Manages user subscriptions with customer_id, price_id, status
- payments: Tracks payment transactions
Technical Challenges & Solutions
Challenge 1: PDF Text Extraction
- Problem: Handling various PDF formats and structures
- Solution: Implemented robust PDF parsing using LangChain PDFLoader with error handling for corrupted files
Challenge 2: AI Prompt Engineering
- Problem: Getting consistent, well-formatted summaries
- Solution: Created structured prompts with explicit formatting rules, emoji guidelines, and section hierarchy requirements
Challenge 3: File Upload Handling
- Problem: Secure and scalable file storage
- Solution: Integrated UploadThing for secure uploads with file size validation and cloud storage
Challenge 4: Payment Integration
- Problem: Managing subscription lifecycle and payments
- Solution: Set up Stripe webhooks for subscription management, payment tracking, and automatic status updates
Challenge 5: Summary Formatting
- Problem: Parsing and displaying markdown with sections
- Solution: Implemented section parser that splits summaries into navigable sections with progress tracking
Challenge 6: Subscription Limits
- Problem: Enforcing upload limits based on user plans
- Solution: Implemented database-level tracking with real-time limit checks and upgrade prompts
After Launch & Impact
- Built a complete full-stack AI application from scratch
- Integrated multiple third-party services (Clerk, Stripe, UploadThing, Gemini)
- Learned advanced prompt engineering for consistent AI outputs
- Implemented subscription-based monetization model
- Created beautiful, responsive UI with modern animations
- Gained experience with serverless database architecture
Future Plans
- Add support for more file formats (DOCX, TXT, etc.)
- Implement summary sharing functionality
- Add summary editing capabilities
- Create summary templates for different document types
- Add batch processing for multiple PDFs
- Implement summary search and filtering
- Add export to PDF format
- Create API for third-party integrations