RefNet is a comprehensive tool for searching research papers and visualizing their citation networks. It combines a powerful search interface with an interactive graph visualization and AI-powered analysis to help researchers explore academic literature and understand citation relationships.
- Cedar OS + Mastra Backend: Intelligent chat interface for paper analysis
- Smart Context: AI understands your selected papers and graph relationships
- Research Insights: Compare papers, identify patterns, and discover research gaps
- Real-time Analysis: Ask questions about your selected papers and get instant insights
- Search research papers by title, authors, topics, and keywords
- Filter results by publication date, citation count, and relevance
- Sort by most cited, relevance score, or publication date
- Paginated results with customizable page sizes
- Multiselect functionality - Select multiple papers to build combined citation networks
- Build citation networks from any research paper or multiple papers
- Interactive D3.js-powered graph with zoom, pan, and drag functionality
- Node selection and highlighting
- Timeline-based color coding
- Light grey/white lines for clean, academic appearance
- Export selected papers and graph data
- Responsive design that works on desktop and mobile
- Fast, modern React frontend
- Real-time API integration
- Intuitive user experience
- Python 3.8+ (for search API)
- Node.js 18+ (for Cedar OS + Mastra)
- npm or yarn
- OpenAI API key
-
Set your OpenAI API key:
export OPENAI_API_KEY='your-openai-api-key-here'
-
Start all services:
./start_cedar_mastra.sh
This will start:
- Flask search API on
http://localhost:8000
- Mastra AI backend on
http://localhost:4111
- React frontend on
http://localhost:3000
- Flask search API on
If you prefer to start services manually:
-
Start Flask search API:
python app.py
-
Start Mastra AI backend:
cd mastra-backend npm start
-
Start React frontend:
cd refnet/frontend npm start
To build the frontend for production:
cd refnet/frontend
npm run build
The built files will be in refnet/frontend/build/
and will be automatically served by the Flask backend.
-
Search Papers: Use the landing page to search for research papers by entering keywords, author names, or topics.
-
Select Papers:
- Use checkboxes to select multiple papers from search results
- Click "Build Graph" to create a combined citation network from all selected papers
- Or click "View Graph" on individual papers for single-paper networks
-
Explore Network:
- Click and drag nodes to rearrange the graph
- Click nodes to select/deselect them
- Use the controls to adjust graph parameters (iterations, limits)
- Export selected papers as JSON
-
AI Analysis:
- Click the chat button to open the AI research assistant
- Ask questions about your selected papers
- Get intelligent insights, comparisons, and research recommendations
- The AI understands your paper context and graph relationships
-
Navigate: Use the back button to return to search results or start a new search.
GET /api/search?q=query&page=1&per_page=25&sort=cited_by_count
- Search papers
GET /api/paper/{paper_id}
- Get paper detailsGET /api/paper/{paper_id}/citations
- Get paper citationsGET /api/paper/{paper_id}/references
- Get paper references
GET /api/graph/{paper_id}?iterations=3&cited_limit=5&ref_limit=5
- Build citation graph from single paperPOST /api/graph/multiple
- Build graph from multiple papers (multiselect)GET /api/graph/data
- Get current graph dataPOST /api/graph/clear
- Clear current graph
RefNet/
├── app.py # Flask search API entry point
├── config.py # Configuration settings
├── requirements.txt # Python dependencies
├── mastra-backend/ # Mastra AI backend
│ ├── server.js # AI agent server
│ └── package.json # Backend dependencies
├── refnet/
│ ├── api/ # API route blueprints
│ ├── models/ # Data models
│ ├── services/ # Business logic services
│ ├── utils/ # Utility functions
│ └── frontend/ # Cedar OS React frontend
│ ├── src/
│ │ ├── components/
│ │ │ └── FloatingCedarChat.js # AI chat interface
│ │ ├── cedar/ # Cedar OS configuration
│ │ └── ...
│ ├── public/
│ └── package.json
├── start_cedar_mastra.sh # Startup script
└── README.md
- Flask: Search API framework
- Mastra: AI agent orchestration
- OpenAI GPT-4o: Research analysis AI
- OpenAlex API: Research paper data source
- NetworkX: Graph analysis
- Flask-CORS: Cross-origin resource sharing
- Cedar OS: AI-powered chat interface
- React 18: UI framework
- React Router: Client-side routing
- D3.js: Graph visualization
- Axios: HTTP client
- Tailwind CSS: Styling
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.