An open API service indexing awesome lists of open source software.

https://github.com/atik203/scholar-flow

ScholarFlow is a SaaS platform designed for researchers, students, professors, and academic teams to Upload, organize, and review research papers with collections, annotations, search, and team collaboration in a shared research library
https://github.com/atik203/scholar-flow

aws-s3 cloudflare-r2 expressjs next-auth nextjs postgresql prisma-orm redux research-papers rtk-query semantic-search stripe tailwindcss turborepo typescript

Last synced: 9 days ago
JSON representation

ScholarFlow is a SaaS platform designed for researchers, students, professors, and academic teams to Upload, organize, and review research papers with collections, annotations, search, and team collaboration in a shared research library

Awesome Lists containing this project

README

          

# ScholarFlow

> **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.

[![Version](https://img.shields.io/badge/version-1.1.8-blue)](./docs/Release.md)
[![License](https://img.shields.io/badge/license-Apache%202.0-green)](./LICENSE.md)
[![TypeScript](https://img.shields.io/badge/TypeScript-100%25-blue)](https://www.typescriptlang.org/)
[![Next.js](https://img.shields.io/badge/Next.js-15-black)](https://nextjs.org/)
[![Express](https://img.shields.io/badge/Express-Node.js-green)](https://expressjs.com/)

## πŸš€ Live Demo

- **Frontend**: [ScholarFlow App](https://scholar-flow-ai.vercel.app)
- **API**: [Backend API](https://scholar-flow-api.vercel.app/api/health)

## ✨ Features

### οΏ½ Rich Text Editing & Paper Management

- **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

### οΏ½ Sharing & Collaboration

- **Email Sharing**: Share papers via email with permission management (view/edit)
- **Workspace Collaboration**: Invite users to collections and workspaces with role-based access

- **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

### 🎯 Modern UI/UX

- **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

### οΏ½ Billing & Subscription

- **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

### οΏ½πŸ”§ Admin Dashboard & System Monitoring

- **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

### πŸ—οΈ Production-Ready Infrastructure

- **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

## πŸ› οΈ Technology Stack

### Frontend

- **Framework**: Next.js 15 with App Router
- **Language**: TypeScript
- **Styling**: Tailwind CSS + ShadCN UI
- **State Management**: Redux Toolkit Query
- **Forms**: React Hook Form + Zod validation
- **Authentication**: NextAuth.js

### Backend

- **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

### DevOps & Tools

- **Package Manager**: Yarn Berry (v4)
- **Monorepo**: Turborepo for build optimization
- **Database**: PostgreSQL with pgvector (AI-ready)
- **Deployment**: Vercel (Frontend) + Railway/Render (Backend)
- **Monitoring**: Health checks and performance tracking

## πŸ“ Project Structure

```text
Scholar-Flow/
β”œβ”€β”€ apps/
β”‚ β”œβ”€β”€ frontend/ # Next.js 15 application
β”‚ β”‚ β”œβ”€β”€ src/app/ # App Router pages
β”‚ β”‚ β”œβ”€β”€ components/ # Reusable UI components
β”‚ β”‚ β”œβ”€β”€ lib/ # Utilities and configurations
β”‚ β”‚ └── redux/ # State management
β”‚ └── backend/ # Express.js API server
β”‚ β”œβ”€β”€ src/app/ # Application logic
β”‚ β”œβ”€β”€ prisma/ # Database schema and migrations
β”‚ └── scripts/ # Utility scripts
β”œβ”€β”€ docs/ # Project documentation
β”œβ”€β”€ .github/ # GitHub workflows and templates
└── .cursor/ # Development rules and guidelines
```

## πŸš€ Quick Start

### Prerequisites

- Node.js 18+
- PostgreSQL 15+
- Yarn Berry (v4)
- AWS S3 account (for file storage)

### Installation

1. **Clone the repository**

```bash
git clone https://github.com/Atik203/Scholar-Flow.git
cd Scholar-Flow
```

2. **Install dependencies**

```bash
yarn install
```

3. **Set up environment variables**

```bash
# Copy environment templates
cp apps/frontend/.env.example apps/frontend/.env.local
cp apps/backend/.env.example apps/backend/.env

# Edit the .env files with your configurations
```

4. **Set up the database**

```bash
yarn db:migrate
yarn db:generate
```

5. **Start development servers**

```bash
yarn dev:turbo
```

The application will be available at:
- Frontend: [http://localhost:3000](http://localhost:3000)
- Backend: [http://localhost:5000](http://localhost:5000)

## πŸ”§ Development Commands

```bash
# 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 reset # Reset node_modules and rebuild
```

### Content Management & Editing

- βœ… **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 & Security

- βœ… **Authentication System**: Google/GitHub OAuth + email/password
- βœ… **Production Security**: Rate limiting, monitoring, error handling, admin-only access

### Paper Management

- βœ… **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

### Admin & System Monitoring

- βœ… **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

### User Experience

- βœ… **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

## πŸ“š Documentation

- [**API Documentation**](./docs/API.md) - Complete API reference
- [**UI Design System**](./docs/UI_DESIGN.md) - Component guidelines
- [**Development Guide**](./docs/DEVELOPMENT.md) - Setup and contribution guide

- [**Release Notes**](./docs/Release.md) - Version history and changes
- [**Roadmap**](./Roadmap.md) - Feature development timeline

## 🀝 Contributing

We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## πŸ§ͺ Testing

```bash
# Run all tests
yarn test

# Run tests with coverage
yarn test:coverage

# Run integration tests
yarn test:integration

# Run frontend tests
yarn test:frontend

# Run backend tests
yarn test:backend
```

## πŸ“„ License

This project is licensed under the Apache License 2.0 - see the [LICENSE.md](./LICENSE.md) file for details.

## πŸ™ Acknowledgments

- [Next.js](https://nextjs.org/) for the amazing React framework
- [Prisma](https://prisma.io/) for the excellent database toolkit
- [ShadCN UI](https://ui.shadcn.com/) for beautiful component library
- [Vercel](https://vercel.com/) for seamless deployment

## πŸ“ž Support

- **Issues**: [GitHub Issues](https://github.com/Atik203/Scholar-Flow/issues)
- **Discussions**: [GitHub Discussions](https://github.com/Atik203/Scholar-Flow/discussions)
- **Email**: [atikurrahaman0305@gmail.com](mailto:atikurrahaman0305@gmail.com)

---

⭐ **Star this repository** if you find it helpful!