Discover Unsolved Research Problems from Academic Papers
GapMiner is an AI-powered research tool that automatically extracts limitations, identifies research gaps, and helps researchers discover opportunities from academic papers. Powered by Firecrawl for web scraping and Google Gemini for intelligent analysis.
- Features
- Tech Stack
- Prerequisites
- Installation
- Environment Setup
- Database Setup
- Local Development
- Deployment
- Project Structure
- API Keys
- Troubleshooting
- Contributing
- License
- π Intelligent Web Scraping - Extract content from arXiv, OpenReview, ACL Anthology, and other academic sources
- π€ AI-Powered Gap Analysis - Leverage Google Gemini to identify research limitations and unsolved problems
- π Gap Categorization - Automatically classify gaps into data, compute, evaluation, and methodology types
- π Collections Management - Organize discovered gaps into custom collections
- π Secure Authentication - JWT auth through the backend API
- βοΈ Cloud Storage - Persist results in PostgreSQL through the backend API
- π¨ Modern UI - Beautiful, responsive interface with dark mode and smooth animations
| Category | Technologies |
|---|---|
| Frontend | React 19, TypeScript, Tailwind CSS 4, Framer Motion |
| Build Tool | Vite (Rolldown) |
| Backend Services | Express, PostgreSQL, JWT auth |
| AI/ML | Google Gemini 2.0 Flash |
| Web Scraping | Firecrawl API |
| Routing | React Router v7 |
| Icons | Lucide React |
Before you begin, ensure you have the following installed:
- Node.js β₯ 18.0.0
- npm β₯ 9.0.0 or pnpm β₯ 8.0.0
- A PostgreSQL database (postgresql.org)
- A Firecrawl API key (firecrawl.dev)
- A Google AI Studio API key (aistudio.google.com)
git clone https://github.com/yourusername/gapminer.git
cd gapminernpm installOr using pnpm:
pnpm installCopy the example environment file:
cp .env.example .envEdit .env with your credentials:
# Frontend API base URL
VITE_API_URL=http://localhost:3001/api
# Firecrawl API
VITE_FIRECRAWL_API_KEY=your_firecrawl_api_key
# Gemini API
VITE_GEMINI_API_KEY=your_gemini_api_key
# Server-only secrets are loaded by the backend from server/.env or the repo root .env
DATABASE_URL=postgresql://postgres:password@localhost:5432/gapminer
JWT_SECRET=replace-with-a-long-random-secret
REDIS_URL=redis://localhost:6379
β οΈ Important: Never commit your.envfile to version control. It's already included in.gitignore.
- Install PostgreSQL 14+ (https://www.postgresql.org/download/windows/)
- Create a
gapminerdatabase and a database user if needed. - Optional: install Redis if you plan to run the queue/cron workers locally.
cd C:\GAPFINDER\server
npm install
npm run db:setup:winOr, if PostgreSQL is already running and DATABASE_URL is set:
npm run db:setup:winnpm run db:migrate
npm run db:seedThe backend reads its database connection from DATABASE_URL in server/.env or the repo root .env:
DATABASE_URL=postgresql://postgres:password@localhost:5432/gapminerThe React app talks to the backend through VITE_API_URL and stores research data in PostgreSQL via the API.
There is no Firestore setup step for the core app flow.
β οΈ Important: Never commit your.envfile to version control. It's already included in.gitignore.
npm run devThe app will be available at http://localhost:5173
| Command | Description |
|---|---|
npm run dev |
Start development server with HMR |
npm run build |
Build for production |
npm run preview |
Preview production build locally |
npm run lint |
Run ESLint |
Vercel is the recommended platform for deploying GapMiner.
- Push your code to GitHub
- Go to Vercel and sign in
- Click "New Project"
- Import your GitHub repository
- Configure environment variables:
- Add all variables from
.env.example
- Add all variables from
- Click "Deploy"
# Install Vercel CLI
npm i -g vercel
# Login to Vercel
vercel login
# Deploy
vercel
# For production deployment
vercel --prodA vercel.json configuration file is already included in the project root:
{
"framework": "vite",
"buildCommand": "npm run build",
"outputDirectory": "dist",
"rewrites": [
{ "source": "/(.*)", "destination": "/index.html" }
]
}- Push your code to GitHub
- Go to Netlify and sign in
- Click "Add new site" > "Import an existing project"
- Connect to your GitHub repository
- Configure build settings:
- Build command:
npm run build - Publish directory:
dist
- Build command:
- Add environment variables in Site settings > Environment variables
- Click "Deploy site"
# Install Netlify CLI
npm i -g netlify-cli
# Login to Netlify
netlify login
# Initialize project
netlify init
# Deploy
netlify deploy --prodA netlify.toml configuration file is already included in the project root:
[build]
command = "npm run build"
publish = "dist"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200You can deploy the built frontend (dist/) to any static hosting provider that supports SPA rewrites, such as:
- Vercel
- Netlify
- Cloudflare Pages
- GitHub Pages with a client-side router fallback
Build the app with npm run build, then configure your host to serve dist/index.html for unknown routes.
gapminer/
βββ public/ # Static assets
β βββ vite.svg # Favicon
βββ src/
β βββ assets/ # Images and static files
β βββ components/ # React components
β β βββ layout/ # Layout components (Navbar, Footer, Sidebar)
β β βββ ui/ # UI components (Button, Modal, etc.)
β βββ context/ # React context providers
β β βββ AuthContext.tsx
β βββ lib/ # Utility libraries and services
β β βββ api.ts # Firecrawl & Gemini API integration
β β βββ firebase.ts # Legacy compatibility shim used by a few feature modules
β β βββ firestore.ts # Backend API-backed persistence helpers
β β βββ utils.ts # Utility functions
β βββ pages/ # Page components
β β βββ AssistantPage.tsx
β β βββ CollectionsPage.tsx
β β βββ CrawlPage.tsx
β β βββ DashboardPage.tsx
β β βββ ExplorePage.tsx
β β βββ HomePage.tsx
β β βββ InsightsPage.tsx
β βββ App.tsx # Main App component
β βββ index.css # Global styles
β βββ main.tsx # Entry point
β βββ vite-env.d.ts # Vite type declarations
βββ .env.example # Environment template
βββ .gitignore
βββ eslint.config.js # ESLint configuration
βββ index.html # HTML entry point
βββ package.json
βββ tsconfig.json # TypeScript configuration
βββ tsconfig.app.json
βββ tsconfig.node.json
βββ vite.config.ts # Vite configuration
- Go to Firecrawl
- Sign up or log in
- Navigate to Dashboard > API Keys
- Create a new API key
- Copy the key to
VITE_FIRECRAWL_API_KEY
- Go to Google AI Studio
- Sign in with your Google account
- Click "Get API Key"
- Create API key in a new or existing project
- Copy the key to
VITE_GEMINI_API_KEY
- Confirm
VITE_API_URLpoints to the backend API, for examplehttp://localhost:3001/api - Set
DATABASE_URLfor the PostgreSQL backend - Make sure
JWT_SECRETandGEMINI_API_KEYare set for server-side auth and analysis
Solution: Check the API auth configuration:
- Verify the backend is running on the URL in
VITE_API_URL - Clear stale access tokens from localStorage and sign in again
- Confirm
JWT_SECRETis consistent across backend restarts in the same environment
Solution: Verify your Firecrawl API key:
- Check that
VITE_FIRECRAWL_API_KEYis correctly set - Ensure the API key is active in your Firecrawl dashboard
- Check for any leading/trailing whitespace
Solution: Check the PostgreSQL connection:
- Verify
DATABASE_URLpoints at a reachable PostgreSQL instance - Run
npm run db:setup:winornpm run db:migratefromserver/ - Confirm the database has the
papers,gaps,collections, andapi_usage_logstables
Solution: Path aliases issue:
- Ensure
vite.config.tshas the@alias configured - Ensure
tsconfig.app.jsonhas matching paths configuration - Restart the dev server
Solution:
- Ensure all environment variables are set in the platform dashboard
- Check that Node.js version is 18 or higher
- Clear cache and redeploy
- Open an issue on GitHub Issues
- Check Vite documentation
- Check PostgreSQL documentation
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow TypeScript best practices
- Use functional components with hooks
- Write meaningful commit messages
- Update documentation as needed
- Test changes locally before submitting PR
This project is licensed under the MIT License - see the LICENSE file for details.
- Firecrawl for powerful web scraping
- Google Gemini for AI-powered analysis
- PostgreSQL for reliable data storage
- Vite for lightning-fast builds
- Tailwind CSS for utility-first styling
Made with β€οΈ by the GapMiner Team