Upload academic PDFs, extract questions automatically, and generate structured, pointwise answer keys.
Built with React 19, TypeScript, Express 5, Google Gemini 2.5 Flash, and jsPDF. Ready for production deployment on Render.com.
- 📂 Direct PDF Processing — Upload any course materials, exam papers, or textbooks.
- 🔍 Visual & Text Extraction — Automatically extracts text and parses complex visual contexts (charts, diagrams, and equations) using multimodal AI.
- 📌 Pointwise Answers — Structured, readable solutions without unnecessary fluff or wordy explanations.
- 🔢 Step-by-Step Math Solving — Solves numerical problems using a clear layout: Given ➔ Formula ➔ Calculation ➔ Result.
- 🌐 Polyglot Support — Can parse and respond in English, Bengali, Banglish, Hindi, Hinglish, Tamil, Telugu, Marathi, Gujarati, Kannada, and more.
- 📄 High-Fidelity PDF Export — Downloads a professional answer key with clean typography, page numbers, status badges, and selectable vector text (no blurry screenshots).
- 🎭 Dual View Engine — Preview and read solutions directly inside the app in structured cards or copy raw markdown.
- ⚙️ Custom Word limits — Dynamically adjust response lengths (50 to 500 words per question) to match your study preferences.
- 🔑 Bring Your Own Key (BYOK) — Completely client-driven API key handling. No server databases, no key storing, maximum privacy.
| Layer | Technologies Used |
|---|---|
| Frontend | React 19, TypeScript, Vite 6, Tailwind CSS, Framer Motion |
| Backend | Express 5, Node.js (for both local development and production on Render) |
| Generative AI | Google Gemini 2.5 Flash (@google/genai) |
| Document Generation | jsPDF (native rendering library for lightweight vector documents) |
- Node.js (v18.0.0 or higher)
- npm (v9.0.0 or higher)
- A Gemini API Key (Get a free one instantly from Google AI Studio)
-
Clone the Repository
git clone https://github.com/Subha12125/DocuSolver-ai.git cd DocuSolver-ai -
Install Dependencies
npm install
-
Prepare Environment Variables
cp .env.example .env
(Note: You do not need to configure any API keys in
.envas the application prompts for your Gemini API key directly in the browser UI, ensuring safe client-side usage.) -
Run Development Server
npm run dev
The app will start at http://localhost:3000.
DocuSolver-ai/
├── App.tsx # Main React component (layout, state, core upload logic)
├── server.ts # Express backend server (used for local development)
├── vite.config.ts # Vite configuration (sets target port to 3000)
├── types.ts # TypeScript types for PDF parsing, solutions, and API responses
├── index.html # Entry HTML document
├── index.tsx # React DOM mount point
├── index.css # Global Tailwind/Vanilla styles and custom scrollbars
├── components/
│ └── QAView.tsx # Interactive solution viewer (tabs for structured cards, plain text, and raw code)
└── services/
└── pdfService.ts # High-fidelity programmatic PDF builder using jsPDF
If you are uploading large PDFs, serverless environments (like Netlify or Vercel Hobby) will time out. Instead, deploy the application to Render.com, which runs the persistent Node/Express server and supports the full 90-second timeout window.
- Commit and push your repository to your GitHub account.
- Login to the Render Dashboard.
- Click New + and select Web Service.
- Connect your GitHub repository.
- Configure the following fields:
- Name:
docusolver-ai - Language:
Node - Build Command:
npm run build - Start Command:
npm run start
- Name:
- Click Deploy Web Service. Render will build the static assets, launch the Express server, and expose port
3000automatically.
DocuSolver AI is built around the Bring Your Own Key (BYOK) security design:
- Zero Logs: Your API Key is never logged, stored, or transmitted to any third-party analytics database.
- Direct AI Communication: The key is sent inside the payload headers directly to the API endpoint and is used solely for the duration of that request.
- Free Access: Anyone can get a free, high-limit key via Google AI Studio.
- Enter API Key: Provide your Gemini API key in the top-right field of the application.
- Upload File: Drag and drop your academic PDF or click the browse button.
- Choose Preferences: Select your target language and set the desired word limits.
- Solve: Click Generate Solutions. The file will be parsed, and questions will appear sequentially.
- Export/Download: Use the Download PDF option to save a clean, professionally formatted offline copy.
This project is licensed under the MIT License. See LICENSE for details.
Made with 🧠 and ❤️ by Subha