An intelligent AI-powered interface for exploring and understanding arXiv research papers
- Node.js 18+
- npm, yarn, or pnpm
- Google Gemini API key (Get one here)
-
Clone the repository
git clone [email protected]:montanaflynn/asxiv.git cd asxiv
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env.local
Add your Gemini API key to
.env.local:GEMINI_API_KEY=your_api_key_here
-
Start the development server
npm run dev
-
Open the website
Visit the homepage at http://localhost:3000
# Required
GEMINI_API_KEY=your_gemini_api_key
# Optional
GEMINI_MODEL=gemini-2.5-flash-liteAvailable Gemini Models:
gemini-2.5-flash-lite- Fastest, lowest cost (default)gemini-2.5-flash- Balanced speed and performancegemini-2.5-pro- Highest quality, slower, more expensive
src/
├── components/
│ ├── ChatWidget.tsx # Main chat interface
│ └── ChatWidget.module.css
├── pages/
│ ├── api/
│ │ └── chat.ts # Gemini API integration
│ ├── pdf/
│ │ └── [...arxivId].tsx # Dynamic PDF viewer pages (supports ArXiv IDs with forward slashes)
│ └── index.tsx # Homepage
└── styles/
└── globals.css # Global styles
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
- PDF processing enhancements in
/api/chat.ts - UI improvements in
ChatWidget.tsx - Styling updates in CSS modules
- New page types in
/pages/pdf/
The AI uses a standardized format for page references: (page N) where N is the page number. These are automatically converted to clickable links that navigate the PDF viewer. This simple format avoids complex regex parsing while maintaining clean functionality.
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests if applicable
- 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 meaningful commit messages
- Add comments for complex logic
- Test your changes thoroughly
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
- arXiv for providing open access to research papers
- Google Gemini for powerful AI capabilities
- PDF.js for excellent PDF rendering
- Next.js for the amazing React framework
Making academic papers more accessible through AI