An open-source research platform that helps academics and curious minds search, map, and evaluate scientific literature with AI assistance. A Next.js web app sits on top of a Python/FastAPI engine that unifies multiple scholarly databases (ArXiv, OpenAlex, INSPIRE-HEP, NASA ADS) and modern AI models.
Live instance: https://metascience.fqxi.org
- π€ Assistant β a conversational research agent (Claude) that searches, builds citation networks, analyses trends, and assesses papers, rendering rich results inline.
- π Multi-source search β one query fans out to ArXiv, OpenAlex, INSPIRE-HEP, and NASA ADS, then results are deduplicated and reranked for relevance.
- πΈοΈ Citation networks β interactive citation graphs built on an OpenAlex identifier backbone, with Semantic Scholar / OpenCitations for citation data.
- π Trend analysis β theme clustering plus an AI-written synthesis of how a field is evolving.
- π Paper assessment β automated, peer-review-style scoring of an uploaded paper (Gemini), with per-criterion justifications.
- π§βπ» Public Developer API β generate an API key and call the same engines from your own projects (see Developer API).
βββββββββββββββββββββββββββ βββββββββββββββββββββββββββ
β frontend/ (Next.js 15) β HTTP β backend/ (FastAPI) β
β β’ App Router UI β ββββββΆ β β’ search orchestrator β
β β’ /api proxy routes β β β’ citation network β
β β’ /api/v1 public API β β β’ trends + clustering β
βββββββββββββ¬ββββββββββββββ β β’ AI paper review β
β βββββββββββββ¬ββββββββββββββ
β auth + per-user data β literature + AI
βΌ βΌ
ββββββββββββββββββββ ArXiv Β· OpenAlex Β· INSPIRE-HEP
β Supabase β NASA ADS Β· Semantic Scholar
β (Postgres+Auth) β Anthropic Claude Β· Google Gemini
ββββββββββββββββββββ
- Frontend (
/frontend) β Next.js 15 (App Router) + HeroUI/Tailwind. Hosts the UI, thin/apiproxy routes to the engine, and the public/api/v1Developer API. - Backend (
/backend) β Python/FastAPI engine that orchestrates the literature sources, citation-network builder, trend clustering, and AI review. - Supabase β authentication and per-user data (chat history, saved reviews, API keys, feedback) under row-level security.
- Node.js 18+ and pnpm (or npm)
- Python 3.11+ (3.13 supported)
- A Supabase project (free tier is fine)
- Anthropic API key (Assistant, query understanding, trends)
- Google AI API key (paper review + embeddings)
git clone https://github.com/Kernel-Science/Metascience_Platform.git
cd Metascience_Platformcd backend
python -m venv .venv
source .venv/bin/activate # Windows: .\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
cp .env.example .env # then edit .env (see table below)
uvicorn app.main:app --reload # http://localhost:8000In your Supabase project's SQL editor, run the migration files in
frontend/ (order doesn't matter, but run all four):
supabase_migration_feedback.sql
supabase_migration_chat.sql
supabase_migration_reviewer3.sql
supabase_migration_api_keys.sql
For profile avatars, create a public Storage bucket named avatars.
Enable the Email and (optionally) Google auth providers under Authentication > Providers.
cd frontend
pnpm install
cp .env.example .env.local # then edit .env.local (see table below)
pnpm dev # http://localhost:3000For production: pnpm build && pnpm start.
| Variable | Required | Purpose |
|---|---|---|
ANTHROPIC_API_KEY |
β | Claude β query understanding, trends, rerank fallback |
GOOGLE_API_KEY |
β | Gemini β paper review + embeddings |
ANTHROPIC_MODEL |
β | Override the Claude model (default claude-sonnet-4-6) |
GEMINI_REVIEW_MODEL |
β | Override the review model (default gemini-flash-latest) |
OPENALEX_MAILTO |
β | Email for OpenAlex's polite pool (higher rate limits) |
SEMANTIC_SCHOLAR_API_KEY |
β | Lifts Semantic Scholar rate limits |
ADS_API_TOKEN |
β | Enables the NASA ADS source |
RERANK_PROVIDER |
β | auto / google / anthropic / none |
REVIEWER3_API_KEY, REVIEWER3_USER_ID |
β | Optional Reviewer3 multi-reviewer integration |
| Variable | Required | Purpose |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL |
β | Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
β | Supabase anon key (auth) |
NEXT_PUBLIC_SITE_URL |
β | Base URL for auth callbacks (e.g. http://localhost:3000) |
NEXT_PUBLIC_BACKEND_URL |
β | FastAPI engine URL (e.g. http://localhost:8000) |
ANTHROPIC_API_KEY |
β | Assistant (chat) calls Claude from the Next.js server |
SUPABASE_SERVICE_ROLE_KEY |
β * | Server-only; verifies public API keys. Required only for the Developer API. |
Signed-in users can create API keys at /developer and call the platform's
engines over HTTP at https://<your-host>/api/v1:
| Endpoint | Method | Description |
|---|---|---|
/api/v1/search |
GET | Multi-source paper search |
/api/v1/citation-network |
POST | Build a citation graph from a DOI |
/api/v1/trends |
POST | Trend clustering + AI synthesis for a topic |
/api/v1/review |
POST | AI paper assessment (multipart file upload) |
Authenticate with Authorization: Bearer <key>. Full reference and code
samples live on the in-app Developer page. See
frontend/README.md for implementation details.
Metascience_Platform/
βββ frontend/ # Next.js web app
β βββ app/ # routes (research, citation, review, docs, developer, api)
β βββ components/ # UI components
β βββ lib/ # stores, supabase clients, api gateway helpers
β βββ supabase_migration_*.sql
βββ backend/ # FastAPI engine
β βββ app/
β βββ routes/ # HTTP endpoints
β βββ services/ # search, citations, trends, review, clustering, cache
βββ README.md
Contributions are welcome β see CONTRIBUTING.md and the Code of Conduct.
MIT.
To report a vulnerability, see the Security Policy.