Inspiration

🌟 The idea for GemQ was born from observing online communities' struggle with knowledge accessibility. Whether it's a crypto project's whitepaper, an open-source software's documentation, or a DAO's governance proposal, community members constantly ask questions that are already answered in lengthy PDF documents. The problem was clear: Information exists, but it's locked away in static files that people don't have time to read. We witnessed this pattern repeatedly:

New members join a Telegram community and ask, "What is this project about?" The answer exists in a 40-page PDF pinned somewhere Moderators either ignore the question or copy-paste the same explanation for the hundredth time Engaged members get frustrated; new members feel unwelcome We thought: What if community documentation could be interactive? What if anyone could ask questions and get instant, accurate answers derived directly from official project materials? That vision became GemQ—a bot that transforms static PDFs into a conversational knowledge base, accessible right where communities already gather: Telegram groups.

What it does

GemQ acts as an AI-powered documentation assistant for Telegram communities:

Private Setup: Community admins start a private chat with the bot, upload their project PDF (whitepaper, docs, guidelines), and receive a unique project code Group Integration: Add the bot to your community's Telegram group and link it to your uploaded documentation Instant Answers: Members mention the bot with questions—it reads the PDF context and responds with accurate, source-based answers Usage Management: Built-in token system (500 tokens/project) prevents abuse while keeping the service accessible

Example interaction: User: @GemQBot, what's the total supply? Bot: According to the tokenomics section, the total supply is 1 billion tokens, with 40% allocated to community rewards...

How we built it

Tech Stack: Node.js with Telegraf for bot logic and Telegram API integration Google Generative AI (Gemini) via @google/genini for context-aware responses MongoDB + Mongoose for storing project metadata Express for health checks and webhook endpoints

Challenges we ran into

  1. Telegram File Management Complexity Learning Telegram's file API was tricky—understanding the difference between file_id, file_unique_id, and temporary download URLs took time. We eventually settled on storing file_id and fetching URLs dynamically.
  2. Context Preservation Across Chat Types The bot behaves differently in private chats (setup mode) vs. groups (assistant mode). Coordinating these contexts while maintaining clean code required careful state management.
  3. Gemini Integration Learning Curve Working with @google/genini was new territory. We learned how to pass file URLs to the multimodal API, handle token limits, and structure prompts for PDF-based Q&A.

Accomplishments that we're proud of

Seamless UX: From PDF upload to group answers in under 2 minutes—no complex setup Smart Resource Management: Leveraging Telegram's infrastructure instead of local storage Real Community Value: Tested with actual project communities—members loved instant documentation access Clean Architecture: Modular code that's easy to extend with new features

What's next for GemQ

Multi-PDF support (let communities upload multiple docs) Enhanced token top-up system with more payment integration

Share this project:

Updates