Skip to content

AI-powered reasoning engine powered by DeepSeek R1 reasoning model to refine queries, synthesize data, and provide insightful research responses.

License

Notifications You must be signed in to change notification settings

Justmalhar/rsearch

Repository files navigation

rSearch: AI-Powered Reasoning Engine

rSearch

A cutting-edge research assistant powered by artificial intelligence that harnesses the advanced reasoning capabilities of DeepSeek R1 combined with comprehensive internet search functionality. rSearch delivers precise, well-reasoned responses to complex research queries by:

  • Leveraging state-of-the-art language models for refining queries
  • Performing intelligent web searches across multiple data sources
  • Synthesizing information through sophisticated chain-of-thought reasoning processes
  • Providing clear, actionable insights backed by reliable sources
  • Customizable AI models from OpenAI, OpenRouter or DeepSeek
  • Self hosted alternative to Perplexity

Demo

Demo

Try rSearch* for free here - rsearch.app

Overview

rSearch leverages DeepSeek's Reasoner - R1 model to perform Chain-of-Thought reasoning on search results. The platform first refines your query, searches the internet using Serper.dev API, and then applies advanced reasoning to synthesize a comprehensive, well-thought-out response. Built with Next.js and TypeScript, it offers a seamless research experience while maintaining high performance and code quality.

AI Models and Reasoning

  • DeepSeek-R1: State-of-the-art reasoning model that powers rSearch's analytical capabilities

    • Trained via large-scale reinforcement learning
    • Exceptional performance in math, code, and reasoning tasks
    • Comparable performance to OpenAI-o1
    • Open-source availability for research and development
  • Customizable AI Models: Added support to use any AI models from OpenAI, OpenRouter or DeepSeek as your AI provider.

  • Chain-of-Thought Process:

    1. Query Refinement: Intelligent processing of user input
    2. Internet Search: Comprehensive data gathering via Serper.dev API
    3. Reasoning Analysis: Deep analysis using DeepSeek's reasoning capabilities
    4. Response Synthesis: Well-structured, logical conclusions

Key Features

  • Multiple Search Modes: Search across diverse content categories:

    • Web Search: Broad and efficient web search capability
    • Images: Visual content search
    • Videos: Video content discovery
    • News: Latest headlines and articles
    • Places: Local information and geographical insights
    • Shopping: Product information and price comparisons
    • Scholar: Academic content and research papers
    • Patents: Patent database search
  • Modern UI Components:

    • Responsive sidebar navigation
    • Mobile-optimized header
    • Dynamic search results display
    • Interactive loading states
    • Customizable themes

Deploy

Deploying rSearch is simple and fast with Vercel's one-click deployment option. Vercel provides a powerful and scalable environment for your project.

Deploy with Vercel

Tech Stack

  • Framework: Next.js with App Router
  • Language: TypeScript
  • Styling: TailwindCSS
  • Components: ShadCN UI components
  • State Management: React Hooks
  • Code Quality: ESLint

Getting Started

Prerequisites

  • Node.js 18.x or later
  • npm or yarn package manager

Installation

  1. Clone the repository:

    git clone https://github.com/justmalhar/rsearch.git
    cd rsearch
  2. Install dependencies:

    npm install
    # or
    yarn install
  3. Set up environment variables:

    cp .env.example .env.local

    Create a .env.local file in the root directory with the following variables:

     # Serper API Key (Google Search API) - https://serper.dev/api-key
     SERPER_API_KEY=
    
     # You can either use OpenAI, OpenRouter or DeepSeek as your AI provider.
     # OpenAI API Key (AI Provider) - https://platform.openai.com/api-keys
     # OpenRouter API Key (AI Provider) - https://openrouter.ai/settings/keys
     # DeepSeek API Key (AI Provider) - https://platform.deepseek.com/api_keys
     NEXT_PUBLIC_AI_PROVIDER_API_KEY=
    
     # AI Provider Base URL (AI Provider)
     # DeepSeek Base URL (AI Provider) - https://api.deepseek.com
     # OpenAI Base URL (AI Provider) - https://api.openai.com
     # OpenRouter Base URL (AI Provider) - https://openrouter.ai/api/v1
     NEXT_PUBLIC_AI_PROVIDER_BASE_URL=https://api.deepseek.com
    
     # AI Query Refiner Model (AI Provider)
     # DeepSeek Refiner Model (AI Provider) - deepseek-chat
     # OpenAI Refiner Model (AI Provider) - gpt-4o-mini
     # OpenRouter Refiner Model (AI Provider) - openai/gpt-4o-mini
     NEXT_PUBLIC_AI_REFINER_MODEL=gpt-4o-mini
    
     # AI Reasoning Model (AI Provider)
     # DeepSeek Reasoning Model (AI Provider) - deepseek-reasoner
     # OpenAI Reasoning Model (AI Provider) - gpt-4o
     # OpenRouter Reasoning Model (AI Provider) - openai/gpt-4o
     NEXT_PUBLIC_AI_REASONING_MODEL=gpt-4o
    
     # Landing Page Copy Text
     NEXT_PUBLIC_LANDING_PAGE_COPY_TEXT="AI-powered search with advanced reasoning capabilities"
  4. Start the development server:

    npm run dev
    # or
    yarn dev

The application will be available at http://localhost:3000

Development Commands

  • npm run dev: Start development server
  • npm run build: Create production build
  • npm run start: Start production server
  • npm run lint: Run ESLint for code quality checks

Project Structure

rsearch/
├── app/                  # Next.js app directory
│   ├── api/             # API routes
│   ├── layout.tsx       # Root layout
│   ├── page.tsx         # Home page
│   └── rSearch/          # Search page
├── components/          # React components
│   ├── rSearch/        # Search-specific components
│   └── ui/             # Reusable ShadCN UI components
├── hooks/              # Custom React hooks
├── lib/                # Utility functions
├── public/             # Static assets
└── types/              # TypeScript type definitions

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Stay Connected

About

AI-powered reasoning engine powered by DeepSeek R1 reasoning model to refine queries, synthesize data, and provide insightful research responses.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published