Skip to content

dishafaujdar/WikiMind-RAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartDoc AI 🤖📄

SmartDoc AI is an AI-powered document chatbot that allows users to upload PDF documents and have intelligent conversations about their contents. Built with Next.js, TypeScript, Prisma, and OpenAI.

✨ Features

  • PDF Upload & Processing - Drag and drop PDF files for instant processing
  • AI-Powered Chat - Ask questions in natural language using GPT-4o-mini
  • Semantic Search - Vector embeddings for accurate context retrieval
  • Persistent Storage - Prisma + SQLite for document persistence
  • Source Citations - Every answer includes document references
  • Real-time Streaming - See AI responses as they're generated
  • Beautiful Dark UI - Modern, professional interface with smooth animations
  • Responsive Design - Works seamlessly on desktop and mobile
  • Type Safety - Full TypeScript implementation

🛠️ Tech Stack

Frontend

  • Next.js 14 (App Router) with TypeScript
  • React 18 with TypeScript
  • Tailwind CSS - Utility-first styling
  • shadcn/ui - Beautiful component library
  • react-dropzone - File upload interface
  • react-markdown - Markdown rendering

Backend

  • Next.js API Routes - TypeScript serverless functions
  • Prisma ORM - Type-safe database access
  • SQLite - Embedded database (easily upgradable to PostgreSQL)
  • OpenAI API - GPT-4o-mini for chat, text-embedding-3-small for embeddings
  • pdf-parse - PDF text extraction

AI/ML

  • OpenAI GPT-4o-mini - Conversational AI
  • text-embedding-3-small - Document embeddings
  • RAG (Retrieval-Augmented Generation) - Context-aware responses
  • Cosine Similarity Search - Efficient vector search

🚀 Getting Started

Prerequisites

Installation

  1. Clone the repository

    git clone <your-repo-url>
    cd smartdoc-ai
  2. Install dependencies

    yarn install
  3. Set up Prisma database

    npx prisma generate
    npx prisma migrate dev --name init
  4. Set up environment variables

    Create a .env.local file in the root directory:

    OPENAI_API_KEY=sk-your-key-here
    DATABASE_URL="file:./prisma/dev.db"
  5. Run the development server

    yarn dev
  6. Open your browser

    Navigate to http://localhost:3000

Built with ❤️ using Next.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors