Skip to content

Repository files navigation

AI Answer Engine

A powerful AI-powered answer engine built with Next.js that uses Groq for chat functionality and web scraping capabilities to provide accurate, context-aware responses.

Tech Stack

  • Frontend: Next.js, React, TypeScript
  • Backend: Next.js API Routes
  • AI Integration: Groq
  • Web Scraping: Cheerio, Puppeteer
  • Rate Limiting: Redis
  • Deployment: Vercel (recommended)

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Redis (for rate limiting)

Getting Started

  1. Clone the repository:
git clone https://github.com/team-headstart/ai-answer-engine.git
cd ai-answer-engine
  1. Install dependencies:
npm install
  1. Set up environment variables:
cp .env.example .env.local

Then edit .env.local with your configuration:

  • GROQ_API_KEY: Your Groq API key
  • REDIS_URL: Your Redis connection URL
  1. Run the development server:
npm run dev
  1. Open http://localhost:3000 with your browser to see the result.

Development Tasks

The following areas need attention:

  • Frontend (src/app/page.tsx)

    • Update the UI components
    • Implement API response handling
    • Add loading states and error handling
  • Backend (src/app/api/chat/route.ts)

    • Implement Groq chat integration
    • Set up web scraping with Cheerio and Puppeteer
    • Add error handling and validation
  • Middleware (src/middleware.ts)

    • Implement Redis-based rate limiting
    • Add request validation

Learn More

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages