Your AI-Powered Research Companion - A MERN stack application to help you read and understand research papers.
- Firebase Authentication - Sign in with Google or Email/Password
- Paper Library - Upload, view, and manage your research papers
- PDF Viewer - Read papers directly in the browser with zoom controls
- AI-Generated Summaries - Get instant AI-powered summaries of your papers
- Smart Chatbot - Ask questions about your papers with context-aware AI
- Notes Panel - Take and save notes while reading, with auto-save
- React 19 with TypeScript
- TanStack Router for routing
- Tailwind CSS v4 for styling
- shadcn/ui for UI components
- Axios for API calls
- react-pdf for PDF viewing
- Firebase Auth for authentication
- Node.js with Express v5
- MongoDB with Mongoose
- Firebase Admin SDK
- OpenAI API for AI features
- pdf-parse for text extraction
- Node.js 18+
- pnpm package manager
- MongoDB (local or Atlas)
- Firebase project
- OpenAI API key
cd researchlyassist
pnpm install- Create a new Firebase project at Firebase Console
- Enable Authentication with Google and Email/Password providers
- Create a Cloud Storage bucket
- Download the service account key (Project Settings > Service Accounts > Generate New Private Key)
Create server/.env:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/researchly-assist
OPENAI_API_KEY=your_openai_api_key
# Firebase Admin SDK
FIREBASE_PROJECT_ID=your_project_id
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
FIREBASE_CLIENT_EMAIL=firebase-adminsdk-xxxxx@your_project_id.iam.gserviceaccount.com
FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com
# Supabase Storage (for paper PDFs)
SUPABASE_URL=https://your_project.supabase.co
SUPABASE_SECRET_KEY=sb_secret_...Create client/.env:
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_idCreate a cors.json file:
[
{
"origin": ["http://localhost:3000"],
"method": ["GET"],
"maxAgeSeconds": 3600
}
]Apply it using gsutil:
gsutil cors set cors.json gs://your_project_id.appspot.com- Create a Supabase project at Supabase Dashboard
- Get your Project URL and Secret key:
- In the dashboard, select your project from the sidebar
- Click the Connect button (or go to Project Settings → API)
- Project URL: In the "Project URL" field (format:
https://xxxxxxxxxx.supabase.co) - Secret key: Go to Settings → API Keys, open the API Keys tab (not Legacy), create or copy a Secret key (
sb_secret_...)
- Add to
server/.env:SUPABASE_URL=https://xxxxxxxxxx.supabase.co SUPABASE_SECRET_KEY=sb_secret_... - The
papersbucket is created automatically on first upload or when running the migration script
If you have existing papers in Cloudinary, run the migration script (ensure both Cloudinary and Supabase env vars are set):
cd server
pnpm run migrate:cloudinary-to-supabase# Run both frontend and backend
pnpm dev
# Or run separately
pnpm dev:server # Backend on port 5000
pnpm dev:client # Frontend on port 3000researchlyassist/
├── client/ # React frontend
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── contexts/ # React contexts
│ │ ├── lib/ # Utilities and API
│ │ └── routes/ # TanStack Router pages
│ └── package.json
├── server/ # Express backend
│ ├── src/
│ │ ├── config/ # Firebase config
│ │ ├── middleware/ # Auth middleware
│ │ ├── models/ # Mongoose models
│ │ └── routes/ # API routes
│ └── package.json
├── package.json # Workspace root
└── pnpm-workspace.yaml
GET /api/papers- Get all papers for authenticated userGET /api/papers/:id- Get a specific paperPOST /api/papers/upload- Upload a new paperDELETE /api/papers/:id- Delete a paper
POST /api/ai/summary/:paperId- Generate AI summaryPOST /api/ai/chat/:paperId- Chat about a paper
GET /api/notes/:paperId- Get notes for a paperPUT /api/notes/:paperId- Update notes
MIT