Ambiguity is a public definitions wiki. It lets people extract, upload, and review definitions, then browse curated terms and sources.
- Search and browse public definitions by term or source
- Upload definitions manually or extract from PDFs and images
- OCR support for images (Tesseract.js) and text extraction for PDFs
- Review workflow for candidate definitions
- Supabase auth, comments, and contribution history
- Next.js App Router + React 19
- Supabase (Auth + Postgres)
- Tailwind CSS + Radix UI
- pdf-parse + tesseract.js for file processing
- Install dependencies:
# nvm use 22
npm install- Create
.env.localwith your Supabase keys:
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
- Run the dev server:
npm run devOpen http://localhost:3000 to view the app.
npm run dev- start the dev server (Turbopack)npm run build- production buildnpm run start- run the production servernpm run lint- run ESLintnpm run seed:supabase- seed mock terms and definitions
- Server helpers live in
lib/supabase/server.tsand client helpers inlib/supabase/client.ts. SUPABASE_SERVICE_ROLE_KEYis used only by scripts and server-side code. Never expose it to the browser.
- PDFs with selectable text use PDF parsing.
- Scanned PDFs are rejected with a message to upload as an image instead.
- Images use OCR and report a confidence score in the UI.