Skip to content

hhushhas/margin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Margin

Minimal dark reading ritual for arXiv-powered papers.

What it does

  • recent paper queue from arXiv metadata
  • search across arXiv papers
  • clean HTML-first reader when arXiv HTML exists
  • abstract fallback when HTML is missing
  • AI brief via OpenAI when OPENAI_API_KEY is set
  • local fallback brief when no key is present
  • saved text highlights in localStorage
  • browser text-to-speech for summary or full paper

Stack

  • Next.js 16 app router
  • direct arXiv Atom API + HTML paper fetch
  • fast-xml-parser for Atom
  • cheerio for HTML cleanup/extraction

Run

bun install
bun dev

Open http://localhost:3000.

Env

Copy .env.example to .env.local.

OPENAI_API_KEY=
OPENAI_MODEL=gpt-4.1-mini

Without OPENAI_API_KEY, Margin still works and falls back to abstract-based summaries.

Notes

  • arXiv HTML is not available for every paper yet. Margin falls back gracefully.
  • Speech uses the browser speechSynthesis API, so voice quality depends on the device/browser.
  • Product acknowledgment included per arXiv API guidance: Thank you to arXiv for use of its open access interoperability.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors