Skip to content

SSShogunn/lumina

Repository files navigation

Lumina - Give your PDFs Superpower

Your intelligent AI-powered PDF chat companion

🎯 Overview

Lumina transforms how you interact with PDF documents by providing an intuitive chat interface powered by advanced AI. Upload your PDFs and start having natural conversations about their content instantly.

Lumina Dashboard

✨ Key Features

  • 🤖 AI-Powered Chat: Have natural conversations with your PDF documents
  • 📱 Modern Interface: Clean, responsive design that works on all devices
  • 🚀 Fast Processing: Quick PDF parsing and real-time AI responses
  • 🔐 Secure Authentication: Robust user authentication via KindeAuth
  • 📊 Smart Indexing: Efficient document processing using Pinecone vector DB
  • ☁️ Cloud Storage: Reliable file storage with Cloudflare R2

💡 How It Works

File Upload Interface
  1. Upload - Simply drag and drop your PDF files
  2. Process - Our AI analyzes and indexes your document
  3. Chat - Ask questions and get intelligent responses
  4. Learn - Gain insights from your documents effortlessly

🛠️ Tech Stack

  • Framework: Next.js
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Database: Postgres
  • Authentication: KindeAuth
  • Vector DB: Pinecone
  • Storage: Cloudflare R2 (S3-compatible)

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Postgres database (any managed or self-hosted Postgres)
  • KindeAuth account
  • Pinecone account
  • Cloudflare account with R2 bucket

Installation

  1. Clone the repository
git clone https://github.com/yourusername/lumina.git
cd lumina
  1. Install dependencies
npm install
  1. Set up environment variables
cp .env.example .env
  1. Configure your environment variables in .env:
# Database
DATABASE_URL=

# Authentication (Kinde)
KINDE_CLIENT_ID=
KINDE_CLIENT_SECRET=
KINDE_ISSUER_URL=
KINDE_SITE_URL=
KINDE_POST_LOGOUT_REDIRECT_URL=
KINDE_POST_LOGIN_REDIRECT_URL=

# OpenAI
OPENAI_API_KEY=

# Vector DB (Pinecone)
PINECONE_API_KEY=

# Cloudflare R2
R2_ACCOUNT_ID=
R2_ACCESS_KEY_ID=
R2_SECRET_ACCESS_KEY=
R2_BUCKET_NAME=lumina-app
R2_PUBLIC_BASE_URL=https://pub-XXXX.r2.dev

Cloudflare R2 setup

To use Cloudflare R2 for file storage:

  1. Create a bucket in R2 (e.g. lumina-app).

  2. Create an access key with read/write permissions for that bucket and copy the access key ID and secret.

  3. In the bucket settings, find the S3 API endpoint and copy the account ID portion into R2_ACCOUNT_ID.

  4. Enable the Public development URL for the bucket and copy the *.r2.dev URL into R2_PUBLIC_BASE_URL.

  5. Add a simple CORS rule that allows GET (and HEAD/OPTIONS) from http://localhost:3000 (and your production domain later).

  6. Restart your development server after changing any of these environment variables.

  7. Run the development server

npm run dev

Visit http://localhost:3000 to see the application.

📖 Usage

  1. Create Account: Sign up using your email or social accounts
  2. Upload PDF: Use the drag-and-drop interface to upload your documents
  3. Start Chatting: Ask questions about your document content
  4. Manage Documents: Access your document history and conversations

Made with ❤️ by Aman

About

An AI-powered PDF management app built with Next.js, featuring OpenAI integration for natural language queries and Supabase for secure data storage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors