Read-only mirror of https://github.com/DCC-BS/anony-mate-frontend — Basel-Stadt. Issues & pull requests at the source.
  • TypeScript 58.6%
  • Vue 36.6%
  • JavaScript 3.2%
  • Dockerfile 0.6%
  • HTML 0.5%
  • Other 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Thomas 3886de1d77
Feature/release 0.2.0 (#71)
* feat(groups): preselect full, merge default into basic preset

Drop the default preset (subset of legal), show legal as «Einfach»/Basic,
preselect «Vollständig» and remove the stale built-in default group.

* feat(help): confirmable notes in disclaimer and tour, clearer PDF review text

Enable the common-ui disclaimer with AnonyMate's notes (results must be
checked, Merkblatt Personendaten) as section 4; the same notes open the
tour. PDF review step reworded.

* feat(disclaimer): AnonyMate's own disclaimer text

Replaces the generic common-ui text and the appended notes section with
AnonyMate's disclaimer from app/assets/disclaimer.html, configured inline
in app.vue. common-ui's own confirmation text is used.

* feat(documents): retention notice, deletion flag, batch PDF download

Like Transcribo: documents stay 30 days in the browser (was 7), a sweep
runs on start and hourly, the list explains it and flags the last 10
days. PDFs can be selected and downloaded together, several as a ZIP.
PDF annotation moves to usePdfAnnotation for export and batch.

* feat(new): say on file upload too that data stays at IT BS

* fix(groups): list postcodes in the «Einfach» help text

* feat(documents): batch actions in the table header, named as marked PDFs

The actions next to the search pushed it narrower and stacked a second solid
button under «Neues Dokument». The wording makes clear the download is the
marked version, not the original again.

* chore: release 0.2.0

First real changelog for «Was ist neu», which is now on outside CI.

* fix(new): swap an early pick for the full preset once it is seeded

On a first run the presets are seeded one by one, so the legal preset
could be picked before full arrived, and the pick was never revisited.

* fix(retention): check a document again before the sweep deletes it

A document changed after the sweep's query, by a recompute for one, is
no longer stale and must stay.

* fix(retention): say «within 24 hours» instead of «tomorrow»

The days left are rounded up, so the last day can end within hours.

* fix(batch): skip documents deleted mid-download, report ZIP failures

A document deleted while it waited its turn has no detections left, so
its PDF would leave unredacted. A failing ZIP now shows an error instead
of nothing.
2026-12-02 20:02:30 +01:00
.github/workflows ci: pin ci-workflows to v10.0.7 (#66) 2026-11-30 21:02:58 +01:00
.mise-tasks inital commit 2026-08-12 14:54:42 +02:00
.vscode chore(biome): migrate deprecated recommended key to preset 2026-08-12 15:42:53 +02:00
app Feature/release 0.2.0 (#71) 2026-12-02 20:02:30 +01:00
docker chore: vllm v0.34.0 like kdkp-kis-k8s-config (#65) 2026-11-30 20:53:04 +01:00
docs/adr chore(deps): update all non-major dependencies (#56) 2026-11-16 21:04:54 +01:00
e2e Feature/release 0.2.0 (#71) 2026-12-02 20:02:30 +01:00
i18n/locales Feature/release 0.2.0 (#71) 2026-12-02 20:02:30 +01:00
public Add svg icon 2026-10-29 08:02:32 +01:00
server Feature/release 0.2.0 (#71) 2026-12-02 20:02:30 +01:00
shared/types feat(review): review a PDF over its original (#34) 2026-10-08 16:15:57 +02:00
test Update renovate config and bump CI workflow ref (#29) 2026-09-08 17:40:02 +02:00
.dockerignore inital commit 2026-08-12 14:54:42 +02:00
.editorconfig inital commit 2026-08-12 14:54:42 +02:00
.env.buildtime.schema inital commit 2026-08-12 14:54:42 +02:00
.env.dev.schema updated proton-pass-plugin 2026-11-23 11:43:50 +01:00
.env.example inital commit 2026-08-12 14:54:42 +02:00
.env.runtime.schema Feature/release 0.2.0 (#71) 2026-12-02 20:02:30 +01:00
.env.schema Add CI env mode and cleanup tasks 2026-08-13 13:12:09 +02:00
.gitattributes feat(review): review a PDF over its original (#34) 2026-10-08 16:15:57 +02:00
.gitignore Scaffold uniform e2e mise tasks and bump CI workflow 2026-08-17 10:45:54 +02:00
biome.json feat(review): review a PDF over its original (#34) 2026-10-08 16:15:57 +02:00
bun.lock chore(deps): update all non-major dependencies (#64) 2026-11-30 20:34:32 +01:00
bunfig.toml fix(deps): node-forge 1.4.2 (security), drop expired nuxt cooldown exemption (#55) 2026-11-10 07:39:37 +01:00
codecov.yml chore(deps): update all non-major dependencies (#56) 2026-11-16 21:04:54 +01:00
CONTEXT.md Feature/release 0.2.0 (#71) 2026-12-02 20:02:30 +01:00
Dockerfile fix(docker): install libatomic1 in the runtime stage (needed by Node 26) (#48) 2026-10-27 13:33:13 +01:00
env.d.ts fix(deps): security lockfile refresh, drop expired bun marker (#51) 2026-10-31 12:07:48 +01:00
LICENSE inital commit 2026-08-12 14:54:42 +02:00
mise.toml chore(deps): update all non-major dependencies (#64) 2026-11-30 20:34:32 +01:00
nuxt.config.ts Feature/release 0.2.0 (#71) 2026-12-02 20:02:30 +01:00
package.json Feature/release 0.2.0 (#71) 2026-12-02 20:02:30 +01:00
playwright.config.ts Update renovate config and bump CI workflow ref (#29) 2026-09-08 17:40:02 +02:00
README.md Feature/release 0.2.0 (#71) 2026-12-02 20:02:30 +01:00
renovate.json chore(renovate): 7-day minimumReleaseAge (#70) 2026-12-01 07:57:38 +01:00
tsconfig.json chore(biome): migrate deprecated recommended key to preset 2026-08-12 15:42:53 +02:00

AnonyMate-frontend

anony-mate-frontend Screenshot

AnonyMate is a modern web application for redacting sensitive information from free-form text and PDF documents. Users choose which entity types to detect and list terms that must stay visible; everything found is redacted until they say otherwise. Built with Nuxt 4 and TypeScript, the whole pipeline — document queue, review, and storage — runs client-side in the browser.

This repository contains the frontend application; the backend is built with Python FastAPI and available at https://github.com/DCC-BS/anony-mate-api.

GitHub License Checked with Biome


DCC Documentation & Guidelines | DCC Website


Features

Core Capabilities

  • Text & PDF Review: Review detections either on the original text in the editor or directly on the uploaded PDF in the browser's viewer — the original file is kept and every detection arrives as a mark with its boxes on the page.
  • Entity Type Management: Curated presets (default, legal, full) seeded on first run, plus custom entity types with display names, detector descriptions, and replacement templates ({name}, {label}, {subject}, {occurrence}).
  • Detection Groups: Named sets of entity types chosen when a document is queued; swapping a group re-detects the document. Built-in groups can be copied into groups of your own.
  • Never-Redact List: Terms exempt from redaction — they stay visible even when a detector matches them.
  • Client-Owned Pipeline: The document queue (staged → converting → redacting → ready) lives entirely in IndexedDB; a reload picks up whatever is unfinished. Documents are cleaned up after a configurable retention period.
  • Safe-By-Default Review: Every detection arrives redacted and stays that way unless explicitly un-redacted. A review wizard walks the redactions one at a time; a threshold slider raises the confidence floor per document.
  • Hand Marking: File detections by hand — words selected in the editor or a rectangle drawn over a PDF page — each arriving as a redacted detection of the chosen entity type. Hand-drawn marks' guessed text is editable inline.
  • Redaction Styles: Write redactions as the entity type's placeholder (e.g. Person-1) or as black bars (████).
  • Annotated PDF Export: PDF reviews export the original with one redaction annotation (ISO 32000) per kept mark, ready for Kofax Power PDF or Acrobat to apply.
  • Multilingual Support: German (de-CH) and English interface.

Technology Stack


Setup

Prerequisites

We recommend using mise to automatically manage tool versions (Bun, Node.js, Varlock, pass-cli):

mise install

Environment Configuration

Create a .env file in the project root with the basic environment mode:

APP_MODE=dev      # dev, ci, build, prod

Environment Variables

Environment variables are validated using Varlock schemas (.env.schema, .env.runtime.schema, .env.buildtime.schema, .env.dev.schema):

Variable Description Default Type
Core Configuration
APP_MODE Application runtime mode (dev, ci, build, prod) dev enum
USE_FEEDBACK Enable feedback widget true (non-CI) boolean
DUMMY Enable mock data mode (no backend required) false boolean
Backend & Services
API_PORT Backend API port 8000 port
NUXT_API_URL Backend API URL http://localhost:8000 (dev) URL
NUXT_FEEDBACK_GITHUB_TOKEN GitHub token for feedback reporting Proton Pass (dev) string (sensitive)
NUXT_PUBLIC_POLL_INTERVAL_MS Interval between task status polls 3000 number
NUXT_PUBLIC_DOCUMENT_RETENTION_DAYS Days a document is kept locally before cleanup 30 number
NUXT_PUBLIC_LOGGER_LOGLEVEL Log level debug (dev), info (prod) enum
NUXT_PUBLIC_LOGGER_APP Service name in log lines (app field) anony-mate-frontend string
UI & Onboarding Flags
NUXT_PUBLIC_COMMON_UI_DISABLE_CHANGELOG Disable changelog modal (off in CI) false boolean
NUXT_PUBLIC_COMMON_UI_DISABLE_DISCLAIMER Disable disclaimer banner false boolean
NUXT_PUBLIC_COMMON_UI_DISABLE_ONBOARDING Disable onboarding tour (off in CI) false boolean
NUXT_PUBLIC_COMMON_UI_DISABLE_SYSTEM_STATUS Disable backend health indicator true boolean

Varlock & Secrets Management

We use varlock for schema-based validation and optional secret retrieval from Proton Pass:

# Validate and load secrets into the environment
mise run env

Development

Start the development server (backend API expected at http://localhost:8000):

# Using mise
mise run dev

# Or via varlock directly
npx varlock run -- nuxt dev

Development with Inspector

mise run debug

Dummy Mode (Offline / Mock Data)

Run the frontend with mocked backend responses (no Python backend or detection model required):

mise run dummy

Project Architecture

app/
├── assets/                 # Main CSS styles
├── components/             # Vue components (PascalCase)
│   ├── documents/          # Document queue table & status badges
│   ├── entities/           # Entity type, group & never-redact editors
│   ├── new/                # New-document form (group & output selection)
│   └── review/             # Editor/PDF review, detection sidebar, wizard
├── composables/            # Reactive Vue composables (useXxx)
├── layouts/                # Page layouts
├── pages/                  # Route pages
├── plugins/                # Client plugins
├── stores/                 # Client-side state
├── types/                  # TypeScript models
└── utils/                  # Framework-agnostic utilities
server/
├── api/                    # Nitro API endpoints
└── assets/                 # Changelogs
shared/
└── types/                  # Shared TypeScript types (client & server)
i18n/
└── locales/                # de-CH & en translations
test/                       # Vitest config & setup
e2e/                        # Playwright E2E tests (*.spec.ts)
docker/                     # Docker compose files & Nginx config

Testing & Quality Assurance

Unit Tests (Vitest)

# Run all unit tests
mise run test:unit

# Run tests in watch mode
mise run test:watch

# Run with coverage report
mise run test:coverage

Type Checking & Linting

# TypeScript strict type check
mise run tsc

# Biome code formatting
mise run lint

# Biome check & autofix
mise run check

End-to-End Tests (Playwright)

# Build, serve and run all E2E tests
mise run e2e

# Run with Playwright interactive UI
mise run e2e:ui

# Generate tests via Playwright codegen (requires a running e2e:serve)
mise run e2e:codegen

Production Build & Deployment

Build & Preview

# Build production bundle
mise run build

# Preview production build locally
mise run preview

Docker Deployment

Build and run using the multi-stage Dockerfile:

# Build Docker image
docker build -t anony-mate-frontend .

# Run container
docker run -p 3000:3000 anony-mate-frontend

License

MIT © Data Competence Center Basel-Stadt

DCC Logo

Datenwissenschaften und KI
Developed with ❤️ by DCC - Data Competence Center