Next.js + Bun + PostgreSQL/pgvector app for asking questions over indexed PDFs with citations.
- Install dependencies:
bun install - Copy envs:
cp .env.example .env - Run migrations:
bun run db:migrate
bun run devStart the app in development mode.bun run buildBuild the app for production.bun run startStart the built app.bun run workerStart the background worker.bun run db:migrateApply database migrations.bun run db:migrate:statusShow migration status.bun run index:corpusDiscover PDFs fromPDF_DATA_DIR, chunk them, embed them, and store them in Postgres.bun run smoke:llmRun a simple LLM smoke test using the currentLLM_*env vars.bun run testRun all tests.bun run test:unitRun unit tests.bun run test:integrationRun integration tests.bun run test:e2eRun render/e2e-style tests.bun run checkRun lint, typecheck, and tests.bun run scrapeRun the scraping script.
DATABASE_URLis required for migrations and runtime DB access.PDF_DATA_DIRcontrols which PDF folderbun run index:corpusscans.EMBEDDING_*env vars control indexing and query embedding.LLM_*env vars control answer generation.