factcircuit
FactCircuit: an auditable claim-and-evidence verification loop with immutable provenance, staged checks, bounded retrieval, and reproducible evaluation.
Search U.S. federal class action case data via the CourtListener API.
DataTypeScript · CSSGitHub @BbillionairesOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Loading the full README. The saved excerpt is shown below.
A Next.js (App Router, TypeScript) foundation for searching, retrieving, and
displaying U.S. federal class action case data via the
CourtListener REST API.Read the full README ↗A Next.js (App Router, TypeScript) foundation for searching, retrieving, and displaying U.S. federal class action case data via the CourtListener REST API.
src/lib/courtlistener.ts — server-only CourtListener API client
(searchClassActionCases, getDocketById, getDocketEntries). Reads the
API token from the environment and is never imported from client
components. Search pagination cursors are extracted from CourtListener's
next/previous URLs so only an opaque cursor string is ever exposed
outside this module.src/app/api/courtlistener/search/route.ts — Route Handler that proxies
search requests to CourtListener. This is the only place the API token is
used at request time; the browser never sees it.src/app/page.tsx — client-side search UI (query, court, and filed-date
filters, plus cursor-based pagination) that calls the route handler above.src/app/case/[id]/page.tsx — server-rendered case detail page: docket
facts (court, cause, nature of suit, assigned judge, etc.) and the full
docket entry / filing history, calling the CourtListener client directly
since it never needs to run in the browser.Copy .env.example to .env.local:
cp .env.example .env.local
Set COURTLISTENER_API_TOKEN in .env.local to your CourtListener API
token. Get one from your account at
https://www.courtlistener.com/help/api/rest/#authentication.
.env.local is git-ignored — the token is never committed.
Install dependencies and run the dev server:
npm install
npm run dev
Open http://localhost:3000 and search for a case (e.g. "data breach").
With the dev server running:
curl "http://localhost:3000/api/courtlistener/search?q=data+breach"
A successful response returns JSON with count, nextCursor,
previousCursor, and results (an array of matching federal dockets). A
500 with a config error means COURTLISTENER_API_TOKEN isn't set; a 502
means CourtListener rejected or failed the request.
Visiting /case/<docket_id> (e.g. /case/72031934) renders that docket's
detail page directly from the CourtListener client.
type=r), which is where class action lawsuits filed in federal court
live. searchClassActionCases also accepts courtId, cause,
filedAfter, filedBefore, and a pagination cursor for narrowing
results.429 instead of
crashing. Search responses are also cached for 5 minutes
(next: { revalidate: 300 } in src/lib/courtlistener.ts) to reduce how
often that shared budget gets hit.What works
src/lib/members/, src/lib/settlements/).src/app/api/saved- searches/, src/lib/accountSavedSearches.ts), synced across devices,
replacing the earlier browser-local-only version
(src/lib/savedSearches.ts, still used for a signed-out visitor).worker/
settlement-discovery service (worker/src/savedSearchAlerts.ts). A
search's first check only seeds a "seen" baseline — it never emails the
member's entire existing match history the moment alerts are turned on.worker/README.md for the full design rationale and known
limitations of both paths).What's left
npm run build /
npm run lint (main app) and npm run build / npm run typecheck
(worker) are the only checks run today.SAVED_SEARCH_ALERTS_PER_RUN), not real-time — see the "Real
limitations" section of worker/README.md.worker/README.md.How to run
npm install && npm run dev).
Requires DATABASE_URL (shared with the worker), SESSION_SECRET, and
BLOB_READ_WRITE_TOKEN in addition to COURTLISTENER_API_TOKEN for the
member-account features to work; see .env.example for the full list
and which ones degrade gracefully when unset.worker/README.md (cd worker && npm install && npm run build && npm start). It's a one-shot script, not a server — an external
scheduler (Railway, in production) triggers each run.Where it's deployed
worker/README.md).