npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tracepack/evidence-core

v0.2.1

Published

Tracepack's core domain model — EvidenceItem, TracepackProject, TemplateSnapshot — and the pure functions that operate on them (progress, category state, chronology gaps). No framework or runtime dependency.

Readme

@tracepack/evidence-core

Tracepack's core domain model, with zero framework or runtime dependency: TracepackProject, EvidenceItem, TemplateSnapshot, PrivacyFinding, and the pure functions that operate on them. This is the type/logic layer @tracepack/template-engine, @tracepack/evidence-sdk, and Tracepack's own apps all build on -- not a UI, not storage, not PDF handling.

Install

npm install @tracepack/evidence-core

What's in here

  • Types: TracepackProject, EvidenceItem, EvidenceCategory, TemplateSnapshot, PrivacyFinding, ChronologyGap, and the supporting field types (Requirement, ReviewStatus, SourceType, PrivacyFindingKind -- all open (string), not closed unions; a template or producer can declare kinds this package has never heard of).
  • Pure functions:
    • createProject(...) -- builds a new TracepackProject from a template snapshot.
    • addEvidence(project, item) -- returns a new project with one more evidence item (never mutates the input).
    • getCategoryProgress(project) -- per-category completion state against the template's requirement/minItems.
    • getRequiredSummary(project) -- a project-level "N of M required categories complete" roll-up.
    • getChronologyGaps(project) -- flags a gap between two pieces of dated evidence wider than the template's chronologyRules.maxGapDays, when the template declares one.
    • diffManifests(before, after) -- compares two exported manifest.json files (the tracepack-source-manifest shape @tracepack/export-engine's buildManifest produces) by evidence item id and contentHash. Returns what was added, removed, had its content hash change (an anomaly -- Tracepack's own export guarantee is that an item's original bytes are never mutated), or had an ordinary metadata field (title, category, review status) change. Exposed as tracepack diff-manifest <before.json> <after.json> in @tracepack/cli.
    • looksLikeTracepackManifest(value) -- a lightweight structural check, so a caller gets a clear rejection reason before diffManifests would otherwise fail confusingly on .evidence of an unrelated JSON file.

Every function here is pure -- given the same input, always the same output, no I/O, no mutation of its arguments. That's deliberate: this package has no opinion about where a TracepackProject is stored or rendered.

Usage

import { createProject, addEvidence, getCategoryProgress, type TemplateSnapshot } from "@tracepack/evidence-core";

const template: TemplateSnapshot = {
  id: "example", name: "Example", version: "1.0.0", jurisdiction: "general",
  categories: [{ id: "docs", name: "Documents", requirement: "required", description: "", acceptedTypes: ["pdf"] }],
  exportSections: [],
};

let project = createProject({ title: "My pack", organisation: "", summary: "", desiredResolution: "", template });
project = addEvidence(project, {
  id: "item-1", projectId: project.id, title: "Receipt", categoryId: "docs",
  sourceType: "pdf", originalFileName: "receipt.pdf", importedAt: new Date().toISOString(),
  contentHash: "…", reviewStatus: "needs_review", notes: "", size: 1024, mimeType: "application/pdf",
});

console.log(getCategoryProgress(project));

License

Apache-2.0