LawfulBasisTrackerLite

Read-only variant of LawfulBasisTracker. Renders the summary cards, compliance-gap alerts, and activity table — without the form, LIA workflow, or edit affordances. Significantly smaller bundle when all you need is a view.

Overview

LawfulBasisTrackerLite is the display-only counterpart of LawfulBasisTracker. It renders the same summary cards (total activities, sensitive-data count, cross-border count, pending approvals), the same compliance-gap alerts, and the same activity table — but the form, the legitimate-interest assessment, the field validation, and the write-path utilities are not bundled. Pure read.

Reach for it on dashboards, audit reports, and customer-facing transparency pages where users only need to inspect activities, not edit them. For the full read/write surface, use the regular LawfulBasisTracker from the same module.

import { LawfulBasisTrackerLite } from '@tantainnovative/ndpr-toolkit/lawful-basis/lite';

Production Readiness

Use this checklist when moving LawfulBasisTrackerLite from demo mode into a customer-facing workflow. Pair the UI package with the source templates in @tantainnovative/ndpr-recipes so validation, persistence, and audit behavior live in your own backend.

Import path
Use
Production role
@tantainnovative/ndpr-toolkit/lawful-basis/lite
LawfulBasisTrackerLite
Read-only lawful-basis summaries, gap alerts, and activity tables.
@tantainnovative/ndpr-toolkit/lawful-basis
LawfulBasisTracker, validateProcessingActivity
Full read/write manager and validation path for admins and privacy reviewers.
@tantainnovative/ndpr-recipes
src/adapters/drizzle-lawful-basis.ts
Reference persistence adapter for records consumed by read-only views.

Implementation checklist

  • Feed lite views from approved lawful-basis records, not draft activities.
  • Use onActivityClick only for detail pages the current user can access.
  • Display pending approvals, sensitive-data flags, and cross-border indicators where relevant.
  • Route edits, approvals, and LIA workflows to the full LawfulBasisTracker.
  • Define whether the lite view is internal-only or safe for customer-facing transparency.

Backend notes

  • Use the recipes adapter as the durable source for lawful-basis activities.
  • Apply authorization before returning activities because lite UI does not enforce backend permissions.
  • Return approved status and review metadata so dashboards do not imply draft records are final.
  • Redact internal rationale before exposing activity summaries outside privacy/legal teams.

Testing notes

  • Compare lite counts and gap alerts with the full manager and backend records.
  • Check records with pending approval, sensitive data, cross-border transfers, and archived status.
  • Verify keyboard row activation and no-op behavior when onActivityClick is omitted.
  • Confirm users cannot fetch restricted rationale or approval details through linked routes.

Common mistakes

  • Using lite pages for approval workflows instead of the full manager.
  • Showing draft legal bases as approved production records.
  • Treating hidden edit controls as authorization.
  • Publishing internal legitimate-interest rationale without review or redaction.

Quickstart

import { LawfulBasisTrackerLite } from '@tantainnovative/ndpr-toolkit/lawful-basis/lite';
import type { ProcessingActivity } from '@tantainnovative/ndpr-toolkit/lawful-basis/lite';

const activities: ProcessingActivity[] = [
  {
    id: 'act_001',
    name: 'Customer onboarding',
    description: 'KYC and account creation',
    lawfulBasis: 'contract',
    status: 'active',
    involvesSensitiveData: false,
    crossBorderTransfer: false,
    dpoApproval: { approved: true, approvedAt: Date.now(), approvedBy: 'DPO' },
    createdAt: Date.now(),
    updatedAt: Date.now(),
    // ...remaining ProcessingActivity fields
  },
];

export default function ActivitiesPage() {
  return (
    <LawfulBasisTrackerLite
      activities={activities}
      showSummary
      showComplianceGaps
      onActivityClick={(a) => router.push(`/activities/${a.id}`)}
    />
  );
}

Props

PropTypeDescription
activitiesProcessingActivity[]Required. Activities to display. Sorted by updatedAt descending in the rendered table.
titlestringHeader. Defaults to "Lawful Basis Tracker".
descriptionstringSub-header. Defaults to an NDPA Section 25 explainer.
showSummarybooleanToggle the four-stat summary cards (total / sensitive / cross-border / pending). Defaults to true.
showComplianceGapsbooleanToggle the high / medium severity gap alerts produced by assessComplianceGaps. Defaults to true.
onActivityClick(activity: ProcessingActivity) => voidOptional row callback. When provided, each row becomes keyboard-accessible (role="button", Enter / Space activates).
classNamestringExtra class merged onto the root.
classNamesLawfulBasisTrackerLiteClassNamesPer-slot overrides (root, header, title, summary, summaryCard, table, tableHeader, tableRow, statusBadge, complianceScore, gapAlert).
unstyledbooleanStrip every default class.

When NOT to use the Lite variant

  • You need an admin to add, edit, or archive activities — use the full LawfulBasisTracker.
  • You need the legitimate-interest assessment (LIA) flow — also full only.
  • You want server-side validation of new activities — pair the full variant with validateProcessingActivity from /core.