PaperPath is a full-stack research paper learning platform that helps users discover, save, read, and interact with academic papers through an AI-powered tutor experience. The project combines a React frontend, an Express backend, MongoDB storage, and local AI inference for paper understanding and question answering.
PaperPath is designed for students, researchers, and curious learners who want to:
- browse and explore research papers,
- save papers to a personal library,
- track what they have read,
- upload datasets in PDF or CSV format,
- ask questions about papers through an AI tutor.
The application is split into two main parts:
- Frontend: React + Vite + Tailwind CSS
- Backend: Node.js + Express + MongoDB
- User registration and login
- JWT-based authentication
- Personal saved papers library
- Reading history tracking
- Dashboard for browsing papers
- Reader experience for individual papers
- PDF ingestion support
- CSV ingestion support
- Automatic paper metadata storage
- AI-powered paper Q&A using local embeddings and generation
- Search-like semantic retrieval over stored paper chunks
- REST API structure for frontend integration
- Upload endpoint for datasets
- MongoDB-backed persistence
- Easy deployment for frontend and backend separately
- React 18
- Vite
- Tailwind CSS
- Lucide React
- Node.js
- Express.js
- MongoDB with Mongoose
- JWT for authentication
- Multer for file uploads
- dotenv for environment configuration
- Local Ollama server
- Embedding model: nomic-embed-text
- Generation model: qwen2.5:0.5b
PaperPath/
├── Paper_Path_Backend/
│ ├── server.js
│ ├── package.json
│ ├── src/
│ │ ├── config/
│ │ ├── controllers/
│ │ ├── middleware/
│ │ ├── models/
│ │ ├── routes/
│ │ └── services/
│ └── uploads/
├── Paper_Path_Frontend/
│ ├── index.html
│ ├── package.json
│ ├── public/
│ └── src/
│ ├── components/
│ ├── services/
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
├── .env.example
├── RagAractictura.md
└── Readme.md
Before running the project locally, make sure you have:
- Node.js 16 or newer
- npm or pnpm
- MongoDB Atlas account or a local MongoDB instance
- Ollama installed and running locally
- A browser to view the frontend
If you want the AI features to work, install Ollama and pull the required models:
ollama pull nomic-embed-text
ollama pull qwen2.5:0.5bThen make sure Ollama is running on:
http://localhost:11434
git clone <your-repo-url>
cd PaperPathcd Paper_Path_Backend
npm installcd ../Paper_Path_Frontend
npm installCreate a .env file inside the backend folder based on the example file:
cp ../.env.example .envExample values:
PORT=3001
MONGO_DB_URL=your_mongodb_connection_string
JWT_SECRET=your_secret_key
GEMINI_API_KEY=your_gemini_key_if_needed
VITE_API_BASE_URL=http://localhost:3001/apiMONGO_DB_URLis required for database connectivity.JWT_SECRETis required for authentication.VITE_API_BASE_URLis used by the frontend to call the backend.- The current AI flow uses local Ollama rather than Gemini, so local Ollama must be running for AI features to work.
cd Paper_Path_Backend
npm run devThe backend will run on:
http://localhost:3001
Open a second terminal:
cd Paper_Path_Frontend
npm run devThe frontend will run on:
http://localhost:3000
The backend exposes the following API groups:
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/profile
GET /api/papersGET /api/papers/:paperIdPOST /api/papers/:paperId/askPOST /api/papers/upload
GET /api/users/libraryPOST /api/users/save/:paperIdPOST /api/users/history/:paperId
These routes are used by the React frontend through the API service layer.
- A user registers or logs in.
- The frontend fetches papers from the backend.
- The user can save papers and view reading history.
- The user can open a paper in the reader view.
- The AI tutor can answer questions based on paper content and retrieved context.
- Uploading a PDF or CSV stores the content in MongoDB and makes it searchable.
To deploy the frontend on Netlify, use the following settings:
- Base directory:
Paper_Path_Frontend - Build command:
npm run build - Publish directory:
dist - Functions directory: leave empty
Add this environment variable in Netlify:
VITE_API_BASE_URL=https://your-backend-domain.com/api
Replace your-backend-domain.com with the actual URL of your deployed backend.
The backend can be deployed on services such as:
- Render
- Railway
- Cyclic
- Fly.io
- VPS or cloud server
- Make sure MongoDB Atlas is reachable from the deployed backend.
- Set your environment variables securely in the hosting platform.
- If you deploy the backend, update the frontend environment variable to point to the new backend URL.
- If using a cloud deployment, ensure CORS is enabled correctly for your frontend domain.
- Check whether MongoDB is reachable.
- Confirm your
.envvalues are correct. - Make sure dependencies are installed.
- Verify
VITE_API_BASE_URLis set correctly. - Confirm the backend is actually running.
- Check for CORS issues if frontend and backend are on different domains.
- Ensure Ollama is installed and running.
- Verify the required models are downloaded.
- Check that the backend can reach
http://localhost:11434.
Possible enhancements for the project include:
- user profile customization,
- paper search and filtering improvements,
- full-text search and ranking,
- better AI summarization,
- admin dashboard for managing uploaded content,
- improved deployment automation with CI/CD.
This project was built as a full-stack academic paper learning application with a focus on accessibility, search, and AI-assisted learning.
Author and Creator : Karan Kumar Aditya Kushwaha