LitRev is an AI-assisted research workspace for evidence reviews. It combines protocol design, study intake, screening, drafting, and verification in one product, with a strong emphasis on traceability, controllable automation, and source-backed writing.
This repository is private and collaborator-managed. The main Next.js app lives in next-app/.
- Product intent:
PRD.md - Repo rules and agent workflow:
AGENTS.md - Active plans and canonical owners:
docs/plans/README.md - Security baseline:
SECURITY.md
Run these from next-app/ unless stated otherwise.
| Task | Command |
|---|---|
| Install deps | npm install |
| Start local app | npm run dev |
| Typecheck | npx tsc --noEmit |
| Lint | npm run lint |
| Style lint | npm run lint:styles |
| Test | npx vitest run |
| Build | npm run build |
| DB diagnostics | bash scripts/db-ops.sh diagnose |
| Production deploy | vercel --prod from repo root |
next-app/app/— routes, pages, server actionsnext-app/components/— reusable UInext-app/lib/— shared logicnext-app/lib/server/— server services, Prisma access, AI providersnext-app/prisma/— schema and migrationsdocs/— plans, runbooks, architecture docs, reports.factory/skills/— repo-local draft skills and helper instructions
- Keep repo-root
mainclean and synced toorigin/main. - Do branch work in dedicated
YY/*worktrees, not in repo root. - Prefer first-principles, root-cause fixes over surface patches. Do the hard work when needed, including redesign, rather than stacking brittle band-aids that hide the real problem.
- The app uses PostgreSQL via Prisma. Local development uses localhost Postgres; deployed environments use Supabase Postgres.
- Secrets are local-only. Do not invent them or commit them.
- DB or Prisma work: start with
docs/runbooks/db-architecture.mdanddocs/runbooks/db-ops.md - UI work: start with
docs/architecture/frontend-quality-bar.md - Runtime / agent work: start with
docs/plans/plan-agentic.md - Git / PR / worktree flow: start with
docs/runbooks/github-flow.md
- This repo is optimized for disciplined iteration, not casual drive-by edits.
- If a doc and the code disagree, treat that as drift and fix it in the same task.