Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Context Receipt

Drop a viral claim. Get a sourced context receipt.

A deliberately small web app + CLI for screenshots, headlines, and social posts. It reads the exact claim, searches the live web, separates fact from framing, and produces a shareable receipt.

Why this shape

  • One job: screenshot in, context card out.
  • No account or database: inputs are processed once and not stored by the app.
  • Visible state: live/demo mode, verdict, confidence, evidence, and sources are always explicit.
  • Local-first history: the browser keeps only the latest receipt in localStorage.
  • Same core everywhere: web and CLI call the same analysis module.
  • Works now: without an API key the full UI runs in clearly labeled demo mode.

Run

Requires Node.js 20+.

cp .env.example .env
# Add OPENAI_API_KEY to .env for live image + web analysis.
npm start

Open http://localhost:8787.

On Windows, double-click run.cmd. It creates .env, opens the browser, and starts the server. Add your key to .env whenever you want live analysis; without it, the app stays in demo mode.

CLI

OPENAI_API_KEY=sk-... node cli.mjs --text "paste the claim"
OPENAI_API_KEY=sk-... node cli.mjs --image screenshot.png
node cli.mjs --text "demo this flow" --json

After npm link, the command becomes:

receipt --image screenshot.png

Deployment

This is a plain Node HTTP server with zero runtime dependencies. Deploy it anywhere that can run Node 20+ and set:

  • OPENAI_API_KEY
  • OPENAI_MODEL (optional; defaults to gpt-5.6-luna)
  • PORT (optional; defaults to 8787)
  • ALLOWED_ORIGINS (optional, comma-separated)

The API key stays server-side. The server applies same-origin checks, a request-size cap, a basic in-memory rate limit, and restrictive browser security headers.

Viral loop

  1. Someone sees a wild screenshot.
  2. They drop it into Context Receipt.
  3. The app produces a compact verdict card.
  4. They share that card back into the same conversation.
  5. The card itself advertises the action: get the receipt.

Next cuts—not features for feature's sake

  • Public, immutable receipt links with cryptographic hashes.
  • Browser share target / extension: right-click a screenshot → Print receipt.
  • Original-post recovery for X/Reddit screenshots.
  • Source-quality badges and date mismatch warnings.
  • Challenge button that reruns the claim with a counterargument.

Test

npm test

About

# Context Receipt Drop a viral claim. Get a sourced context receipt. A deliberately small web app + CLI for screenshots, headlines, and social posts. It reads the exact claim, searches the live web, separates fact from framing, and produces a shareable receipt.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages