Skip to content

rezashahnazar/rag-chatbot

 
 

Repository files navigation

Flixa - Chat with PDFs using AI

Flixa is a modern web application that allows users to upload PDFs and have interactive conversations about their content using AI. Built with Next.js and featuring full Persian (Farsi) language support.

Features

  • 📄 PDF Upload & Processing
  • 💬 AI-powered chat interface
  • 🔍 RAG (Retrieval Augmented Generation) for contextual responses
  • 🔐 User authentication
  • 🌙 Dark mode support
  • 🇮🇷 Full Persian (RTL) language support
  • 📱 Responsive design

Tech Stack

  • Framework: Next.js 14
  • Authentication: NextAuth.js
  • Database: PostgreSQL with Drizzle ORM
  • AI/ML: OpenAI API
  • Styling: Tailwind CSS
  • Storage: Vercel Blob Storage
  • Deployment: Vercel
  • Package Manager: pnpm

Getting Started

Prerequisites

  • Node.js 18+
  • pnpm
  • PostgreSQL database
  • OpenAI API key

Installation

  1. Clone the repository:
git clone https://github.com/rezashahnazar/flixa.git
cd flixa
  1. Install dependencies:
pnpm install
  1. Create a .env.local file:
# Database
POSTGRES_URL=your_postgres_connection_string

# OpenAI
OPENAI_API_KEY=your_openai_api_key

# Auth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_nextauth_secret

# Vercel Blob
BLOB_READ_WRITE_TOKEN=your_blob_token
  1. Run database migrations:
pnpm tsx migrate.ts
  1. Start the development server:
pnpm dev

Project Structure

  • /app - Next.js app router pages and API routes
  • /components - Reusable React components
  • /lib - Utility functions and configurations
  • /drizzle - Database schema and migrations
  • /public - Static assets
  • /styles - Global styles and Tailwind configuration

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

Contact

Acknowledgments

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.3%
  • Other 0.7%