Lekt turns daily arXiv preprints into a calm, editorial reading feed—combining fast triage on the surface with lossless primary-source depth when a paper earns your attention.
- Hook-First Triage Feed (
/): Tight, scannable cards with venue/category metadata, author summary, a 1–2 sentence core hook, reading time, and an inline PMRC (Problem · Method · Results · Limitations) breakdown. - Two-Layer Single Paper View (
/paper/[id]):- Compact Mode: Structured, LLM-curated section guides (3–4 substantive points per section), selected key figures with rationale on an archival
#FAF8F4frame, and first-use-only clickable technical term popovers. - Original Mode: Verbatim, lossless
ar5ivHTML sections, display/inline KaTeX equations, and extracted<img src>+<object data="...svg">figures—zero words altered. - User-Controlled Disclosure: Toggle Compact | Original globally in the sticky header or inline per section, plus
Aatypeface (sans/serif), size (14px/16px/19px), and light/dark theme controls.
- Compact Mode: Structured, LLM-curated section guides (3–4 substantive points per section), selected key figures with rationale on an archival
- Two-Speaker Researcher Audio Briefs: On-demand dialogue scripts synthesized into MP3 via
edge-tts(Host + Researcher) and cached on the API server. - Automated Daily Harvest: A scheduled GitHub Actions workflow (
cron: "0 6 * * *") harvests newcs.AI,cs.LG, andcs.CLpapers from arXiv OAI-PMH, parsesar5ivHTML, generates compact overlays & embeddings, and upserts them into Postgres.
flowchart LR
GH["GitHub Actions\n(Daily 06:00 UTC Ingest)"] -->|arXiv OAI-PMH + ar5iv| FW["Fireworks AI\n(LLM + Embeddings)"]
GH -->|Upsert papers & cards| DB[("Supabase Postgres\n+ pgvector")]
Web["Next.js 15\n(apps/web · Vercel)"] -->|SSR + Client API| API["FastAPI\n(apps/api · Render)"]
Mobile["Expo\n(apps/mobile)"] -->|REST + SSE Sync| API
API --> DB
API -->|Dialogue MP3| TTS["edge-tts\nAudio Cache"]
| Path | Stack | Purpose |
|---|---|---|
apps/web |
Next.js 15, Tailwind CSS, KaTeX | Editorial feed, /paper/[id] progressive reader, audio player |
apps/api |
FastAPI, SQLAlchemy (async), Alembic | Feed ranking (RRF + MMR), ar5iv parser, TTS, SSE sync |
apps/mobile |
Expo / React Native | Mobile companion client |
packages/shared |
TypeScript, Zod | Shared API contracts & schemas (@lekt/shared) |
.github/workflows/daily-ingest.yml |
GitHub Actions | Daily arXiv harvest + full-document pipeline |
- Node.js 20+ & pnpm
9.15.0 - Python 3.12+
- Docker (for local Postgres +
pgvector, Redis, and MinIO)
docker compose up -dThis starts:
- Postgres (
pgvector/pgvector:pg16) onlocalhost:55432(lekt/lekt_dev_password) - Redis on
localhost:6379 - MinIO on
localhost:9000(console:9001)
cd apps/api
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# Point DATABASE_URL to the local Docker Postgres instance (port 55432)
export DATABASE_URL="postgresql+asyncpg://lekt:lekt_dev_password@localhost:55432/lekt"
export FIREWORKS_API_KEY="your_fireworks_api_key" # optional for offline/standalone dev
alembic upgrade head
uvicorn app.main:app --host 127.0.0.1 --port 8001 --reloadFrom the repository root:
pnpm install
pnpm --filter @lekt/shared build
NEXT_PUBLIC_API_URL=http://127.0.0.1:8001 pnpm --filter @lekt/web devThe .github/workflows/daily-ingest.yml workflow runs daily at 06:00 UTC (and supports manual workflow_dispatch):
- Harvests recent arXiv papers (
cs.AI,cs.LG,cs.CL) viaharvest_and_generate_cards. - Runs
process_paper_full_pipelineon new cards to extract verbatimar5ivsections/equations/figures and generate compact guides + paper-specific glossaries.
Required repository secrets for the workflow:
DATABASE_URL— Postgres connection string (postgresql+asyncpg://...)FIREWORKS_API_KEY— Fireworks AI API key
# Backend unit & API tests
cd apps/api && .venv/bin/pytest -v
# Shared package & Web typecheck
pnpm --filter @lekt/shared build
cd apps/web && ./node_modules/.bin/tsc --noEmit