Skip to content

yoni-tad/pdf-x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“„ PDF X β€” Chat with Your PDFs in Telegram

PDF X is a lightweight Telegram bot that lets users upload PDF files and chat with them using AI. It's a personal project built just for fun (and usefulness!) β€” with a sprinkle of weird and premium ideas. πŸ’¬βœ¨


πŸš€ Features

  • 🧠 AI-powered chat with PDF files
  • πŸ“₯ Upload and process PDF documents
  • ⚑ Telegram Bot Integration
  • πŸ” Premium Plan (1 Birr) with:
    • Increased file upload limit (from 1MB to 5MB)
    • Up to 3 PDFs instead of 1

πŸ›  Tech Stack

  • Node.js + Express – REST API
  • MongoDB + Mongoose – Database
  • PHP – Handles Telegram bot webhook
  • pdf-parse – Extracts text from PDFs
  • Custom Chunking – Splits and stores text for retrieval
  • Gemini AI – For AI answers from chunks

πŸ—„ Folder Structure

└── πŸ“pdf-x
    └── πŸ“bot
        └── ai.php
        └── file-upload.php
        └── index.php
    └── πŸ“server
        └── .env
        └── .gitignore
        └── πŸ“controller
            └── file.controller.js
            └── payment.controller.js
            └── user.controller.js
        └── πŸ“model
            └── chunk.model.js
            └── payment.model.js
            └── pdf.model.js
            └── user.model.js
        └── package-lock.json
        └── package.json
        └── πŸ“router
            └── file_router.js
            └── payment_router.js
            └── user_router.js
        └── server.js
        └── πŸ“utils
            └── chunkText.js
            └── pdfParse.js
    └── .gitignore

πŸ’‘ Project Flow

  1. User uploads PDF via Telegram bot.
  2. Bot sends file to backend API.
  3. PDF is parsed and chunked.
  4. Chunks are saved to MongoDB and linked to the user.
  5. User chats with the bot β€” questions are answered by matching chunk + AI.
  6. Premium users get extra limits and features.

πŸ’Έ Premium Plan

This is just a tiny plan (1 birr) to test fun features and support the project.

Feature Free Plan Premium Plan
Max file size 1 MB 5 MB
PDF upload limit 1 PDF 3 PDFs

⚠️ Note

  • Project hosted on free services β€” performance may vary.
  • AI responses are limited in size due to Telegram restrictions.
  • Markdown formatting is supported (up to 4096 characters per message).

πŸ“¬ Contact

Created by yonitad2404@gmail.com
Feel free to message for questions or ideas.


πŸ§ͺ For Testing

You can try the bot using Telegram at:
πŸ‘‰ t.me/pdf_x_bot

About

PDF X is a lightweight Telegram bot that lets users upload PDF files and chat with them using AI. It's a personal project built just for fun (and usefulness!) β€” with a sprinkle of weird and premium ideas. πŸ’¬βœ¨

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors