Quickstart

TokenForensics is a Next.js 16 application on a Prisma 7 + Neon Postgres substrate, with Auth.js for sign-in and a hash-chained TokenAuditEvent ledger at its core.

Run it locally

pnpm install
pnpm dev
# http://localhost:3000

The documentation site you are reading is served by the same app at /docs. The investigator workbench is at /app (it requires sign-in).

The commands you'll use

CommandWhat it does
pnpm devStart the dev server
pnpm buildProduction build
pnpm lint / pnpm exec tsc --noEmitLint and type-check
pnpm testVitest unit tests
pnpm test:e2ePlaywright end-to-end tests
pnpm video:render:allRender every Remotion walkthrough

The one rule before you write code

The substrate is append-only

Every forensic-relevant action is written through one function — appendAuditEvent in src/lib/ledger.ts. Never UPDATE or DELETE a row in TokenAuditEvent, and never write to it any other way. The hash chain is the chain-of-custody; bypassing the append path corrupts the property the entire product is built on.

Where to go next

Last updated