AI-Powered Research Paper Collaboration Hub
ScholarFlow is a modern research paper management and collaboration platform designed to streamline academic workflows. Upload, organize, search, and collaborate on research papers with AI-powered insights and smart organization features.
Note on licensing: The project
package.jsondeclares"license": "UNLICENSED". See LICENSE.md for details.
- 1.3.1 (2026-06-28) β AI architecture overhaul: context persistence, metadata generation, context-aware chat, inline paper Q&A, token optimization, Vercel crash fix (uuid ESM + outputDirectory). See CHANGELOG.md.
- 1.3.0-rc1 (2026-10-01) β Phase 10: AI assistant, WebSocket collab, editor templates, paper upload/import overhaul, smart URL import (IEEE/ResearchGate/Google Scholar/Semantic Scholar). See CHANGELOG.md.
- 1.2.9 β Phase 9: WCAG 2.1 AA, code splitting, 8 final pages, invitation backend.
- 1.2.8 β Phase 8: Architecture stabilization, 14 new pages, removed dead code.
- Frontend: ScholarFlow App
- API: Backend API
- Rich Text Editor: Full-featured TipTap-based editor for research papers with advanced formatting, tables, lists, and more
- Auto-save & Drafts: Debounced auto-save, manual save, and draft/publish workflow with real-time status
- Export to PDF/DOCX: One-click export with embedded images and professional styling
- Image Upload: Drag-and-drop or paste images directly into the editor, with S3 storage and resizing
- Smart Upload: Drag-and-drop PDF upload with automatic metadata extraction
- AI Metadata: Automatic title, author, and abstract extraction from PDFs
- Advanced Search: Full-text search with filters (author, date, type, keywords)
- PDF Preview: Secure in-app PDF viewer with responsive design
- Email Sharing: Share papers via email with permission management (view/edit)
- Workspace Collaboration: Invite users to collections and workspaces with role-based access
- Real-Time Collaboration: WebSocket-powered co-editing with Y.js, cursor presence, live discussion chat with typing indicators
- Global AI Assistant: Floating chat widget (Cmd+J) with markdown rendering, code highlighting, 4 providers (OpenAI/Gemini/Claude/DeepSeek)
- AI Paper Tools: Key Points extraction, Rewriter, Comparator, Literature Review, Translator
- AI Summarizer: One-click paper summaries with configurable tone, audience, and word limits
- Semantic Search: pgvector-powered meaning search across all papers
- AI Metadata: Automatic title, author, abstract extraction from PDFs
-
TipTap Editor: Full-featured with LaTeX math (KaTeX), citations, 7 paper templates (IEEE/ACM/Springer/arXiv)
-
Version History: Auto-snapshot before save, keep 50 versions, restore any version
-
Word Count + Reading Time: Live stats in editor status bar
-
Full-Screen Mode: Distraction-free writing with Esc to exit
-
Image Upload: Drag-and-drop with alignment, captions, text wrap
-
Export: PDF, DOCX, Markdown with one click
-
Multiple Auth Options: Google OAuth, GitHub OAuth, and email/password
-
Secure Sessions: JWT-based authentication with refresh tokens
-
Password Recovery: Secure password reset with email verification
-
Production Security: Rate limiting, input sanitization, CORS protection
- Responsive Design: Mobile-first design with Tailwind CSS
- Interactive Dashboard: Quick access to papers, search, and collections
- Real-time Feedback: Loading states, error handling, and success notifications
- Accessibility: WCAG compliant with keyboard navigation support
- Stripe Checkout: Upgrade workspaces through secure hosted checkout with plan-aware metadata
- Customer Portal Access: Manage billing details, cancel, or reactivate subscriptions from Stripe without support tickets
- Real-Time Sync: Webhook-driven role updates keep dashboard permissions aligned with subscription status
- Billing Dashboard Entry: Dedicated navigation item and refreshed auth session to surface plan changes instantly
- Real-Time System Metrics: Live monitoring with 10-second auto-refresh for CPU, memory, storage, and database
- Accurate CPU Tracking: Intelligent CPU usage calculation using idle/total times from Node.js os module
- Smart Storage Analytics: Dynamic storage estimation based on actual database usage with realistic percentages
- Health Status Dashboard: Comprehensive health cards (Database/Server/Storage/CPU) with automatic status classification
- Performance Visualization: Auto-colored progress bars that adapt based on metric values (greenβblueβyellowβred)
- System Information Panel: Real-time platform, Node.js version, database version, memory, and uptime display
- Production-Grade Architecture: HTTP caching, rate limiting, admin-only access, lazy loading with code splitting
- Performance Monitoring: Response time tracking and health checks
- Error Handling: Comprehensive error boundaries and retry logic
- Database Optimization: Composite indexes and query optimization
- Scalable Architecture: Microservices-ready with clean separation
- Framework: Next.js 16 with App Router
- Language: TypeScript
- Styling: Tailwind CSS + ShadCN UI
- State Management: Redux Toolkit Query
- Forms: React Hook Form + Zod validation
- Authentication: better-auth (Google OAuth, GitHub OAuth, email/password)
- Runtime: Node.js with Express.js
- Language: TypeScript
- Database: PostgreSQL with Prisma ORM
- Storage: AWS S3 for file management
- Authentication: JWT + bcrypt
- Validation: Zod schemas
- Package Manager: Yarn Berry (v4.9.2)
- Monorepo: Turborepo for build optimization
- Database: PostgreSQL with pgvector (AI-ready)
- Deployment: Vercel (Frontend + REST API) + Render (WebSocket)
- Monitoring: Health checks and performance tracking
Scholar-Flow/
βββ apps/
β βββ frontend/ # Next.js 16 application (port 3000)
β β βββ src/app/ # App Router pages
β β βββ components/ # Reusable UI components
β β βββ lib/ # Utilities and configurations
β β βββ redux/ # RTK Query state management
β βββ backend/ # Express.js REST API (port 5000)
β β βββ src/app/ # Application logic
β β βββ prisma/ # Database schema and migrations
β β βββ scripts/ # Utility scripts
β βββ socket-server/ # Socket.io real-time server (port 5001)
βββ docs/ # Project documentation
βββ .github/ # GitHub workflows and templates
βββ .cursor/ # Development rules and guidelines
- Node.js 24+ (check with
node --version) - Yarn Berry v4.9.2+ (check with
yarn --version) - PostgreSQL 15+ with pgvector extension
- AWS S3 account (for file storage β optional for local dev without uploads)
-
Clone the repository
git clone https://github.com/Atik203/Scholar-Flow.git cd Scholar-Flow -
Set up environment variables
# Copy environment templates cp apps/frontend/.env.example apps/frontend/.env.local cp apps/backend/.env.example apps/backend/.env cp apps/socket-server/.env.example apps/socket-server/.env # Edit the .env files with your configurations
-
Install dependencies, generate Prisma client, and build
yarn setup
This runs
yarn installfollowed byprisma generate --sqlin one step. -
Set up the database
yarn db:migrate yarn db:seed
-
Start development servers
yarn dev:turbo
The application will be available at:
- Frontend: http://localhost:3000
- Backend: http://localhost:5000
- WebSocket: http://localhost:5001
# Development
yarn dev:turbo # Start both frontend and backend
yarn dev:frontend # Start only frontend
yarn dev:backend # Start only backend
# Database
yarn db:migrate # Run database migrations
yarn db:generate # Generate Prisma client
yarn db:studio # Open Prisma Studio
yarn db:seed # Seed database with sample data
# Quality Assurance
yarn lint # Run ESLint
yarn type-check # TypeScript compilation check
yarn test # Run test suite
yarn build # Production build
# Utilities
yarn clean # Clean build artifacts
yarn setup:clean # Full clean reinstall (clean β install β generate)- β Rich Text Editor: TipTap-based, with advanced formatting, tables, lists, and image upload
- β Auto-save & Drafts: Debounced auto-save, manual save, and draft/publish workflow
- β Export to PDF/DOCX: One-click export with embedded images and professional styling
- β Image Upload: Drag-and-drop or paste images, S3 storage, resizing
- β Email Sharing: Share papers via email with permission management
- β Authentication System: Google/GitHub OAuth + email/password
- β Production Security: Rate limiting, monitoring, error handling, admin-only access
- β Paper Upload: Multi-file drag-and-drop with S3 storage
- β Metadata Extraction: AI-powered title, author, abstract extraction
- β Advanced Search: Full-text search with comprehensive filters
- β PDF Preview: Secure iframe-based PDF viewer
- β Real-Time System Metrics: Live CPU, memory, storage, database monitoring with 10s auto-refresh
- β Accurate CPU Tracking: Intelligent calculation using Node.js os module (idle/total times)
- β Smart Storage Analytics: Dynamic estimation (10x usage, min 100GB) for realistic percentages
- β Health Dashboard: Auto-classified status cards (healthy/degraded/unhealthy/warning/critical)
- β Performance Visualization: Auto-colored bars (greenβblueβyellowβred based on values)
- β System Information: Real-time platform, versions, memory, uptime display
- β Dashboard: Quick access and navigation with role-based routing
- β Responsive UI: Mobile-first design with modern components
- β Lazy Loading: Code splitting with React.lazy and Suspense boundaries
- Changelog - Version history and release notes
- Roadmap - Phase-by-phase implementation plan and current status
- Quickstart - Get running in 5 minutes (start here if new)
- Setup Guide - Detailed environment setup and architecture
- Environment Variables - All env vars explained
- Development Guide - Day-to-day development workflow
- Database Setup - PostgreSQL, pgvector, and Prisma guide
- Redis Setup - Redis configuration for background jobs
- Deployment Guide - Deploy to Vercel + Render / Oracle Cloud
- Branch Flow - Git branching strategy (atik β dev β main)
- Database Schema - ERD and relational schema reference
- Testing Guide - How to run and write tests
- API Reference - Live Swagger UI when backend is running
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
# Run all tests (via Turborepo)
yarn test
# Run frontend tests only
yarn workspace @scholar-flow/frontend test
# Run backend tests only
yarn workspace @scholar-flow/backend test
# Watch mode (frontend)
yarn workspace @scholar-flow/frontend test:watchThis project is UNLICENSED β see the LICENSE.md file for details. All rights reserved by the project maintainer unless otherwise stated.
- Next.js for the amazing React framework
- Prisma for the excellent database toolkit
- ShadCN UI for beautiful component library
- Vercel for seamless deployment
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
β Star this repository if you find it helpful!