Project Info
Inspiration
We’re drowning in tabs that shout headlines without context. The spark came from those midnight doomscrolls where we wished for a calm, trustworthy co‑pilot to cut through noise, surface what matters, and warn us when content felt dubious. DeepDive was born to make critical reading as effortless as streaming a playlist.
What it does
DeepDive is a Chrome companion that lands in the corner of any article or YouTube video. One click delivers: A focused summary and key claims. A credibility check that weighs source, author, and tone. A persistent memory of what you’ve already read so it can surface related content later. A chat interface that answers questions grounded in the source—no hallucinated facts.
How we built it
The frontend is a Manifest V3 extension: contentScript.js injects the sidebar UI, background.js brokers messages to the backend, and injectUI.css keeps the experience lightweight and unobtrusive. The backend is an Express server that orchestrates multiple LLMs: Gemini 2.5 Flash handles fast summarization and topic extraction. Claude 3.5 Sonnet performs deeper credibility reasoning and interactive chat. A Letta-hosted memory agent stores article embeddings so we can retrieve related reading later. Under the hood we approximate token limits with a simple cap ( T \leq \frac{\text{chars}}{4} ) to stay within API quotas, cache results by URL hash, and keep in-memory conversations for responsive chat.
Challenges we ran into
LLM juggling: Balancing Gemini’s speed with Claude’s rigor required fallback logic, JSON parsing guards, and careful prompt design. Credibility sourcing: Getting Claude to cite author research consistently meant iterating on prompt structure and mapping [1]-style references back to usable URLs in the UI. Extension UX: Making the floating entry point draggable without accidental clicks took a custom pointer-state handler. Memory sync: Aligning local in-memory storage with the Letta agent’s persistent memory introduced async race conditions that we resolved with defensive checks.
Accomplishments we're proud of
A seamless sidebar that feels native across wildly different sites. Robust caching and fallback paths so users rarely feel latency. A credibility experience that goes beyond color badges by surfacing transparent reasoning. Tight integration with Letta to keep a personalized knowledge graph of past reads.
What we learned
Prompt architecture matters as much as model choice; small wording tweaks unlocked reliable JSON and grounded citations. Chrome extension ergonomics are equal parts CSS finesse and DOM diplomacy—especially when injecting UI into unpredictable pages. Multi-model orchestration benefits from defensive programming: Promise.allSettled, structured logging, and graceful degradation keep the product resilient.
What's next
Expand memory with embeddings persisted in a real datastore so cross-session insights survive restarts. Add collaborative notes so teams can annotate and share credibility scores. Introduce automatic fact spot-checking against trusted datasets. Ship production-ready icons, a settings panel, and polished onboarding to turn DeepDive into a daily reading habit.
DeepDive 🧠
Your AI co-pilot for reading and watching content online.
DeepDive is a Chrome extension that provides intelligent summarization, credibility analysis, fact-checking, and interactive Q&A for any article or YouTube video you're viewing.
✨ Features
- 🎯 Smart Summaries - Get concise TL;DR and key takeaways instantly
- 🔍 Credibility Analysis - Trust scores, bias detection, and source evaluation
- ✅ Real-Time Fact Checking - Verify claims with Google Search-powered verification
- 👤 Author Research - Automatic author background and expertise analysis
- 🔗 Content Connections - Discover links between articles you've read
- 💬 Interactive Chat - Ask questions about any article or video
- 📚 Reading History - Track and revisit analyzed content
- 🌙 Dark Mode - Comfortable reading in any environment
🚀 Quick Start
Prerequisites
- Node.js 18+ (Download)
- Chrome browser
- API keys (get them free):
- Claude API key from Anthropic Console
- Gemini API key from Google AI Studio
Installation (3 steps)
1. Clone and configure
git clone <your-repo-url>
cd calhacks12
Edit backend/.env and add your API keys:
ANTHROPIC_API_KEY=sk-ant-your-key-here
GOOGLE_API_KEY=AIzaSy-your-key-here
PORT=3000
2. Start the backend
cd backend
npm install
npm start
You should see: 🚀 DeepDive backend running on http://localhost:3000
3. Load the Chrome extension
- Open Chrome and go to
chrome://extensions/ - Enable Developer mode (toggle in top-right)
- Click "Load unpacked"
- Select the
frontendfolder from this project
Done! 🎉
Try it out
- Visit any article (try nytimes.com)
- Click the DD button in the top-right corner of the page
- Explore the Summary, Credibility, Connections, and Chat tabs!
📖 How It Works
Architecture
┌─────────────────┐
│ Chrome Extension│
│ (Frontend) │
└────────┬────────┘
│
↓
┌─────────────────┐
│ Express Server │
│ (Backend) │
└────────┬────────┘
│
┌────┴────┐
↓ ↓
┌────────┐ ┌────────┐
│ Claude │ │ Gemini │
│ API │ │ API │
└────────┘ └────────┘
Features in Detail
📊 Credibility Analysis
Multi-tier credibility scoring:
- Website Analysis - Source reputation and editorial standards
- Author Analysis - Expert background research with web sources
- Content Analysis - Evidence quality, tone, and logical reasoning
- Fact Checking - Real-time claim verification with Google Search
🔗 Connections Tab
Automatically finds connections between articles you've read:
- Shared Topics - Articles covering similar subjects
- Same Authors - Track content from the same writer
- Reading History - Browse your past 20 analyzed articles
💬 Smart Chat
Ask questions about the content:
- "What's the main argument?"
- "Is this opinion or fact?"
- "What's missing from this analysis?"
- Adjustable response length (short, default, detailed, or auto)
🛠️ Technology Stack
Frontend
- Vanilla JavaScript (no framework dependencies)
- Chrome Extension Manifest V3
- Injected UI with dark mode support
Backend
- Node.js + Express
- Claude 3.5 Sonnet (credibility analysis, chat)
- Gemini 2.5 Flash (summaries, fact-checking, author research)
- In-memory storage (upgradeable to database)
AI Features
- Google Search Grounding - Real-time web research via Gemini
- Streaming responses - See analysis appear in real-time
- Parallel processing - Fast analysis with concurrent API calls
📁 Project Structure
calhacks12/
├── frontend/ # Chrome extension
│ ├── manifest.json # Extension config
│ ├── background.js # Service worker (API communication)
│ ├── contentScript.js # Content extraction + UI injection
│ ├── injectUI.css # Styles (light/dark mode)
│ ├── popup.html # Extension popup
│ └── assets/ # Icons
│
├── backend/ # Express API server
│ ├── server.js # Main server (analyze, chat, connections)
│ ├── package.json # Dependencies
│ └── .env # API keys (DO NOT COMMIT!)
│
└── README.md # This file
🔧 Development
Backend development mode
cd backend
npm run dev # Auto-restarts on file changes
Making changes
Frontend:
- Edit files in
frontend/ - Go to
chrome://extensions/ - Click refresh icon on DeepDive
- Reload the webpage
Backend:
- Edit
backend/server.js - Server auto-restarts (if using
npm run dev)
🐛 Troubleshooting
Backend won't start
Check Node.js version:
node --version # Should be 18.x or higher
Check if port 3000 is in use:
lsof -i :3000
kill -9 <PID> # If needed
Extension not working
Verify backend is running:
curl http://localhost:3000/health
# Should return: {"status":"ok"}
Check browser console (F12 → Console) for errors
API key issues
- Claude keys start with
sk-ant- - Gemini keys start with
AIzaSy - Remove any extra spaces from
.envfile - Verify keys are valid in respective consoles
📚 API Endpoints
POST /analyze/stream
Analyze content with streaming response.
Request:
{
"url": "https://example.com",
"content": "Article text...",
"type": "article",
"metadata": {
"title": "Article Title",
"author": "Author Name"
}
}
Response: Server-Sent Events stream with summary, credibility, and fact-check data.
POST /chat
Chat about analyzed content.
Request:
{
"conversation_id": "uuid",
"user_message": "What's the main point?",
"response_length": "auto" // auto, short, default, detailed
}
Response:
{
"assistant_message": "The main point is..."
}
GET /history
Get analyzed article history.
Response:
{
"articles": [...],
"total": 42
}
GET /connections/:urlHash
Get connections for an article.
Response:
{
"connections": [...],
"totalArticles": 10
}
🎯 Future Enhancements
- Persistent database storage (PostgreSQL/MongoDB)
- User authentication and multi-user support
- YouTube transcript extraction and analysis
- Export summaries to Notion, Obsidian, etc.
- Browser extension for Firefox and Safari
- Mobile app
- Collaborative reading lists
- Advanced analytics and reading patterns
🤝 Contributing
Contributions are welcome! This project was built for Cal Hacks 12.0.
📄 License
MIT License - Feel free to use this for your own projects!
🙏 Acknowledgments
Built with:
- Anthropic Claude for reasoning and analysis
- Google Gemini for summaries and search
- Love for better internet literacy ❤️
Happy reading! 📚✨
Analysis
View
Metric
- 7
- 5
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- CSSIn code
- ExpressIn code
- Google GeminiIn code
- HTMLIn code
- JavaScriptIn code
- Node.jsClaimed
6 of 7 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
154 KB
Source files
13
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
n8liu/deepdive
18 files · 155 KB · @ 365008c
Structure
Interface
2 files · 11%Screens, components and styles rendered to the user.
Application logic
6 files · 33%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- JavaScript66%
- CSS17%
- Markdown15%
- Shell1%
- HTML1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
backend/package.json
npm · 8- @anthropic-ai/sdk
- @google/generative-ai
- axios
- cors
- dotenv
- express
- uuid
- +1 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.