Your intelligent research copilot, built to streamline and accelerate the research process with AI-powered assistance.
ScholarAI is a modular and scalable research assistant platform designed to automate time-consuming research tasks. It combines traditional backend services with AI agents for an efficient and intuitive experience.
This repository serves as the central hub. Use the links below to explore the different modules of ScholarAI.
| Module | Description | Tech Stack |
|---|---|---|
π ScholarAI-Backend-Springboot |
Core backend services β user auth, document & library management | Java, Spring Boot |
π ScholarAI-Backend-FastAPI |
AI Agents for summarization, web scraping, gap analysis | Python, FastAPI |
π ScholarAI-Frontend |
Web client with interactive UI and research workflows | Next.js, Tailwind CSS, TypeScript |
π ScholarAI-Docs |
Developer & user documentation, API reference, onboarding | Markdown, Docsify, mkdocs |
π ScholarAI |
π‘ You're here! This is the root overview repository. |
- π JWT-based Authentication & Authorization with Google/GitHub OAuth
- π Document Upload, Tagging, Library Search with Backblaze B2 Storage
- β Research Task & To-Do Tracker with Reading Lists
- π AI Summarization & Gap Analysis with Multi-Agent Processing
- π Paper Analysis with Academic Search Integration
- π Multi-Source Academic Search (ArXiv, PubMed, Semantic Scholar, etc.)
- π‘ PDF Processing and Text Extraction
- π Asynchronous Task Processing via RabbitMQ
Before setting up ScholarAI, ensure you have the following installed:
- Docker & Docker Compose (v2.0+)
- Git
- Node.js (v20+) for frontend development
- Java 21 for Spring Boot development
- Python 3.10+ with Poetry for FastAPI development
Each service requires a .env file. Copy the example files and configure them:
# Clone the main repository
git clone https://github.com/Tasriad/ScholarAI
cd ScholarAI
# Clone all sub-repositories
git clone https://github.com/Tasriad/ScholarAI-Backend-Springboot
git clone https://github.com/Tasriad/ScholarAI-Backend-FastAPI
git clone https://github.com/Tasriad/ScholarAI-Frontend
# Set up environment files
cp ScholarAI-Backend-Springboot/.env.example ScholarAI-Backend-Springboot/.env
cp ScholarAI-Backend-FastAPI/env.example ScholarAI-Backend-FastAPI/.env
cp ScholarAI-Frontend/env.example ScholarAI-Frontend/.env.local# Database Configuration
CORE_DB_USER=scholar_user
CORE_DB_PASSWORD=your_secure_password
CORE_DB_HOST=core-db
CORE_DB_NAME=coreDB
PAPER_DB_USER=paper_user
PAPER_DB_PASSWORD=your_secure_password
PAPER_DB_HOST=paper-db
PAPER_DB_NAME=paperDB
# RabbitMQ
RABBITMQ_USER=scholar_user
RABBITMQ_PASSWORD=your_secure_password
# Redis
REDIS_PASSWORD=your_secure_password
# JWT Configuration
JWT_SECRET=your_very_long_and_secure_jwt_secret_key_here
JWT_ACCESS_EXPIRATION_MS=900000
JWT_REFRESH_EXPIRATION_MS=604800000
# OAuth
SPRING_GOOGLE_CLIENT_ID=your_google_client_id
SPRING_GOOGLE_CLIENT_SECRET=your_google_client_secret
SPRING_GITHUB_CLIENT_ID=your_github_client_id
SPRING_GITHUB_CLIENT_SECRET=your_github_client_secret
# Environment
ENV=dev# RabbitMQ
RABBITMQ_USER=scholar_user
RABBITMQ_PASSWORD=your_secure_password
# Academic APIs
CORE_API_KEY=your_core_api_key
UNPAYWALL_EMAIL=your.email@example.com
# PDF Storage (Backblaze B2)
B2_KEY_ID=your_b2_key_id
B2_APPLICATION_KEY=your_b2_application_key
B2_BUCKET_NAME=scholar-ai-papers
# Log Level
LOG_LEVEL=infoNEXT_PUBLIC_DEV_API_URL=http://localhost:8080
NEXT_PUBLIC_DOCKER_BACKEND_URL=http://docker-core-app-1:8080
NEXT_PUBLIC_API_BASE_URL=http://localhost:8080
NEXT_PUBLIC_GOOGLE_CLIENT_ID=your_google_client_id
NEXT_PUBLIC_GITHUB_CLIENT_ID=your_github_client_id
# PDF Storage
B2_KEY_ID=your_b2_key_id
B2_APPLICATION_KEY=your_b2_application_key
B2_BUCKET_NAME=scholar-ai-papers
# Environment
NEXT_PUBLIC_ENV=dev
ENV=dev- Start Core Infrastructure (Spring Boot):
cd ScholarAI-Backend-Springboot
./scripts/docker.sh build
./scripts/docker.sh startThis starts:
- PostgreSQL (Core DB):
localhost:5433 - PostgreSQL (Paper DB):
localhost:5434 - RabbitMQ:
localhost:5672(Management UI:localhost:15672) - Redis:
localhost:6379 - Spring Boot API:
localhost:8080
- Start FastAPI Service:
cd ../ScholarAI-Backend-FastAPI
./scripts/docker.sh build
./scripts/docker.sh startThis starts:
- FastAPI Service:
localhost:8000
- Start Frontend:
cd ../ScholarAI-Frontend
./scripts/docker.sh build
./scripts/docker.sh startThis starts:
- Next.js Frontend:
localhost:3000
Each service can be managed independently:
# Spring Boot Backend
cd ScholarAI-Backend-Springboot
./scripts/docker.sh build # Build image
./scripts/docker.sh start-svc # Start only infrastructure services
./scripts/docker.sh start-app # Start only the application
./scripts/docker.sh stop # Stop everything
# FastAPI Backend
cd ScholarAI-Backend-FastAPI
./scripts/docker.sh build # Build image
./scripts/docker.sh start # Start service
./scripts/docker.sh stop # Stop service
./scripts/docker.sh logs # View logs
# Frontend
cd ScholarAI-Frontend
./scripts/docker.sh build # Build image
./scripts/docker.sh start # Start service
./scripts/docker.sh stop # Stop servicecd ScholarAI-Backend-Springboot
# Install dependencies and build
./mvnw clean install
# Run tests
./mvnw test
# Start application (requires infrastructure services running)
./mvnw spring-boot:run
# Or use the helper script
./scripts/local.sh build # Build JAR
./scripts/local.sh test # Run tests
./scripts/local.sh run # Run applicationcd ScholarAI-Backend-FastAPI
# Install dependencies
poetry install
# Set up environment
cp env.example .env
# Edit .env with your configuration
# Run application
poetry run uvicorn app.main:app --reload --port 8000
# Run tests
poetry run pytest
# Code formatting
poetry run black .
poetry run isort .
poetry run flake8cd ScholarAI-Frontend
# Install dependencies
npm install
# Set up environment
cp env.example .env.local
# Edit .env.local with your configuration
# Run development server
npm run dev
# Build for production
npm run build
# Run tests
npm run test # Unit tests
npm run test:e2e # E2E tests
npm run test:all # All tests- Frontend (Next.js) β HTTP requests β Spring Boot API
- Spring Boot β RabbitMQ messages β FastAPI AI Agents
- FastAPI β Academic APIs + PDF Processing + B2 Storage
- FastAPI β RabbitMQ results β Spring Boot
- Spring Boot β Database updates + Frontend notifications
- PostgreSQL: Core data (users, projects, notes) + Paper metadata
- RabbitMQ: Async message queue between Spring Boot β FastAPI
- Redis: Session storage and caching
- Backblaze B2: PDF file storage
- Academic APIs: ArXiv, PubMed, Semantic Scholar, OpenAlex, etc.
# Spring Boot
cd ScholarAI-Backend-Springboot
./mvnw test
./mvnw jacoco:report # Coverage report
# FastAPI
cd ScholarAI-Backend-FastAPI
poetry run pytest
poetry run pytest tests/integration_test.py # Integration testscd ScholarAI-Frontend
npm run test # Jest unit tests
npm run test:e2e # Playwright E2E testsScholarAI is deployed on Azure VM with CI/CD pipeline:
- Frontend: http://4.247.29.26:3000
- Spring Boot API: http://4.247.29.26:8080
- FastAPI Service: http://4.247.29.26:8000
- Spring Boot API:
http://4.247.29.26:8080/swagger-ui.html| Local - FastAPI Docs:
http://4.247.29.26:8000/docs| Local - RabbitMQ Management:
http://localhost:15672(guest/guest) - Local only
The project includes automated deployment using:
- Azure DevOps: Continuous integration and deployment
- Docker: Containerized deployment
- Azure VM: Production hosting environment
- Infrastructure as Code: Automated provisioning and configuration
- Keep your
.envfiles secure and never commit them to version control - Use strong passwords for all services (minimum 16 characters)
- Regularly rotate API keys and passwords
- Set up OAuth applications for Google/GitHub authentication
- Configure Backblaze B2 with appropriate bucket permissions
- Port conflicts: Ensure ports 3000, 8000, 8080, 5432, 5672, 6379, 15672 are available
- Environment variables: Double-check all required variables are set
- Docker network: Services communicate via
docker_scholar-network - Database connections: Wait for health checks to pass before starting dependent services
- Spring Boot:
http://localhost:8080/actuator/health - FastAPI:
http://localhost:8000/health - Frontend:
http://localhost:3000
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and formatting
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.