Transform PDFs into smart interactive flashcards, AI summaries, and edit documents with sub-pixel precision. Built with Next.js 15, Google Gemini AI, LangChain, Neon PostgreSQL, Clerk, and Stripe.
WisePDF is an all-in-one AI-driven document platform designed for students, researchers, and professionals. It bridges the gap between passive reading and active recall by converting long, unstructured PDFs into interactive flashcards and concise executive summaries, paired with a complete cloud-based PDF editing and conversion toolkit.
- PDF-to-Flashcards: Ingests dense academic papers, syllabi, and textbooks, generating structured Q&A cards optimized for spaced-repetition learning.
- Context-Aware Summaries: Produces structured bullet-point takeaways and executive briefings powered by Google Gemini and LangChain.
- AI Document Generator: Prompt-based document drafting with automatic formatting, exportable directly to PDF or Word DOCX.
- Smart Rewrite-to-Fit: Automatically rewrites sentences using LLMs to fit within specific visual character boundaries on a page.
- WYSIWYG Text Editing: Select and edit existing text directly on the rendered document canvas.
- Full Typography Control: Customize font family (Helvetica, Times New Roman, Georgia, Garamond, Courier, Verdana, Trebuchet), font size, weight, italic, and color presets.
- Keyboard & UI Point-Level Nudging:
- Fine-tune replacement text coordinates using keyboard arrow keys (
↑↓←→). - Hold
Shiftfor coarse adjustments (5.0pt) orAltfor micro-precision (0.2pt). - Interactive on-canvas and toolbar directional buttons with instant live coordinate readouts (
dx,dy) and reset triggers.
- Fine-tune replacement text coordinates using keyboard arrow keys (
- Merge & Split: Combine multiple documents or extract custom page ranges and individual pages.
- Rotate & Reorder: Reorganize document flow with interactive drag-and-drop page sorting (
@dnd-kit). - Watermark & Page Numbers: Add dynamic diagonal/centered watermarks, customizable opacity, and automatic page numbers (
Page X of Y). - Headers & Footers: Stamp custom document classifications, titles, and dates.
- Security & Privacy: Password-protect sensitive PDFs with 256-bit encryption or unlock protected files.
- Ghostscript Compression: Reduce large files by up to 80% with customizable compression profiles (
Extreme,Recommended,High Quality). - Format Conversions: Seamless bi-directional conversions between Microsoft Office (
.docx,.xlsx,.pptx) and PDF.
- Cloud & P2P File Sharing: Share documents securely via cloud storage or direct WebRTC peer-to-peer data channels.
- Developer Tracker: Integrated analytics tracking GitHub commit activity, contribution streaks, and LeetCode problem progression.
- Tiered Subscriptions & Entitlements: Built-in billing infrastructure with Stripe webhooks, usage quotas, and Clerk authentication.
| Layer | Technology | Purpose |
|---|---|---|
| Framework | Next.js 15 (App Router) + React 19 | Core application structure, server actions, and route handlers |
| Language | TypeScript | Type-safe enterprise architecture across all actions and components |
| Styling & UI | Tailwind CSS v4 + Motion + Lucide | Sleek dark-mode aesthetic with glassmorphic cards and micro-animations |
| AI Orchestration | LangChain + Google Gemini API | Document understanding, OCR vision analysis, and text summarization |
| Database | Neon (Serverless PostgreSQL) | Persistent storage for users, summaries, flashcards, and quotas |
| Authentication | Clerk | Secure user management, social authentication, and route guards |
| Payments | Stripe | Subscription checkouts, customer portal, and webhook handling |
| File Storage | UploadThing | Cloud storage pipeline for document uploads |
| Clientside PDF | Mozilla PDF.js | Viewport rendering and character bounding box overlays |
| Compute Microservice | Docker + Node.js + LibreOffice + Ghostscript | High-compute microservice for conversions, compression, and vector text editing |
- Node.js 20+ installed
- npm, pnpm, or yarn
git clone https://github.com/RadicalThinker/summatrix.git
cd summatrix/summatrix-webnpm installCreate a .env.local file in the summatrix-web directory:
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/safe/dashboard
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/safe/dashboard
# Database (Neon Serverless PostgreSQL)
DATABASE_URL=postgresql://user:password@ep-xyz.neon.tech/neondb?sslmode=require
# Google Gemini AI
GEMINI_API_KEY=your_gemini_api_key
# Stripe Billing
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
# UploadThing Storage
UPLOADTHING_SECRET=sk_live_...
UPLOADTHING_APP_ID=...
# PDF Processing Microservice Endpoint
NEXT_PUBLIC_PDF_API_URL=https://129.154.251.76.nip.io
# Optional: GitHub Dev Tracker
GITHUB_TOKEN=your_github_personal_access_tokennpm run devOpen http://localhost:3000 in your browser.
| Command | Description |
|---|---|
npm run dev |
Starts Next.js development server with Turbopack |
npm run build |
Compiles an optimized production build |
npm run start |
Runs the production build locally |
npm run lint |
Runs ESLint to check code quality |
This web application is optimized for deployment on Vercel:
- Push your repository to GitHub.
- Import the project into your Vercel Dashboard.
- Set the Root Directory to
summatrix-web(if in a monorepo). - Add all environment variables from
.env.local. - Click Deploy.
This project is licensed under the MIT License.