Skip to content

About

Evidence intelligence for serious investigations — Next.js web app for the Afterprint platform

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

Afterprint logo

Afterprint

Evidence intelligence for serious investigations — AI-assisted extraction with every claim traceable to a source, an append-only chain of custody, and integrity anchored on Stellar.

Live app · API · AI service · Contracts

CI Next.js 16 Stellar Testnet License


The problem

Investigators and legal teams working a case end up with recordings, documents, sensor logs, and reports scattered across tools with no shared timeline and no way to prove nothing was altered after the fact. Afterprint ingests that evidence, has AI extract and cross-reference it — never asserting anything it can't cite a source for — and anchors integrity proofs on Stellar so the chain of custody can be verified independent of Afterprint's own database.

How it works

  1. Sign in with a Stellar (Freighter) wallet — no password, no email.
  2. Upload evidence into a case. Every file becomes an immutable, versioned object with a custody event on import.
  3. afterprint-ai extracts claims from each source, categorized VERIFIED_FACT / CORROBORATED_CLAIM / INFERENCE / CONFLICT / UNKNOWN — every grounded claim cites the exact source span it came from.
  4. Custody events and attestations get anchored on Stellar Testnet via the registry contracts.
  5. Ask a question about the case and get an answer with citations, not a guess.

Architecture

                    ┌──────────────────┐
   user ──────────▶ │  afterprint-web  │  (this repo — Next.js, Vercel)
                    └────────┬─────────┘
                             │ REST, cookie session
                             ▼
                    ┌──────────────────┐        ┌───────────────────┐
                    │  afterprint-api  │───────▶│   afterprint-ai    │
                    │  (NestJS/Fastify)│        │   (FastAPI)        │
                    └───┬────────┬─────┘        └─────────┬──────────┘
                        │        │                        │
                        ▼        ▼                        ▼
                  Postgres    Redis                  Groq Whisper
                 (Supabase) (Upstash)              (transcription)
                        │
                        ▼
              Stellar Testnet — afterprint-contracts
           (case / evidence / custody / attestation / access registries)

Quick start

pnpm install
cp .env.example .env.local   # NEXT_PUBLIC_API_BASE_URL
pnpm dev
pnpm lint
pnpm typecheck
pnpm format:check
pnpm test            # unit tests (node:test): the API proxy and the API client
pnpm build
pnpm test:e2e        # Playwright; needs a running instance on :3000 (see below)

To run the end-to-end checks against a production build:

NEXT_PUBLIC_API_BASE_URL=http://localhost:4000 pnpm build
pnpm exec playwright install chromium
pnpm exec next start -p 3000 &
pnpm test:e2e

The API and AI health checks skip themselves unless RENDER_API_URL and RENDER_AI_URL point at deployed services. CI runs lint, format, typecheck, unit tests, the build, and the e2e suite on every pull request.

The /backend proxy

The browser calls /backend/v1/... on this app's own origin, and src/lib/proxy.ts forwards the request to API_UPSTREAM_URL. That keeps the session cookie first-party. The proxy only forwards /v1 paths with no . or .. segments, passes an allow-list of request headers (not Authorization), never follows redirects, returns every cookie the API sets, and marks all responses no-store. If the API is unreachable it answers 502 without exposing the error. These rules are covered by tests/unit/proxy.test.ts.

Contributing

See CONTRIBUTING.md for the workflow and coding standards, and SECURITY.md to report a vulnerability privately. Related repos: afterprint-api, afterprint-ai, afterprint-contracts.

Maintainer

GitHub @helloworld1-star
Email devt14985@gmail.com

Contributors

About

Evidence intelligence for serious investigations — Next.js web app for the Afterprint platform

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages