Thanks to visit codestin.com
Credit goes to github.com

Skip to content

anshusinha26/Google-2.0

Repository files navigation

🚀 Google 2.0 - AI-Enhanced Search Engine

This is a Google clone project built with Next.js, Tailwind CSS, and the Gemini AI. It's a modern search engine that provides AI-powered search results.

AI Enhanced Search Engine with Gemini AI

Link: https://google-2-0-git-main-anshu-sinhas-projects.vercel.app/

Note: The deployed version uses a limited number of API calls. To use the application without limitations, you will need to set up your own API keys.

✨ Features

  • Google Search: Fetches and displays search results from Google's Custom Search API.
  • AI-Powered Summaries: Uses the Gemini AI to generate summaries of search results.
  • Modern UI: A clean and modern user interface built with Tailwind CSS.
  • Responsive Design: The application is fully responsive and works on all devices.
  • Pagination: Users can navigate through search results using pagination.

🛠️ Tech Stack

  • Next.js - React framework for building server-side rendered applications.
  • Tailwind CSS - A utility-first CSS framework for rapid UI development.
  • Gemini AI - Google's AI model for generating text summaries.
  • Upstash Redis - Serverless Redis database for caching search results.
  • Heroicons - A set of free, high-quality SVG icons.

🏁 Getting Started

To get a local copy up and running, follow these simple steps.

✅ Prerequisites

  • Node.js and npm (or yarn) installed on your machine.
  • A Google API key and a Custom Search Engine ID. You can get these from the Google Cloud Console.
  • An Upstash Redis database URL and token. You can get these from the Upstash Console.

⚙️ Installation

  1. Clone the repo

    git clone https://github.com/your_username/google-2.0.git
  2. Install NPM packages

    npm install
  3. Create a keys.js file in the root of the project and add your API keys and database credentials.

    module.exports = {
        API_KEY: "YOUR_GOOGLE_API_KEY",
        CX: "YOUR_CUSTOM_SEARCH_ENGINE_ID",
        UPSTASH_REDIS_REST_URL: "YOUR_UPSTASH_REDIS_REST_URL",
        UPSTASH_REDIS_REST_TOKEN: "YOUR_UPSTASH_REDIS_REST_TOKEN",
    };
  4. Run the development server

    npm run dev

Open http://localhost:3000 with your browser to see the result.

📂 Project Structure

  • src/app/page.js: The main page of the application.
  • src/app/search/page.js: The search results page.
  • src/app/components: Contains the reusable components of the application.
  • src/app/utils/search.js: Contains the logic for fetching search results from the Google API and caching them in Redis.
  • keys.js: Contains the API keys and database credentials. (This file is not committed to the repository)

Releases

No releases published

Packages

No packages published