# GPSR Check: turning regulations into deterministic checks

A pure TypeScript audit engine with 21 registered rules, effective-date gates and explicit source provenance for EU-market seller self-assessment.

If you sell into EU markets, a useful self-check needs to connect your answers to a specific finding and an actionable next step. GPSR Check structures that task around local rules and market profiles. The engineering challenge is to make the decision traceable and repeatable while keeping source uncertainty visible.

This case describes the repository implementation reviewed on 19 November 2026. It explains how the software evaluates supplied answers; it is not legal advice. Legal interpretation and decisions that require a notified body, authorised representative or lawyer stay with those professionals.

## Put the decision in a pure engine

The separately deployable Next.js application calls the shared TypeScript `audit()` engine through `/api/engines/compliance`. Evaluation uses local rules and market profiles. That path has no database, network or AI-model call.

Each `Rule` has an `id`, a `regulation` and an `evaluate(context)` function. A rule returns findings or no finding. The registered collection contains:

| Registered group | Rules |
|---|---:|
| GPSR and category rules | 9 |
| EPR, PPWR and platform rules | 12 |
| Total | 21 |

The offer's “26 items” wording is a separate marketing count. The engine has 21 registered rules, and that is the count used in this engineering description.

## Pin time before evaluating rules

Regulatory checks can change when a duty becomes effective. The engine uses a pinned `asOf` to prepare its date context and effective-date gates, including GPSR and PPWR applicability. Rules evaluate that context rather than independently reading the clock.

For reproducible comparisons, keep both the seller inputs and `asOf` fixed. A before-and-after-date comparison can then isolate a date gate instead of mixing it with new answers or changed market profiles.

One concrete predicate is `GPSR-RP-001`: it fires when GPSR is in force and a seller established outside the EU reports no responsible person. This is a conditional check over supplied answers, not an inspection of a real listing or a legal certification.

## Make every finding inspectable

A finding carries its rule ID, legal citation, severity, explanation, consequence, fix, affected markets, listing-block flag, effort hours, verification level and optional evidence URL. That structure connects the displayed problem to the rule and source behind it.

Source URLs and verification labels are maintained in code. `RULES-EVIDENCE.md` records the research trail, including failed direct EUR-Lex retrieval and secondary-source cross-checking. Tests require the public source catalogue's rule IDs to match the engine.

Verified, partially verified and unverified provenance therefore remain visible inputs to interpreting a result. An unverified Brand Registry exposure is appended as an advisory warning after a blocker already exists. It does not silently become a verified statutory finding.

## Keep scoring and prioritisation explicit

| Finding severity | Score deduction |
|---|---:|
| Blocker | 26 |
| Critical | 12 |
| Warning | 4 |
| Info | 0 |

Blockers determine `blocked`; critical findings determine `non-compliant`; warning-only results remain `compliant` under the engine's status logic. Fixes sort listing blockers first, then severity, then effort. These labels describe the software's evaluation of the answers.

Fine exposure takes the highest verified or partially verified fixed ceiling among at-risk markets. Revenue feeds a separately labelled estimated downtime cost. Keeping those quantities separate helps you distinguish a sourced ceiling from a business estimate.

## Describe the report boundary accurately

The interface previews three findings and gates print-to-PDF. The API already returns the full audit result before payment; filtering is client-side. The preview is a presentation gate, not server-side withholding of the remaining findings.

Checkout verification rereads Dodo checkout/payment records and checks success, USD amount, site and product or plan identity. When checkout is unconfigured, submitting the email-reservation form also unlocks the report without charging. That fallback matters when describing what “paid report” means in this implementation.

## Reuse the structure for another rules problem

The transferable design is a pure evaluator with a pinned date, stable rule IDs, structured findings and source verification labels. For a custom data or rules inquiry, bring the decisions you need to make, their effective dates and the source material you currently use. Those define the rule contract and its review work.

[Try GPSR Check](https://gpsr.clintforge.com/) · [Ask about custom data or rules](/en#contact)

## Sources

- [GPSR Check — product entry](https://gpsr.clintforge.com/)
- [GPSR Check — public rule source catalogue](https://gpsr.clintforge.com/sources)
