ArXiv explorer is a chrome extension that allows you to get a highl-evel overview of a research paper on arxiv.org. It provides a summary of the paper, explanations of the key concepts, and suggestions for further reading. It is built using generative AI and is designed to help researchers and students quickly understand the key points of a paper without having to read the entire document.
Current features include:
- It uses generative AI to provide summaries and explanations of the papers.
- Provides suggestions for new unexplored ideas.
- Generates a list of related documents to read to better understand the paper.
The code is structured as a typescript monorepo using yarn workspaces. This allows us to share code between the different packages and makes it easier to manage dependencies. Below is a brief overview of the packages in the monorepo:
flowchart TB
subgraph Client
CE[Chrome Extension]
CE-->|1 Authorize|Cog[Cognito User Pool]
CE-->|2 Run in Browser|Br[Browser Runtime]
Br-->|3 Call API|APIGW[API Gateway]
end
subgraph Backend
APIGW-->|4 Process Request|BE[Backend Service]
BE-->|4.1 Call External API|OA[OpenAI API]
BE-->|5 Store Data|DB[(RDS Database)]
end
This package contains the code for the chrome extension.
It uses the Manifest V3 and is built using React. Components are written using Chakra UI v3 for styling.
This package contains the code for the API that provides the backend functionality for the chrome extension. It is an express server that provides endpoints for the chrome extension to interact with.
This package contains the code for the RDS migrations.
It uses a non-opinionated approach to migrations, allowing you to write your own SQL queries to create and modify the database schema. node-pg is used to interact with the PostgreSQL database.
This package contains the code for the infrastructure that is used to deploy the application.
It uses cdk to define the infrastructure as code. It includes the configuration for the API, RDS, and other AWS resources that are used to deploy the application.
This package contains the types that are used accross the application.
To run the application, you need to have Node.js and Yarn installed on your machine. To install the dependencies, run the following command in the root directory of the monorepo:
yarn installIn order to run the application, you need to deploy at least the auth stack. This allows the application to authenticate users and manage their sessions. To deploy the auth stack, you can use the following command:
yarn workspace @arxiv-explorer/infrastructure deploy ArxivExplorerAuthStackAfter the auth stack is deployed, define the following environment variables
export VITE_IDENTITY_POOL_ID="us-east-1:3c8f0b2d-4a5e-4c6b-9f7d-8e1f2a3b4c5d"
export VITE_USER_POOL_ID="us-east-1_123456789"
export VITE_USER_POOL_CLIENT_ID="abcdefghijklmnopqrs"To run a local instance of the database, you can use Docker to run a PostgreSQL container. Define the variables
export RDS_HOST="localhost"
export RDS_PORT="5432"
export RDS_DB_NAME="postgres"
export RDS_USERNAME="some-username"
export RDS_PASSWORD="some-password"
export RDS_DATABASE_URL="postgresql://${RDS_USERNAME}:${RDS_PASSWORD}@${RDS_HOST}:${RDS_PORT}/${RDS_DB_NAME}"and run the following command:
yarn workspace @arxiv-explorer/rds-migrations docker:buildand then run the migrations to create the database schema:
yarn workspace @arxiv-explorer/rds-migrations migrate upat this point you should have a local instance of the database running and the schema created.
To run the API, you can use the following command:
yarn workspace @arxiv-explorer/api run:localThis will start the API server on http://localhost:3002.
To run the Chrome extension, you need to build the extension and load it into Chrome. Youcan do this by running the following command:
yarn workspace @arxiv-explorer/chrome-extension dev- Open Chrome and go to
chrome://extensions/. - Enable "Developer mode" in the top right corner.
- Click on "Load unpacked" and select the
distdirectory inside the@arxiv-explorer/chrome-extensionpackage. - The extension should now be loaded and you should see it in the list of extensions.
- You can now click on the extension icon in the Chrome toolbar to open the popup and start using the extension.
Once the extension is loaded, you can navigate to any paper on arxiv.org and click on the extension icon in the Chrome toolbar to open the popup. Login and you should see an explore next to each paper. Clicking on it will open the extension popup with the summary, explanations, and suggestions for further reading.
