A local reverse literature search engine paired with a lightweight markdown editor. Select a phrase or paragraph, click Review, and get related work from OpenAlex (scholarly) and Gemini Flash (Google Search grounded) side by side. Includes a private admin dashboard for usage metrics and instant feature toggles.
- Reverse Literature Search: Feed your writing directly into scholarly APIs (OpenAlex and Semantic Scholar) and Gemini Flash to instantly retrieve reference sources.
- Resilient Retry Options:
- Auto-Retry: Semantic Scholar calls use recursive exponential backoff when encountering rate limits (429).
- Manual Retry: Individual retry buttons for failed search targets directly inside the Results Pane.
- Campus Network Support: Welcome dialog displays helpful redirection links to the proxy site
https://rrl.mattliqht.devwhen outbound connections fail Turnstile verification.
- Local Persistence: Automatically saves your active session, sidebar resizing preferences, and general settings to browser local storage.
- Dark Mode: Responsive theming mapped to a customized, premium color system.
- External Resources: Quick library access link integrated inside the sidebar footer.
- Admin Dashboard: Real-time metrics monitoring, call statistics, and individual switch-off toggles for each external tool.
Next.js (App Router) · TypeScript · Tailwind v4 · shadcn/ui · CodeMirror 6 · better-sqlite3 · iron-session · OpenAlex · @google/genai
- Sessions: Stored locally in the browser (localStorage) — no account needed.
- Metrics + Feature Flags: Kept in SQLite on the server.
cp .env.example .env.local # then fill in keys
npm run dev # http://localhost:3000
npm test # unit checks (abstract reconstruction, rate limiter)| Var | Purpose |
|---|---|
OPENALEX_API_KEY |
OpenAlex key (free at openalex.org/settings/api) |
GEMINI_API_KEY |
Google AI Studio key |
GEMINI_MODEL |
defaults to gemini-flash-latest |
ADMIN_PASSWORD |
admin dashboard password |
SESSION_SECRET |
≥32 random chars (openssl rand -base64 32) |
SQLITE_PATH |
defaults to ./data/app.db |
PORT |
server port |
Visit /login, enter ADMIN_PASSWORD. Dashboard at /admin shows calls, distinct users, Gemini tokens, latency, errors, recent requests, and on/off switches for each tool (toggles take effect on the next Review instantly).
Output is standalone. Build, assemble, and run:
npm ci
npm run build
# standalone server needs static assets beside it
cp -r .next/static .next/standalone/.next/static
cp -r public .next/standalone/public 2>/dev/null || true
# start with secrets sourced from .env.local (kept out of git)
set -a; . ./.env.local; set +a
pm2 start ecosystem.config.js --update-envPoint the subdomain at the Node port via Apache (mod_proxy/mod_rewrite; confirm AllowOverride with your admin). .htaccess:
RewriteEngine On
RewriteRule ^(.*)$ http://127.0.0.1:PORT/$1 [P,L]
# or at vhost level:
# ProxyPass / http://127.0.0.1:PORT/
# ProxyPassReverse / http://127.0.0.1:PORT/Notes
better-sqlite3is native;npm cion the host builds/fetches its binary. If the standalone bundle is missing it, copynode_modules/better-sqlite3into.next/standalone/node_modules/.- Subdomain (not subpath) ⇒ no Next.js
basePathneeded. data/(SQLite) and.env.localare gitignored.