Skip to case study
Back to projects

// Evidence Dossier

Confidential Governmental System

Digital dossiers for finding information, reviewing pending work and sharing documents within an isolated institutional network. End-to-end development of the application, permissions, persistence and Windows operation setup.

Node.js 22Express 5Prisma 5SQLiteJWT / RBACZodHMAC-SHA256AES-256-GCMLocal-FirstPowerShell / BATWindows ServiceHelmet / CSP
SANITIZED SYSTEM VIEW
INTEGRITYHMAC-SHA256 Chained
PERSISTENCESQLite · Prisma ORM
ENCRYPTIONAES-256-GCM · if configured
DEPLOYMENTWindows Service · guided setup
TEST SUITE17/17 + 10/10 local checks
Technical illustration in place of an institutional screenshot. System deployed on an isolated network; this case study details its validation in a controlled lab environment.

From scattered paperwork to shared dossiers

Find a person, open their dossier and view documents, status and movements together. Authorized staff consult information on the internal network and act according to their role.

  • Information that is easier to find and consult.
  • Less reliance on sheets and printing to share it.
  • A shared view of documents and pending work, within permissions.

The author observed these improvements while using the system. They are qualitative benefits; technical checks and their limits are explained below.

Who it serves

Administrative staff and unit leadership consulting dossiers on an isolated local network.

My responsibility

Complete autonomous full-stack development: Express 5 API architecture, Prisma/SQLite persistence, local-first SPA, HMAC-SHA256 cryptographic auditing, encrypted backups, and automated Windows deployment.

Current status

Operational on an isolated institutional network. Published technical validation used a local copy; institutional identity withheld.

What it enables

Shared access to documents, status and movements. From observed use, the author reports faster information access, less paperwork and printing, and a clearer view of dossiers.

Context

Administrative and document system designed for an isolated institutional network. The core interface and API use local resources. An optional external font in the template is unavailable without internet. Institutional identity, dossiers and topology are withheld.

Problem

Finding a sheet was only part of the task: staff also needed to know who it belonged to, what documentation was missing and which movements had been recorded. Separate folders and spreadsheets meant assembling information from several places to answer a query.

The problem was to turn scattered information into a dossier that authorized staff could consult and update. Paper could remain where a procedure required it; the panel provides a shared digital working reference.

My role

I designed and developed the full-stack system individually: Express 5 REST API architecture, Prisma data modeling and migrations with embedded SQLite, interactive local-first SPA UI with self-hosted vector icons, HMAC-SHA256 cryptographic audit engine, AES-256-GCM encrypted backup pipeline, and Windows deployment automation via background Windows Service and client BAT scripts. Institutional identity, personnel information, and source code remain reserved.

Constraints

The intended setting is an isolated institutional network with Windows workstations. Personnel data, real screenshots, reserved code, credentials, addresses and infrastructure details cannot be published. Confidentiality also limits public verification of deployment. Offline use requires local assets; an optional external font may be absent.

Solution

The dashboard brings together sections, people, document status, files and movements. A typical journey is finding a person, opening their dossier and checking what is missing. When a document arrives, an administrator can attach it and update its status; a read-only user consults permitted information.

Search handles accents, case and multiple terms in any order. It filters records already received by the browser, without querying the database on every keystroke. When reading files or saving changes, the server checks the session and permissions again. Finding a row and authorizing an operation are separate responsibilities.

In plain terms: answering a query no longer depends on piecing a dossier together from separate sheets and records. Available information is grouped by person, and each role acts within its permissions.

Architecture

The browser displays the dashboard and sends queries and changes to a shared server on the local network. Express 5 delivers the HTML/CSS/JavaScript interface and handles the API, the layer that receives those requests. Prisma organizes record reads and writes in SQLite. Documents live on disk; the database holds their references.

In plain language: workstations consult one central digital filing cabinet rather than maintaining independent spreadsheets. Core functions do not need internet access, but workstations still need the server and local network. HTTPS requires configured certificates.

After relevant changes, the server attempts an HMAC-SHA256 audit write. Separately, a scheduled task backs up records and documents; AES-256-GCM encrypts the backup when a valid key is available. The diagram distinguishes these branches so saving, auditing and backing up are not mistaken for one operation.

Administrative flow and architecture
Administrative flow and architectureRequests from the authorized workstation enter the Express API for session and role validation. If access is valid, administrative queries or changes execute against SQLite (via Prisma) or protected documents. Audit logging runs downstream after the operation. Responses return data or errors to the presentation layer. Database and file backups run as a separate scheduled process.NOYESLater write, no shared transactionAuthorized workstationWeb clientExpress APISession and roleValidaccess?AccessdeniedAdministrativeread or updateSQLiteProtecteddocumentsAuditrecordPresentationData or errorSEPARATE SCHEDULED PROCESSDatabase andfile backupEncryption requires a valid key.Restore: separate check.Administrative flow and architectureRequests from the authorized workstation enter the Express API for session and role validation. If access is valid, administrative queries or changes execute against SQLite (via Prisma) or protected documents. Audit logging runs downstream after the operation. Responses return data or errors to the presentation layer. Database and file backups run as a separate scheduled process.YESNOLater write, no shared transactionAuthorized workstationWeb clientExpress APISession and roleValidaccess?Administrativeread or updateAccessdeniedSQLiteProtecteddocumentsAuditrecordPresentationData or errorSEPARATE SCHEDULED PROCESSDatabase andfile backupEncryption requires a valid key.
Read the diagram and its limits

Requests from the authorized workstation enter the Express API for session and role validation. If access is valid, administrative queries or changes execute against SQLite (via Prisma) or protected documents. Audit logging runs downstream after the operation. Responses return data or errors to the presentation layer. Database and file backups run as a separate scheduled process.

Initiator and path: Requests originate from the authorized workstation via the web client, reaching the Express API to validate session tokens and operator roles before permitting any action.

Components and connections: If authorization fails, access is rejected immediately. When valid, the API processes the administrative read or update against SQLite (via Prisma) or local protected file storage. Audit logging occurs downstream after the primary action.

Map simplifications: Various administrative transactions and internal procedures are grouped into a single high-level operation block to maintain strict organizational confidentiality.

Validation state: Session authentication, typed SQLite queries via Prisma, local document handling, and synthetic search sample tests were verified locally using isolated test suites.

Scope and limits: The diagram does not prove high availability, distributed replication, or physical network isolation. The audit write does not share an atomic transaction with the data update (an audit failure does not roll back the change), and the scheduled backup runs as an external detached process whose restoration requires separate verification.

High-level architecture map. Confidential administrative system; authentication, SQLite persistence and search verified locally using synthetic data.

Critical flow and pipeline

1. A user signs in; the server validates credentials and issues a revocable JWT.

2. Protected Express routes check session and role. Mutations with defined bodies use Zod validation.

3. Staff read or update people, checklists and movements. Prisma persists records in SQLite; file uploads add binary type checks and disk storage. The interface displays and filters the response.

4. After a relevant operation, the server attempts to append an audit event. That write has its own transaction: an audit failure does not automatically roll back the main change.

5. Separately, scheduled backup collects database and files. Restore runs and is checked through another command.

Concurrency and data integrity

The audit queue serializes writes within one process. In the isolated copy, 25 concurrent promises produced 25 linked events and a valid chain. Multiple processes and sustained load were not tested. Administrative writes and audit writes are not atomic together. Access control uses shared roles, not ownership of an individual dossier; isolation between users with the same role is not claimed. Recovery requires matching database and files.

Engineering decisions

Each decision is explained through the problem it addresses and the cost it introduces. This reading follows the code and documented constraints; the project does not retain formal ADRs recording a historical comparison of alternatives.

One shared local server

Benefit: The interface and central records can be accessed through browsers on the isolated network. An external service would require connectivity this setting does not assume.

Tradeoff: Workstations still depend on the server and internal network. Local-first does not mean every workstation can operate disconnected from the server.

In plain terms: Workstations share one record without needing internet. They still need the server and internal network to be available.

SQLite with Prisma

Benefit: Records live in an embedded database on the server, without another database service to administer. Prisma expresses relationships between people, documents and movements.

Tradeoff: Installation is simpler, but single-instance tests do not demonstrate capacity for multiple servers or sustained load.

In plain terms: The database is managed alongside the application. This simplicity requires capacity checks before increasing load or distributing the service.

Files on disk, references in the database

Benefit: Document contents are separated from their management records. Authenticated routes control delivery to the browser.

Tradeoff: Restoring only the database leaves dossiers incomplete: the matching files are also needed.

In plain terms: The dossier identifies each person’s document; recovering it requires the file as well as its reference.

Guided Windows setup

Benefit: PowerShell prepares the server and BAT configures clients. Repeatable steps are automated to reduce manual setup work.

Tradeoff: An operator must choose settings and certificates. Running an assistant alone does not establish that an actual installation is configured correctly.

In plain terms: The assistant repeats setup steps. A person still needs to choose the configuration and verify the workstation.

Security and defense in depth

Revocable JWTs, admin/viewer roles, Zod for defined bodies, request limits and Helmet headers are implemented. Files require a session. X-Requested-With is a request header gate, not a CSRF token. HMAC-SHA256 detects changes to retained events with trusted keys; it does not prove all operations were logged or prevent deletion. Backups are encrypted only with a valid key. An isolated network reduces external exposure but does not replace endpoint or operational controls.

Testing and scope

The previous technical validation documented the following results. An isolated source copy was prepared and dependencies installed from its lockfile, without copying operational credentials, databases or documents. Tests were rerun with temporary SQLite, fictional users and a loopback server. All 17 original tests passed, covering sessions, roles, record operations, persistence, audit export, upload/download, validators and utilities.

Ten additional checks passed against real modules, including 25 concurrent audit writes in one process, tamper and intermediate-deletion detection, key rotation and sanitization. Six BAT simulations, message and filter checks, client syntax and Prisma schema validation with fictional configuration also passed.

npm audit --omit=dev flagged six dependencies: one moderate, four high and one critical. Passing functional tests does not resolve these advisories. Restore retains historical evidence and was not rerun here. Deployment and the institutional service were not inspected.

Results and scope of the checks
CheckResultScope
Original suite17/17 passed12 integration and 5 utility cases with temporary SQLite and loopback server.
Additional checks10/10 passedReal modules: 25 concurrent writes in one process, integrity, key rotation and sanitization.
Client setup6/6 simulations passedBAT with temporary hosts file and simulation mode; no real workstations changed.
Frontend and schemaChecks passedClient syntax, static messages and filters, Prisma schema with fictional SQLite URL.
Production dependencies6 dependencies flaggednpm audit --omit=dev: 1 moderate, 4 high, 1 critical according to npm; exploitability was not assessed.
Encrypted restoreHistorical evidenceEarlier report documents an isolated restore; it was not repeated in this review.
Institutional operationNot checkedNo access to service, real workstations, usage metrics or sustained-load test.

Deployment and operation

The repository prepares the server with a PowerShell assistant and clients with BAT. The operator chooses installation and certificate settings; HTTPS depends on configuration. Scheduled backups are encrypted only with a valid key; restore verification is separate. I developed, tested, and operated the software locally on an isolated institutional network. This technical review validated an isolated copy and did not access the active installation.

Outcome

The implemented result is a shared digital reference: find a person, consult their documents and pending items, review movements and update what the role permits. This connects consultation with the administrative work that follows.

From using the system, the author reports faster information access, less paperwork and printing, and clearer visibility of available records. The author describes better information sharing and preservation; paper consumption, time and incidents were not measured here. Centralization supports organization and access, while continuity also depends on backups and recovery.

The earlier personal estimate of roughly 60% less processing and retrieval time remains an unaudited reference: there is no retained baseline, period, sample or calculation method. Observed qualitative benefits and verified capabilities are presented separately from that percentage.

Evidence and limits

Implemented: routes, schema, interface, audit, backups and scripts in the reviewed source. Locally checked in the previous technical validation: rerun original suite, additional checks, syntax, filters and schema, with fictional data. Simulated: client BAT setup. Author-reported use: faster information access, less paperwork and printing, and clearer document visibility, without new metrics. Development and deployment: sole full-stack development, prior institutional deployment and the 60% estimate. Pending: current service status, contemporary restore, sustained load and resolution of the six flagged dependencies. No dossiers or reserved source are published.

Field observations

Deployment on an isolated network was recorded in the project’s local technical documentation. This technical review ran an isolated copy without intervening in active institutional workstations or users.

Concurrency and load tests

25 simultaneous calls to the audit service produced 25 records and a valid chain in temporary SQLite. The module queue serializes them within one process. This does not establish cross-server concurrency or continuous-load performance.

Software quality and UX

The interface groups records by section and supports name or grade search with accent normalization and multiple terms. Local tools checked status filters and error messages; no usability session with operators was run. The following sample explains search over loaded rows and tests fictional data. It does not represent authorization or reveal security logic.

Code sample and engineering test

The improvement illustrated by this code is concrete: finding a person without entering their name exactly as stored. This is an isolated public adaptation of client search, with fictional data and simplified fields. The institutional code also manages visible rows and their sections; this sample retains only the matching rule and does not implement permissions.

Example: entering “PEREZ inspector” returns “Ana Pérez · Inspector”. The unaccented surname and rank match even in a different order. Adding “inexistente” removes that match. Clearing the query shows all rows received again.

JavaScript / Node.js
// Isolated UX example: filter rows already loaded in the browser.
export function findPeople(rows, query) {
const normalize = (value) => String(value ?? '')
.normalize('NFD')
.replace(/[\u0300-\u036f]/g, '')
.replace(/[^\p{L}\p{N}\s]/gu, '')
.toLowerCase()
.trim();
const terms = normalize(query).split(/\s+/).filter(Boolean);
if (terms.length === 0) return rows;
return rows.filter(({ grade, name }) => {
const visibleText = normalize(`${grade} ${name}`);
return terms.every((term) => visibleText.includes(term));
});
}

How to read this code

  1. Normalize the text

    normalize makes both the query and data comparable: it removes accents and punctuation, lowercases text and trims spaces at the ends.

  2. Separate the words

    split divides the query into terms; filter removes empty terms. An empty query returns all rows received.

  3. Require every term to match

    Each row combines rank and name. every checks that all terms appear in that text, without requiring a particular order.

  4. Return matching rows

    filter builds the result without changing input records. It works in memory: it does not download files or query the database on each keystroke.

Isolated sample test

JavaScript / Node.js
import assert from 'node:assert/strict';
const rows = [
{ grade: 'Inspector', name: 'Ana Pérez' },
{ grade: 'Analista', name: 'Mario Soto' },
];
assert.deepEqual(findPeople(rows, 'PEREZ inspector'), [rows[0]]);
assert.deepEqual(findPeople(rows, 'ana inexistente'), []);
assert.deepEqual(findPeople(rows, ' '), rows);
console.log('3/3 synthetic search cases passed');

The exact displayed code and test were executed: 3/3 synthetic cases passed (accent and term order, no matches, empty query). No institutional records were used.