DocsOnChain

Turning PDFs into Monetizable, Verifiable, AI-Searchable Knowledge with DocsOnChain

Docs on Chain
COUNTRY

Global

INDUSTRY

Research

TEAM SIZE

6 Team Members

TIMELINE

April 2 - July 26

Problem

People have valuable documents (PDF guides, research, internal notes) but turning them into a product is hard: uploading + access control + payments + trustworthy ownership + real “ask my document” AI typically requires stitching together many systems.

DocsOnChain makes documents sellable and shareable, and adds a conversational AI that answers questions using the full context of the user’s uploaded files—so users don’t have to manually search, skim, or copy/paste content.

The Challenge

The core challenge was building an experience that feels simple for users while coordinating multiple guarantees behind the scenes:

Document-grounded answers (RAG) that stay constrained to the uploaded content.

Secure delivery of paid content (one-time download links) and permissioned sharing.

Verifiable provenance + access events, so creators and buyers can trust who owns what and who was granted access.

Low-friction payments tied to a specific resource, including a service fee gate and a per-document price.

Solution

 

 

DocsOnChain is a full-stack system with a Next.js frontend and a NestJS backend that orchestrates storage, payments, AI retrieval, and ledger-backed auditability.

When a user uploads a PDF, the backend stores the file in Google Cloud Storage, extracts text, chunks it, generates Gemini embeddings (embedding-001), and indexes the chunks in Pinecone under the document’s ID. This powers fast, high-relevance retrieval for chat.

For chat, the system performs vector search per selected document IDs, builds a constrained prompt that instructs the model to answer only from retrieved chunks, and maintains conversation continuity using Redis-backed history + rolling context.

For monetization and trust, DocsOnChain enforces payments at the API boundary using x402 (USDC on Base network), including a service fee step and a per-file price check. Access grants, favorites, and payment confirmations are written as Hyperledger Fabric transactions (e.g., CreateFile, GrantAccess, ConfirmPayment, ToggleFavorite), creating an auditable record of ownership and entitlements. Users receive content via one-time signed download links to prevent uncontrolled sharing.

Conclusion

DocsOnChain shows how retrieval-based AI, modern payment rails, and ledger-backed audit trails can combine to turn static documents into interactive, monetizable products.

As AI-driven content experiences mature, systems that pair grounded answers with verifiable access + payment enforcement will be the most trusted by creators and users alike.

DocsOnChain

Monetize PDFs with paywalled access, ledger-backed sharing records, and an AI chatbot that answers from your documents’ full context.

My project had some difficult features to work on since some of the capabilities were not implemented in the research community. But Zaytrics and its innovative team made it happen for me. I recommend them to everyone.
Yaseen Alkaisi
Founder - StonAI