Inspiration
The idea for DocuPrism was born from a common frustration in the age of AI: the constant need for an internet connection and the lingering concerns about privacy. How can I summarize a confidential client contract without uploading it to a third-party server? How can I work on my documents and leverage AI while traveling on a plane without Wi-Fi?
We wanted to build a tool that gives control back to the user, combining the power of modern language models with the security and autonomy of local processing. The arrival of Chrome's built-in AI APIs was the spark that allowed us to build that solution.
What it does
DocuPrism is a Progressive Web App (PWA) that transforms your browser into a powerful and private document assistant. The user is in complete control:
📄 Load any document: Securely upload .pdf, .docx, or .txt files (or simply paste text). All text extraction is performed 100% in-browser.
✨ Get instant summaries: Uses the Summarizer API to distill long texts. The app automatically detects the source language with the Language Detection API to ensure a high-quality summary.
💬 Chat with your document: Use the Prompt API to have an interactive conversation, ask specific questions, and extract key information from your text.
🗂️ Secure local history: All your interactions (uploaded documents, summaries, and chats) are saved securely in your local browser storage for future reference.
🔒 100% Private: All processing, from file parsing to AI analysis, happens locally. Your data never leaves your computer.
✈️ Works Offline: As a PWA, DocuPrism is installable and works perfectly without an internet connection.
How we built it
We built DocuPrism with a modern, fast, and 100% client-side focused tech stack:
Core Framework: Nuxt 3 (on top of Vue 3) for its incredible developer experience and its robust PWA capabilities.
Language: TypeScript, to ensure robust, scalable code and to leverage autocompletion, which greatly accelerated development.
Styling: Tailwind CSS, to build a clean, responsive interface in an agile and semantic way.
AI Engine: A suite of Chrome Built-in AI APIs. We orchestrated the Summarizer API (for summaries), the Prompt API (for chat), the Translator API (for translations), and the Language Detection API (for language accuracy).
Client-Side File Parsing: We integrated JavaScript libraries to extract text from .pdf and .docx files directly in the browser, with no server required.
Offline Capability: The @vite-pwa/nuxt module, which allowed us to turn the application into an installable PWA with ease.
Challenges we ran into
Our biggest challenge was orchestrating multiple AI APIs that are still in "Early Preview." We had to create a robust state management system to check the availability of each API (Summarizer, Prompt, etc.) and clearly guide the user if any were not enabled.
Another key challenge was file processing. Implementing client-side text extraction for complex formats like .pdf and .docx and then efficiently passing that context to the AI APIs, all without overloading the browser, required careful optimization.
Accomplishments that we're proud of
We are especially proud of:
Orchestrating a full AI suite: We successfully integrated and orchestrated four different AI APIs to create a multi-faceted assistant, not just a single-function tool.
Fulfilling the 100% privacy promise: We proved it's possible to build a complex AI tool (including file processing) without a single byte of user data touching a server.
A true offline PWA: It's not just a webpage. It's an installable app that works perfectly offline, from uploading a PDF to chatting with the AI.
What we learned
This hackathon has been an immense learning experience. The most important thing we learned is the enormous potential of on-device AI for the future of the web. It opens the door to a new generation of applications that are faster, cheaper to operate, and, above all, more respectful of user privacy.
We also reinforced that a great user experience is key. Orchestrating complex technologies in the background only works if the user has a simple, clear, and trustworthy experience.
What's next for DocuPrism
The future for DocuPrism is to expand into a complete, private writing and analysis hub:
Writing and Rewriting: Integrate the Writer API and Rewriter API to help users draft new documents or improve existing text based on their loaded files.
Grammar Correction: Implement the Proofreader API to add real-time grammar and style correction.
Translate on the fly: Integrate the Translator API to translate your summaries or chat responses to your preferred language.
Multimodal Analysis: Explore the multimodal capabilities of the Prompt API to allow users to upload images (like charts or diagrams) and ask questions about them within the context of their document.
Built With
- chrome-built-in-ia
- nuxt
- pwa
- tailwind
- typescript
- vercel
- vue