CaseKeeper Wiki
Installing, configuring, securing and supporting CaseKeeper — and everything a developer needs to build, understand and release it.
Reminder: CaseKeeper is a filing and organising tool. It does not give legal advice, and nothing it produces replaces advice from a solicitor, barrister or advice service.
Administrators
What CaseKeeper can do
A full overview as of v0.4.0. Everything runs on the user's own PC; nothing is uploaded unless the user chooses a cloud AI provider (since v0.6.0, see Privacy & security).
| Area | Features |
|---|---|
| Modes & navigation | Simple mode (essentials, plain English) or Professional mode (adds costs, Scott schedule, AI analysis, exports and the audit trail). Ctrl+K command palette, F1 help per screen, first-run welcome and getting-started checklist. Sidebar grouped into Overview, Papers, Track, Produce and Help & system. Dark teal and light themes. |
| Documents | Import PDFs, photos, scans, Word and text files (originals never touched). Explorer with right-click menus and sub-menus, drag and drop (including from Windows onto a category), rename (F2), selectable columns (Exhibit, Tags, From, Type, Size, Added), smart folders (Recently added, Needs attention), Starred, and Deleted items kept 30 days by default. Exhibit references (AB1, AB2…) in date order. Windows OCR makes scanned text searchable; notes on every page and document. |
| Bulk Case Import | Import a whole case folder and its subfolders in one go, with a full preview first (duplicates by SHA-256 contents, unsupported and unreadable files, folder-to-category mapping). Originals are never moved or changed; the folder structure is kept. Pause, stop and resume, even after closing the app. Optional local AI suggests a category and records for each document, every suggestion quoting its page, and nothing reaches the case until it's approved on the Import review screen. See Bulk Case Import. |
| Categories | About 470: every C-form and supplement, FL401–FL415, FGM001, FL701, divorce (D8, D84, D36, D11, D81, D50K), financial remedy forms, appeals (FP161, FP162, N161), EX107, PRA agreements, orders, hearings, public law, adoption and SGO, experts, police, health, education, identity, legal aid and costs, mediation, international, legal research and working papers. Find by any word or form code; sort grouped, A–Z or busiest first. |
| Case management | Case & hearings (countdowns, preparation checklists, register of orders), directions & tasks with overdue warnings, a deadline calculator aware of England & Wales bank holidays and FPR "clear days", contact log with attendance statistics, costs & expenses, Scott schedule, children's dates of birth, parties, and a timeline with location, people present and police/incident references. The dashboard shows the next hearing, overdue items, contact attendance and the next two weeks. |
| Letters & statements | Live-preview editor with fields filled from the case details. UK templates: letter to the court, witness statement (with statement of truth), position statement, case summary, letter to Cafcass, subject access request, formal complaint, letter to an MP, transcript request, adjournment request, without-prejudice proposal and chasing a direction. Letterheads in three styles, or import a Word letterhead/template (.docx/.dotx). Export to Word, PDF or HTML with no author names or Windows details. |
| Produce | Paginated PDF court bundles with cover, index and sections A–F (PD 27A style); chronology and summary reports for complaints or MP letters. |
| Help | Help assistant: ask in your own words and get step-by-step directions with buttons that go straight there (uses local AI with a map of the app; only the question is sent to the model, never the case; works more simply without AI). UK Family Law Guide & FAQ with a glossary. Screen readers can read every screen. |
| Optional AI (Ollama) | Summaries, chronologies, issues and allegations, inconsistencies, welfare-checklist mapping, safeguarding concerns and questions to consider, over the whole case, chosen documents, a category, a party, a date range or records. Granular mode for large sets. Bulk analysis with a fast built-in default model (gemma3:4b), Fast and Careful presets and settings matched to the PC's hardware (see AI speed & hardware). Editable prompts; GPU/CPU, threads, context and keep-alive settings. Off by default, local by default; remote servers must be allowed explicitly and use HTTPS. |
| Security & audit | Password protection encrypts documents, the database, snapshots and saved exports. Auto-lock on inactivity, Windows lock or Ctrl+L; one-click Maximum security. Hash-chained audit trail of every change (old and new values) that can be verified and exported. Error log with a reference on every message; logs never contain case content or the Windows user name. Decrypted temporary copies are wiped on close. |
| Data safety | Daily database snapshots, document integrity check, start-up health check, encrypted backups and merges that carry every record type and settings, a settings & templates file to move between PCs, several case libraries, and performance profiles (desktop vs laptop on battery). |
Release notes for every version are on the Software page and in CHANGELOG.md in the source.
System requirements
| Component | Requirement |
|---|---|
| Windows | 64-bit Windows 10 version 1809 (build 17763) or newer, or Windows 11 |
| Architecture | x64 only |
| Disk | ≈ 250 MB for the program, plus the documents you import |
| Runtime | None — .NET 8 is bundled (self-contained) |
| Windows features | Uses the built-in Windows OCR (Windows.Media.Ocr) and PDF renderer (Windows.Data.Pdf). OCR needs an installed OCR language pack (English is present on English installs). |
Installing & silent deploy
Two ways to install, one app. Get CaseKeeper from the Microsoft Store (signed by Microsoft, no SmartScreen warning, updated automatically by the Store) or use the website installer below. Both are the same program. The website version keeps its library in %LOCALAPPDATA%\CaseKeeper and the Store version in %USERPROFILE%\CaseKeeper. The first time the Store version opens, it offers to copy the website library across, leaving the original as it was. Uninstalling either one leaves its library in place.
# Microsoft Store version from the command line (Store ID 9PG5PJPHCXXF)
winget install --id 9PG5PJPHCXXF --source msstore --accept-package-agreements
The installer (CaseKeeper-Setup-v0.8.0.exe) is built with Inno Setup. By default it installs per-machine to C:\Program Files\DarkCipher Systems\CaseKeeper; users without admin rights can choose a per-user install from the elevation dialog.
# Silent per-machine install (run elevated) CaseKeeper-Setup-v0.8.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART # With a log file and a desktop shortcut CaseKeeper-Setup-v0.8.0.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /TASKS="desktopicon" /LOG="%TEMP%\CaseKeeper-install.log" # Custom install folder CaseKeeper-Setup-v0.8.0.exe /VERYSILENT /SUPPRESSMSGBOXES /DIR="D:\Apps\CaseKeeper" # Per-user install, no admin rights needed CaseKeeper-Setup-v0.8.0.exe /VERYSILENT /SUPPRESSMSGBOXES /CURRENTUSER
| Switch | Effect |
|---|---|
/SILENT · /VERYSILENT | Progress only · no UI at all |
/SUPPRESSMSGBOXES | Auto-answers message boxes |
/NORESTART | Never restart (CaseKeeper doesn't need one) |
/DIR="…" | Install folder |
/TASKS="desktopicon" | Create a desktop shortcut |
/CURRENTUSER · /ALLUSERS | Force per-user or per-machine |
/LOG="file" | Write a setup log |
The app doesn't auto-launch after a silent install (skipifsilent). If CaseKeeper is running during an upgrade, setup closes it automatically.
Upgrades & uninstall
- Run a newer installer over the old one — it recognises the existing install by AppId and upgrades in place.
- Upgrades never touch user data. Documents, notes, timeline, complaints and settings live outside the program folder.
- In-app updates (website version, since 0.5.0): Settings → Updates checks
https://darkciphersystems.com/downloads/casekeeper/update.json, offers an update only when both of its signatures (ECDSA P-256 and ML-DSA-65) verify against the keys built into the app, and runs the same setup program after a backup prompt. Automatic checks are off by default. Managed estates can keep deploying the installer silently instead. The Microsoft Store version is updated by the Store.
# Silent uninstall (per-machine)
"%ProgramFiles%\DarkCipher Systems\CaseKeeper\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
%LOCALAPPDATA%\CaseKeeper (or the custom library folder) and %APPDATA%\CaseKeeper by hand — after confirming they have a backup.Data locations
| Path | Contents |
|---|---|
%LOCALAPPDATA%\CaseKeeper | Default library root |
…\casekeeper.db | SQLite database with FTS5 search index (SQLCipher-encrypted when password protection is on) |
…\Files\ | Copies of imported documents (AES-256-GCM encrypted when protected) |
…\Exports\ | Generated bundles, reports and chronologies |
…\vault.json | Wrapped key material — present only when password protection is on; useless without the password |
…\.casekeeper-in-use.json | "Library in use" marker while the app is open (see network libraries) |
%APPDATA%\CaseKeeper\library-location.json | Remembers a library moved or opened from a custom folder |
Library placement
The library location is resolved in this order:
CASEKEEPER_LIBRARYenvironment variable, if set — useful to force the library onto an encrypted drive via policy.- The folder saved in
library-location.json(set by Settings & Backup → Your library). - The default,
%LOCALAPPDATA%\CaseKeeper.
# Per-user, persistent
setx CASEKEEPER_LIBRARY "E:\SecureVault\CaseKeeper"
In the app:
- Move library copies everything, verifies every file byte-for-byte, checks the database opens, and only then deletes the originals. Any failure leaves the original untouched.
- Use a different library… opens an existing library elsewhere without copying anything; choosing an empty folder starts a new library there.
- If the library can't be reached at startup, CaseKeeper offers to retry or pick another folder — it never silently recreates an empty library in a folder you chose.
Network & shared libraries
A library can live on a NAS or SMB share, and several PCs can point at the same folder — one at a time.
- On network paths the database switches from WAL to the rollback journal (
journal_mode=DELETE), because WAL needs shared memory that SMB doesn't provide. - While open, CaseKeeper writes
.casekeeper-in-use.json(machine, user, process, timestamps), refreshed every minute. Another PC opening the same library is warned first. - A marker left by a crash or dropped connection goes stale after 3 minutes and stops counting.
Password protection
- Turn on under Settings & Backup → Password protection. Every document file and the entire database (notes, OCR text, search index, timeline, complaints) is encrypted at rest with AES-256.
- Documents are decrypted only in memory — viewing, searching, OCR and bundle building never write a readable copy to disk.
- Changing the password is instant (only the wrapping key changes). Protection can be turned off again.
- There is no recovery. A lost password means permanently unreadable data — there's no admin override or escrow. Keep backups.
Backup & restore
- Settings & Backup → Create backup writes one
.zipwith the database and every document, optionally AES-256 encrypted. - If the library is protected and the backup isn't, CaseKeeper warns and offers to add a password.
- Import either adds to the current library (duplicates skipped; safe to repeat) or replaces everything (disaster recovery / new PC).
- Factory reset sits behind a typed confirmation and an offer to back up first.
For scheduled protection, back up the library folder with your normal file-backup tooling while CaseKeeper is closed (an open database may be mid-write), or use the in-app backup.
Bulk Case Import
New in v0.4.0. Brings a whole case folder, with all its subfolders, into the library in one job. Start it from Import folder on the Documents screen, Import a whole folder on the Dashboard, Ctrl+Shift+I or the command palette.
- Scan and preview (nothing changes yet). It shows how many files were found, which will be imported, duplicates, unsupported types and anything unreadable, with the total size. Untick single files or whole folders, filter, search, and copy a summary (counts and paths inside the folder only).
- Import. Each file goes through the normal import, so it's encrypted when the library is protected, fingerprinted (SHA-256) and audited.
- Read text. Windows OCR and Word/text extraction, in the background.
- Analyse (optional, local AI). A suggested category and records for each document.
- Cross-check. Plain rules across all the documents (below), then everything waits on the Import review screen.
| Behaviour | Detail |
|---|---|
| Originals | Never moved, renamed or changed, and nothing is written into the folder being imported. |
| Skipped by default | Hidden files and folders, temporary and system files (Thumbs.db, Office lock files). Shortcuts and linked folders aren't followed unless asked; folder loops are always detected. Long Windows paths work. Unreadable folders and files are reported and the rest carry on. |
| Duplicates | Matched by contents (SHA-256) against the library and within the folder, never by name. Skip (noting the matching document), import anyway, or decide one by one. Two different files with the same name are both imported. |
| Folder structure | Each document keeps its path inside the chosen folder (never the full Windows path), shown in its details and under By original folder in the Library tree. Folder names can become tags, or each top-level folder can map to a category; the mapping is shown before anything happens. |
| File dates | Kept for information only. A file's modified date is never used as the document's date. |
| Pause and resume | Progress is saved after every file, so a job survives pause, stop, a crash or closing the app; the Dashboard offers to carry on. Only one job runs at a time. A time estimate appears only once it can be measured. |
| Supported types | Those of the normal import: PDF, Word .docx, images and text. Others (.doc, .xlsx, .msg, .eml, .zip…) are listed as unsupported. |
| Limits | Up to 50,000 files and 64 folder levels per job. PDFs are read with Windows OCR, not from an embedded text layer. |
What the AI may suggest
With AI enabled (the local Ollama by default, where nothing leaves the PC or network; or, since v0.6.0, a cloud AI the user chooses, masked by default), each document can get a category and suggested records: hearings, orders, directions and deadlines, tasks, timeline and chronology entries, contact, parties and children, complaints, safeguarding concerns and documents referred to but missing.
- Short list of categories. CaseKeeper narrows its ~470 categories to 10 candidates using form codes, file-name rules, headings and shared words. The AI can only pick one of those or Unknown. A low-confidence pick becomes Uncategorised (needs review), with the guess kept.
- Strict, validated answers. The AI must answer in a JSON Schema (Ollama structured outputs), at temperature 0, and CaseKeeper validates the answer itself. A bad answer is retried once, then reported with a safe code, never guessed at.
- Traceable. Every suggestion quotes the words it relies on and their page. A quote not found on that page is flagged and its confidence capped. Dates must actually be written in the document (UK day-first; ambiguous all-number dates are flagged), and names the document doesn't contain are dropped.
- Dates keep their meaning. Issued, listed for (which doesn't mean it took place), adjourned, vacated, alleged, deadline and so on. Month- or year-only dates keep that precision.
- Deadlines are never calculated by the AI. Wording such as "within 14 days" is worked out by the existing deadline calculator from a start date and rule the person confirms, and the explanation is saved with the task.
- Allegations are recorded as what someone states, never as fact.
- Long documents are read in parts of whole pages and the findings merged, keeping page ranges.
- No re-analysis unless the document, prompt, model or format changes, or the person asks. Existing documents can go through the same process: right-click → Analyse with AI → Organise.
- The instructions are editable in Settings → AI → Prompts → Bulk Case Import.
Cross-checks (rules, not AI)
The same event in several documents; a hearing given different dates; hearings later adjourned or vacated; different case numbers (documents that may belong to another case); names spelt differently; suggestions already in the case; directions a later order may have replaced; hearings and deadlines within 14 days; gaps of six months or more in the chronology. Conflicts are shown side by side and nothing is changed automatically.
When the AI isn't available
| Situation | What happens |
|---|---|
| AI off, or Ollama not reachable at the start | The import still completes. CaseKeeper's own rules suggest categories from form codes, and documents wait as awaiting AI to be analysed later with one click. |
| Ollama lost mid-run | Bounded retries (2 s, 5 s, 12 s), then the rest wait for later. |
| Timeout | One retry, then that document is marked failed and the job carries on. |
| Source file gone after the scan | Marked missing; the rest continue. |
| A file changes while being imported | The fingerprint is taken from the stored bytes; a mismatch with the scan fails that file. A failed import never leaves an orphaned copy (true of every import from v0.4.0). |
Import review
A screen in the sidebar under Papers. It lists every suggestion by type, with filters for confidence, document, dates and warnings, and a summary of each import. Nothing the AI suggests reaches a case record or a document's category until the person approves it.
- Each suggestion shows its source document, page and quoted words (Open at page), what the date means, who says so, the confidence in plain English and why, any warnings, and other documents to compare with.
- Actions: Approve, Edit & approve (the same form as adding it by hand), Reject, Defer, Reconsider, and Undo for approvals. Several categories can be approved at once. A warning appears before adding something that looks like an existing record.
- Approvals go through the normal rules (a hearing also gets its timeline entry, and so on) and are audited as AI-suggested and approved by the user, with the model and prompt version.
- Rejected suggestions keep no quoted text or detail.
- Confidence thresholds and the longest document read in full are adjustable in Review options.
AI speed & hardware
Bulk analysis uses gemma3:4b by default: quick and reliable at structured answers. If it isn't installed, Review options offers to download it (about 3 GB, only when asked, and audited). Two presets: Fast (recommended) and Careful, which uses a larger model such as qwen3:14b only when the graphics card can hold it, and says so otherwise.
CaseKeeper sorts the PC into a tier from graphics memory, system memory and power source. Detection reads the display adapter's memory size from the registry and the power state; nothing is sent anywhere. Review options shows "This PC: …" with a Use recommended settings button.
| Tier | When | Documents at once | Reading | Careful model |
|---|---|---|---|---|
| Minimal | No usable graphics card and under 8 GB memory | 1 | Categories only; AI off by default | — |
| Basic | A basic PC, or any PC on battery / power saver | 1 | Categories and document details only | — |
| Mid | Graphics card ≈ 6–10 GB | 2 | Full | Up to 8B, if it fits |
| High | Graphics card 12 GB or more | 3 | Full | qwen3:14b class |
| Very high | Graphics card 24 GB or more | 4 | Full | Up to 32B class |
- Fits: a model fits when it's at most 85% of graphics memory, or 45% of system memory (CPU, slow). Larger models are marked "too large for this PC".
- Several at once only helps when Ollama allows parallel requests (
OLLAMA_NUM_PARALLELon the Ollama host). - Thinking models (qwen3, deepseek-r1, gpt-oss and similar) have thinking switched off or set low for bulk analysis. Output is capped (2,048 tokens, 12 findings per part).
- Less work for the AI: photos with little text get a quick reading (category and description only). In a quick reading, a document whose form code settles the category for certain isn't sent to the AI at all; its suggestion still waits for approval and is never auto-applied. Basic and Minimal PCs read in smaller parts.
- Automatic step-down: if Ollama runs out of memory, a part times out twice, or under 90% of the model sits on the graphics card, CaseKeeper eases off one step at a time: one document at a time → half-size parts → a lighter installed model → quick reading. It reports what it changed and records it in the audit trail. Each document is tried at most three times.
- The user's choices win: model, speed, reading depth and documents at once can all be set by hand, with a warning if the PC can't sensibly run them. On first connecting in Settings → AI, gemma3:4b becomes the AI model only if it's installed and none was chosen.
| Setting key | Meaning |
|---|---|
bulk.preset | fast or careful |
bulk.model | Model name; empty = recommended |
bulk.depth | auto, full or categories |
bulk.aiWorkers | Documents at once, 1–4; empty = this PC's tier |
bulk.high · bulk.medium | Confidence thresholds |
bulk.maxParts | Longest document read in full, in parts |
bulk.autoApply · bulk.autoApplyThreshold | Off · 0.95 (never below 0.85) |
bulk.options | Remembered wizard choices |
prompt.bulk.analyse | The editable bulk analysis prompt |
Privacy & security
- No network use unless you ask. No account, telemetry or cloud OCR; text recognition uses the engine built into Windows. Internet connections happen only when the user asks: the update check in the website version, made when the user clicks Check for updates or switches on automatic checks, which downloads
update.jsonand its two signatures (and the setup program, if the user chooses to update) from darkciphersystems.com, with a generic User-Agent and no cookies or identifiers; and a cloud AI, if the user chooses one (below). - The local AI talks only to the configured Ollama server (local by default; a remote one must be allowed and use HTTPS). Model downloads happen only when the user presses the button.
- Cloud AI (optional, off by default, since v0.6.0). In Settings → AI the user can choose Anthropic, OpenAI, or Claude or OpenAI on their own Microsoft Foundry resource. Only then is the text of the documents they ask it to analyse sent, over HTTPS (TLS 1.2 or 1.3), to
api.anthropic.com,api.openai.comor their own Foundry resource, never anywhere else, with redirects never followed, no cookies and no settings taken from environment variables. Names, contact details, ID numbers, dates of birth and addresses are masked by default, and nothing is sent without the user's agreement, checked again at the moment of sending. Keys are the user's own, encrypted for their Windows account, and never written to logs, the audit trail, exports, settings files or backups. Maximum security switches cloud AI off, and importing a settings file or merging a library can never choose a cloud AI, add a key or a Foundry resource, turn masking off or agree to sending. - Case memory (since v0.8.0). A summary of the case built from the user's records, plus what CaseKeeper has learnt from their decisions, stored only in the library database on the user's PC: encrypted with everything else when the library has a password, included in backups and deleted with the library. It never contains anyone's contact details; for children it holds a year of birth only. A short case background from it is sent with each document the AI reads, so names stay consistent: with the local AI nothing leaves the PC; with a cloud AI it is sent only after the user agrees on the pre-send review, masked when masking is on. It can be switched off on the Case memory screen.
- Questions about the case (since v0.8.0). With a cloud AI, the question, the case memory and the matching document extracts go only to the provider the user chose, with the same consent and masking. The audit trail records counts only, never the question.
- Automatic additions (since v0.8.0). Whatever the AI adds to the case is marked From AI · check and listed for review; it can be undone, anything undone is never added again, and it can be switched off. Document versions and importance are worked out on the PC: nothing is sent, renamed or deleted.
- Original files are never moved or modified — they're copied into the library and fingerprinted for duplicate detection.
- Bulk import writes no decrypted temporary files. Its log entries hold only ids, stages, counts and safe codes — never document text, titles, file names or paths — and the audit trail records the imported folder's name, never its full path.
- Sharing uses the Windows Share sheet, behind a confidentiality reminder.
- Library data is sensitive family-court material. Avoid cloud-synced folders unless that's intended, and apply appropriate retention.
Identifiers
| Item | Value |
|---|---|
| Inno Setup AppId | {B6E4A1D7-3F28-4C5B-9A07-5E1C8D42F093} |
| Uninstall registry key | HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{B6E4A1D7-3F28-4C5B-9A07-5E1C8D42F093}_is1 (HKCU for per-user installs) |
| Executable | CaseKeeper.exe |
| Default install folder | %ProgramFiles%\DarkCipher Systems\CaseKeeper |
| Publisher | darkcipher0x |
Detection rule: the uninstall key's DisplayVersion, or the file version of CaseKeeper.exe.
Code signing & Smart App Control
The installer and app are not code-signed today.
- Smart App Control is off on enterprise-managed devices, so it won't block managed deployments.
- For App Control for Business / AppLocker, allow by hash or path (
%ProgramFiles%\DarkCipher Systems\CaseKeeper\*); refresh hash rules each release. - Verify downloads with the published SHA-256, or build from source and sign with your own certificate (add a
SignToolline toinstaller\CaseKeeper.iss).
Home-user guidance: Managing Smart App Control.
Troubleshooting
| Problem | Solution |
|---|---|
| "Windows protected your PC" | More info → Run anyway (unsigned installer). See signing. |
| Installer refuses to run | Requires 64-bit Windows 10 1809+; check architecture and build |
| Scanned text isn't searchable | Install a Windows OCR language pack for the document's language (Settings → Time & language → Language) |
| "Library in use" warning | Another PC has it open. Close it there, or wait 3 minutes if that PC crashed |
| Library can't be found at startup | Reconnect the drive/NAS and choose Retry, or open a different folder |
| Database errors on a network share | Ensure only one PC uses it; keep the share connected; restore from backup if damaged |
| Forgotten password | Not recoverable. Restore from an unprotected or known-password backup |
| Bulk import: documents "awaiting AI" | Ollama was off or unreachable. Start it, check Settings → AI, then analyse the waiting documents with one click |
| Bulk analysis is slow, or says it stepped down | Press Use recommended settings in Review options; use the Fast preset; on a laptop, plug in. Set OLLAMA_NUM_PARALLEL for several documents at once |
| Careful preset uses the Fast model | The larger model doesn't fit this PC's graphics card. Expected |
| Files listed as unsupported | Convert .doc/.xlsx/emails to PDF or .docx first |
| Data missing after reinstall | Check CASEKEEPER_LIBRARY and %APPDATA%\CaseKeeper\library-location.json point at the right folder |
Developers
Dev environment
| Tool | Why | Install |
|---|---|---|
| .NET 8 SDK | Builds the WPF app | winget install Microsoft.DotNet.SDK.8 |
| Inno Setup 6 | Builds the installer | winget install JRSoftware.InnoSetup |
| Git | Source control | winget install Git.Git |
| GitHub CLI | Optional — one-line releases | winget install GitHub.cli |
Get the code from the Source Code page.
Building
# Debug build and run cd CaseKeeper dotnet build dotnet run # Release installer → dist\CaseKeeper-Setup-v<ver>.exe cd .. powershell -ExecutionPolicy Bypass -File build-release.ps1
build-release.ps1 publishes self-contained for win-x64 into publish\, compiles installer\CaseKeeper.iss, and prints the installer path, size and SHA-256. It warns if CHANGELOG.md has no entry for the version being built. The installer's version is read from the built exe, so it can never disagree with the app. Release builds contain no debug symbols or local paths (see Release process).
Project layout
| Path | What's there |
|---|---|
CaseKeeper/Models/ | Documents, categories, parties, events, complaints |
CaseKeeper/Data/ | Database (SQLite + FTS5) and DefaultCategories (≈125 England & Wales family-court categories) |
CaseKeeper/Services/ | Library, OCR, PDF rendering, bundles, backup, vault, share, library lock |
CaseKeeper/Views/ | WPF windows and dialogs; MainWindow split into .Documents, .Records, .Bundle partials |
CaseKeeper/UI/ | Converters, natural sort, theme manager |
CaseKeeper/Themes/ | Light and dark palettes |
installer/ | Inno Setup script and pre-install notice |
.github/workflows/ | Tag-triggered release workflow |
build-release.ps1, RELEASING.md, CHANGELOG.md | Release tooling and notes |
Data model
A single SQLite file, casekeeper.db, in the library folder. WAL journal locally, rollback journal on network paths.
| Table | Purpose |
|---|---|
Categories | Built-in and custom categories, with bundle section |
Documents | Imported files: metadata, category, party, fingerprint, star |
PageText | OCR / extracted text per page |
PageNotes | User notes per page |
Parties | People and organisations in the case |
Events | Timeline / chronology |
Complaints, ComplaintDocuments | Complaint log with references, due dates and linked documents |
Settings | Key/value app settings |
ImportJobs, ImportFiles, AiFindings | Bulk import working tables (v0.4.0): one row per job, per scanned file and per suggestion. Encrypted, snapshotted and backed up with the library, but not carried by backup merges |
SearchIndex | FTS5 virtual table over metadata, page text and notes (source: meta, page, notes, pagenote) |
User search input is converted into a safe FTS5 query (every word must appear, prefix match; quoted phrases match exactly).
Encryption design
password ──PBKDF2-HMAC-SHA256 (600,000 iters, random salt)──▶ wrapping key wrapping key ──unwraps──▶ random master key master key ──▶ AES-256-GCM for every document file (nonce 12 | tag 16 | ciphertext) master key ──▶ SQLCipher passphrase for casekeeper.db
- Implemented in
Services/Vault.cs; key material invault.json(salt, iterations, wrapped key, verifier). - Changing the password only re-wraps the master key — no document re-encryption.
- GCM authenticates as well as encrypts, so tampered files fail to decrypt rather than returning garbage.
- SQLCipher comes from
SQLitePCLRaw.bundle_e_sqlcipher.
Services
| Service | Responsibility |
|---|---|
LibraryService | Resolves the library root (env var → saved location → default), import, move, open-elsewhere |
LibraryLock | "In use" marker for shared libraries (1-minute refresh, 3-minute staleness) |
OcrService | Windows.Media.Ocr text recognition |
PdfRenderService | Windows.Data.Pdf page rendering for the viewer and OCR |
BundleService | PD 27A-style paginated bundles and summary reports (PDFsharp) |
BackupService | Zip backups (optional AES-256), add/replace import, merge |
Vault | Password protection and key management |
ShareService | Windows Share sheet integration |
BulkImportService | The single orchestrator for Bulk Case Import (one job at a time) |
Bulk import design
The full architecture is in docs/BULK-IMPORT.md in the source. In short:
folder ─▶ FolderScanner.Scan ─▶ FindDuplicates (SHA-256) ─▶ BulkImportService.PreviewRows
│ user reviews, ticks, maps
CreateJob ─▶ ImportJobs + ImportFiles (audited: bulkimport.start)
RunAsync ─▶ 1 Import LibraryService.Import (Uncategorised or the folder mapping)
─▶ 2 Text LibraryService.ProcessTextAsync (bounded by the performance profile)
─▶ 3 Analyse CategoryMatcher.Candidates ─▶ Ollama structured output
─▶ AnalysisSchema.Parse ─▶ provenance + date checks ─▶ AiFindings
─▶ 4 Check FindingChecks.Run (deterministic cross-document rules)
Review ─▶ ImportReviewView ─▶ FindingApprover.Approve / Reject / Defer / Undo / Reconsider
- Reuse, don't duplicate. Files go through
LibraryService.Import, approvals through the sameDatabasecalls and edit forms the screens use, hearing timeline entries throughHearingSync, deadlines throughDeadlines.Calculate. - Working tables are
[Entity]classes like the record tables (columns added on upgrade, never removed), written withSaveQuiet, with meaningful events audited explicitly. They're not inDatabase.RecordTypes, so merges don't import another library's suggestions.Database.CheckStagingtidies rows pointing at deleted documents. - New
Documentscolumns:SourcePath(path inside the chosen folder, never the full path) andSourceModifiedAt(information only). - AI contract:
AiService.ChatJsonAsyncwith a JSON Schema fromAnalysisSchema.Build(JSON mode on older servers; validated either way), temperature 0. Category ids are anenumof the candidate keysK1…KnorUNKNOWN, so an invented id is impossible or rejected. Failures get safe codes (AI_INVALID_JSON,AI_SCHEMA,AI_BAD_CATEGORY,AI_TIMEOUT,AI_OVERLOAD,AI_OFF,AI_UNAVAILABLE,AI_STEPPED_DOWN). - Re-analysis is keyed on
DocumentAnalyzer.InputFingerprint: content hash, page text, prompt hash, schema and analysis versions, model and part size. New results mark undecided suggestionsSuperseded, never deleted. - Hardware tiers live in
Services/Ai/AiHardware.cs; step-down inBulkImportService.AnalysisPhaseAsync. - Privacy: no decrypted temporary files;
AppLogentries carry ids, stages, counts and safe codes only; only the exception type is logged.
Dependencies
| Package | Version | Use |
|---|---|---|
| Microsoft.Data.Sqlite | 8.0.10 | Database access |
| SQLitePCLRaw.bundle_e_sqlcipher | 2.1.10 | SQLCipher-enabled SQLite native library |
| PDFsharp-WPF | 6.1.1 | Bundle and report PDFs |
| SharpZipLib | 1.4.2 | Zip backups with AES |
Target framework net8.0-windows10.0.19041.0, minimum OS 10.0.17763.0, self-contained win-x64.
Release process
- Bump the version in
CaseKeeper/CaseKeeper.csproj—Version,AssemblyVersion,FileVersionandInformationalVersionmust agree. Patch for fixes, minor for features, 1.0.0 when stable. - Write patch notes at the top of
CHANGELOG.md(## v0.4.0 — date, then Added / Fixed). - Build:
powershell -ExecutionPolicy Bypass -File build-release.ps1. - Test the upgrade on a machine with the previous version and confirm documents survive.
- Commit and tag:
git tag v0.4.0,git push origin main --tags. - Privacy check (see below), then publish the installer with its SHA-256 in the release notes.
Privacy rules for every release (0.2.2+)
CaseKeeper.csprojsetsDebugType=none,DebugSymbols=false,Deterministicand aPathMap, so the installer carries no.pdbfiles and the program contains no build-machine folder paths. Don't remove these.- Never test or demo with real case papers. Use dummy documents, made-up names and generic paths in screenshots, bug reports and examples.
- Before publishing, check
publish\(what the installer packs) for user names, user-profile folder paths, email addresses and.pdbfiles.
installer\CaseKeeper.iss — it's what lets a new version upgrade an old one instead of installing alongside it.GitHub Actions
.github/workflows/release.yml runs on windows-latest whenever a v* tag is pushed (or manually):
- Sets up .NET 8 and installs Inno Setup via Chocolatey.
- Runs
build-release.ps1. - Fails if the tag doesn't match
<Version>in the project file. - Creates a draft GitHub release with
CHANGELOG.mdas the body and the installer attached.
Contributing
- MIT-licensed — fork, modify and redistribute with the copyright and licence notice intact.
- Keep it local-first: no network calls except the ones the user chooses (AI, model downloads, update checks), no telemetry, never modify a user's original files.
- Never test with real case documents in bug reports — use dummy files.
- Questions or patches: email or Discord.