Minimal dark reading ritual for arXiv-powered papers.
- 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_KEYis set - local fallback brief when no key is present
- saved text highlights in
localStorage - browser text-to-speech for summary or full paper
- Next.js 16 app router
- direct arXiv Atom API + HTML paper fetch
fast-xml-parserfor Atomcheeriofor HTML cleanup/extraction
bun install
bun devOpen http://localhost:3000.
Copy .env.example to .env.local.
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4.1-miniWithout OPENAI_API_KEY, Margin still works and falls back to abstract-based summaries.
- arXiv HTML is not available for every paper yet. Margin falls back gracefully.
- Speech uses the browser
speechSynthesisAPI, 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.