$ show u14app/deep-research
This repository implements a deep research assistant web application that combines large language models (LLMs) with web search capabilities to generate comprehensive research reports. Built with Next.js 15, React, and Tailwind CSS, it features a client-side interface for topic input and research workflow management, backed by API routes that proxy requests to external AI and search services to protect API keys. The system orchestrates an iterative research process: planning sub-queries, executing parallel searches across multiple providers (Tavily, Firecrawl, Exa, etc.), analyzing results with auto-review cycles, and generating cited final reports. Key architectural elements include Zustand-based state management with localForage persistence, a Model Context Protocol (MCP) server for standardized tool/resource exposure, PWA support for offline installation, and modular components for knowledge base management, file parsing, and real-time progress streaming via Server-Sent Events (SSE).
The LLM identified 2 files worth highlighting for reuse:
A self-contained implementation of the Model Context Protocol (MCP) server that exposes tools, resources, and prompts via SSE and streamable HTTP transports. Demonstrates non-obvious skill in adhering to the MCP specification, including proper handling of JSON-RPC messages, capability negotiation, and transport abstraction. The module is minimally coupled (depends only on shared types and transport implementations) and could be extracted as a standalone MCP server library for any application needing to expose LLM-accessible tools or resources.
Provides a unified interface for multiple search APIs (Tavily, Firecrawl, Exa, Bocha, Brave, SearXNG, CRW) through an abstract base class and provider-specific implementations. Each implementation handles request formatting, response parsing, and error normalization while maintaining a consistent return type. This abstraction allows the deep research orchestrator to remain agnostic to underlying search providers, demonstrating strong dependency inversion and making it trivial to add new search services. The module has minimal internal dependencies (primarily axios and internal types) and could be reused in any project requiring multi-provider search aggregation.