Skip to content

KKabilan07/PaperLens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PaperLens Logo

AI-Powered Academic Paper Analysis & Collaboration Platform

Upload papers, parse them with layout-aware AI, chat with your documents using RAG, and track research metrics β€” all in one place.

Frontend Backend


πŸ”— Live Deployments

Service Platform Link
πŸ–₯️ Frontend Web App Vercel paperlens-research.vercel.app
βš™οΈ Backend API Render paperlens-research.onrender.com

πŸ› οΈ Tech Stack

Frontend

React Vite React Router Supabase Auth CSS3 Lucide

Layer Technology Purpose
Core Framework React 18 (Vite SPA) Fast, modern single-page app
Routing React Router v6 Client-side navigation
State & Auth Supabase Auth Google OAuth & Email/Password
Styling Vanilla CSS Custom tokens, glassmorphism, responsive design
Icons Lucide React Lightweight icon set

Backend

FastAPI Python LlamaIndex Gemini LlamaParse Supabase PostgreSQL Docker

Layer Technology Purpose
Web Framework FastAPI (Python 3.10+) High-performance async API
RAG System LlamaIndex Retrieval-augmented generation pipeline
LLM Gemini API (via LlamaIndex) Answering & summarization
Document Parsing LlamaParse Layout-aware PDF ingestion
Database & Storage Supabase (PostgreSQL) Data + PDF object storage
Auth Verification Supabase JWT middleware Secure request validation

πŸ“‚ Project Structure

PaperLens/
β”œβ”€β”€ FrontEnd/                 # React Frontend (Vite)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ Components/       # Reusable UI components (Sidebar, etc.)
β”‚   β”‚   β”œβ”€β”€ context/          # Authentication and global contexts
β”‚   β”‚   β”œβ”€β”€ lib/              # Client initializations (Supabase client)
β”‚   β”‚   β”œβ”€β”€ pages/            # Page components (Dashboard, LoginPage, etc.)
β”‚   β”‚   β”œβ”€β”€ styles/           # CSS files and global variables
β”‚   β”‚   β”œβ”€β”€ utils/            # Utility modules (API fetch helper, services)
β”‚   β”‚   β”œβ”€β”€ App.css
β”‚   β”‚   β”œβ”€β”€ App.jsx           # Main routing & application entry
β”‚   β”‚   └── main.jsx
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ vercel.json           # Vercel SPA routing configuration
β”‚   └── vite.config.js
β”‚
β”œβ”€β”€ BackEnd/                  # FastAPI Backend
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ api/
β”‚   β”‚   β”‚   β”œβ”€β”€ routes/       # API endpoints (auth, chat, dashboard, papers)
β”‚   β”‚   β”‚   └── api.py        # Centralized router definition
β”‚   β”‚   β”œβ”€β”€ core/             # Configuration & security settings
β”‚   β”‚   β”œβ”€β”€ models/           # Data schemas and Pydantic validation models
β”‚   β”‚   β”œβ”€β”€ services/         # Core business logic (LlamaIndex, LLM, ingestion)
β”‚   β”‚   β”œβ”€β”€ utils/            # Helper utilities
β”‚   β”‚   └── main.py           # Application entry point & CORS configuration
β”‚   β”œβ”€β”€ Dockerfile            # Containerization configuration
β”‚   β”œβ”€β”€ requirements.txt      # Python dependencies
β”‚   └── .dockerignore
└── README.md                 # Project documentation

πŸš€ Key Features

  • πŸ” Secure Authentication β€” User management via Supabase Auth, including email sign-in and Google OAuth.
  • πŸ“Š Smart Dashboard β€” Visualize research stats (papers uploaded, questions asked, words indexed) and recent activity.
  • πŸ“„ Advanced Document Parsing β€” LlamaParse extracts complex tables, formulas, and layouts from scientific papers.
  • πŸ’¬ Interactive RAG Chat β€” Chat directly with your uploaded papers via Gemini API for context-rich Q&A and summaries.
  • πŸ—‚οΈ Paper Repository β€” Searchable list of uploaded papers with preview and details.

βš™οΈ Environment Configuration

Frontend (FrontEnd/.env)

VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_API_URL=http://localhost:8000 # Set to https://paperlens-research.onrender.com for production

Backend (BackEnd/.env)

SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_KEY=your_supabase_service_role_key
SUPABASE_JWT_SECRET=your_supabase_jwt_secret
GEMINI_API_KEY=your_gemini_api_key
LLAMA_PARSE_KEY=your_llamaparse_api_key

πŸ’» Local Development Setup

Backend Setup

cd BackEnd

# Create and activate a virtual environment
python -m venv venv
# Windows:
.\venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run the development server
uvicorn app.main:app --reload --port 8000

🐳 Running Backend with Docker

docker build -t paperlens-backend .
docker run -p 8000:8000 --env-file .env paperlens-backend

Frontend Setup

cd ../FrontEnd

# Install dependencies
npm install

# Run the development server
npm run dev

Open http://localhost:5173 in your browser.


Turning papers into conversations

About

PaperLens: an AI powered research assistant that turns academic papers into searchable, conversational knowledge. Parse PDFs, generate semantic embeddings, and chat with your papers using RAG based retrieval all behind secure user authentication.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors