Skip to case study
Back to projects

// Case study

ASD Contabilidad & Sistemas

From prepared file to private access: a document workflow with reviewed recipients, confirmed operations and practical tools for the accountant.

Node.jsExpressMySQLElectronWindowscPanel
Project video preview.

From manual delivery to a private document portal

The accountant prepares and publishes PDFs from the Windows app. Each business signs in to the portal to access its own documents.

  • Review the recipient and category of each PDF before publishing it.
  • Keep the accounting period even when a file is uploaded later.
  • Download published documents without asking the accountant to send them again.

Local tests with fictional accounts verified that an authorized download worked and a request from another business was denied.

Who it serves

An accountant and small businesses that need accounting records without relying on someone being physically present at the office.

My responsibility

I designed and built the institutional site, portal, API, data model and Windows panel, documenting requirements, decisions, operation and validation.

Current status

Version 2.3.0 is published according to the project record. This review checks source and local tests, separating delivery from acceptance on the accountant’s device.

What it enables

Prepare and review documents in one panel, recover uncertain jobs and offer each client private access.

See how I structure client portals for small businesses

Context

ASD Contabilidad & Sistemas serves small businesses that need balance sheets, forms, and other records for everyday operations. A request can arrive while the accountant is handling another task or away from the office. Previously, finding the file and replying depended on a manual step.

The product brings together three surfaces for different needs: an institutional website for services and enquiries, a Windows panel for managing clients and publishing documents, and a private portal where each business can consult its own files. An API and database coordinate the journey. This case explains how those pieces connect and why the main decisions were made.

Problem

Responding to a request meant locating the file, identifying its business and sending it manually. Beyond the time involved, that process created opportunities for recipient, classification, and tracking mistakes.

Digitizing PDFs alone would not resolve the issue. The accountant needed to distinguish local selection from confirmed publication; a lost network response could leave it unclear whether a file had been saved; and the portal had to prevent one business from downloading another’s documents. The problem combined work organization, operation continuity, and private access.

My role

I designed and built the full journey: requirements, institutional website, client portal, Express API, MySQL model, and Windows application. In the panel I handled search, client creation and editing, batch preparation, and upload states. On the server, the focus was confirming operations and authorizing delivery of the correct document.

I also structured the documentation as a requirements specification, decision register, accountant manual, and deployment guide. That traceability connects each user task to a technical criterion and a check instead of presenting isolated features.

Constraints

The service had to run on managed hosting with a specific Node.js startup mechanism, while the accountant worked on Windows. Publishing the web service and delivering the desktop application were distinct processes: each needed an effective-version check and preservation of working data.

PDFs contain sensitive information. The panel had to fix recipient and type before sending, including when working with long client lists; the API had to check authorization at publication and download. A broken connection could not turn an uncertain result into a second document. Those constraints shaped the local queue, operation receipts, and visible interface states.

Solution

The public site presents services and receives enquiries. The Windows panel supports client search and management, account status and document preparation. Search retains loading and error states rather than disguising a connection failure as an empty list. The accountant manages client passwords. Clients use the assigned password without a mandatory first-login change; administrator rules are separate.

An upload review shows the recipient, category and PDFs. Batch preparation proposes values from each filename and allows correction before confirmation. It does not read PDF contents or establish ownership. The optional reporting month uses YYYY-MM: a September balance sheet uploaded in October can retain September as its reporting month. The value is not inferred from upload dates and old documents are not backfilled. Limits remain 25 MB per file and 100 PDFs per batch.

View Files supports filtering by filename, category or upload date, opening with the default PDF viewer and saving to a chosen destination. The panel verifies the bytes before opening or saving. History supports operation review and CSV export for the local profile. Clients use their portal to retrieve documents authorized for their account.

Architecture

The institutional website handles commercial contact. The Windows application concentrates accountant tasks, and the private portal serves client retrieval. Both communicate with an Express API. MySQL stores accounts, sessions, document references, and operation results; PDFs remain outside public web content and are delivered through the service.

This separation gives each layer a verifiable responsibility: the panel captures the intent to publish, the API validates and confirms the operation, and the portal presents documents without deciding on its own who may download them. The diagram shows actors and flow; the requirements specification sets the rules for each transition, and the ADRs explain choices the drawing alone cannot convey. Sensitive actions leave an outcome record without placing passwords or documents in that evidence.

ASD Contabilidad & Sistemas document and access flow
ASD Contabilidad & Sistemas document and access flowThe architecture separates public contact, the accountant Windows Electron application, the private web portal, and the Express API that controls MySQL metadata and private PDF streaming.DocumentsAccessMetadataPDFRecoveryVisitorAccountantClientAdministratorPublic websiteHTML · CSS · JSElectron applicationWindows · PanelPrivate portalWeb session · Role-basedContact formPublic channelExpress APINode.js · Auth & RoleMySQLPrivate PDFsRecovery logASD Contabilidad & Sistemas document and access flowThe architecture separates public contact, the accountant Windows Electron application, the private web portal, and the Express API that controls MySQL metadata and private PDF streaming.VisitorPublic websiteHTML · CSS · JSContact formPublic channelAccountantClient / AdminAuthorized usersApp ElectronWindowsPrivate portalWeb sessionExpress APINode.js · Auth & RoleMySQLPrivate PDFsRecovery log
Read the diagram and its limits

1. Flow reading and initiators: The visitor initiates the public journey through the institutional website and contact form without access to private documents. The accountant initiates publication from the Windows desktop panel (Electron). Clients and administrators initiate authenticated query requests from the private web portal.

2. Components and connections: The public website uses HTML, CSS and JavaScript. The Express API checks access and delivers private PDFs. MySQL stores accounts, metadata, operation receipts and audit events. A separate recovery log preserves security state needed after a restoration; it is not the same as the audit table or the panel’s local history.

3. Groupings and simplifications: On mobile, client and administrator roles are visually grouped because they interact with the same private portal interface under role-specific permissions. Internal Electron packaging and secondary middleware passes are omitted to highlight the security boundary.

4. Implementation and verification: The review runs Jest backend suites and Node.js frontend/desktop tests, including native Electron with temporary profiles and simulated services. Earlier SQL journeys and version 2.3.0 publication are identified separately in the test table.

5. Scope: The drawing simplifies request and response paths. The Windows panel can also retrieve verified PDFs. It does not establish maximum capacity, production availability or installation acceptance on the accountant’s computer.

Implementation map. Receipts in MySQL, the recovery log and local panel history have different responsibilities. Test scope and delivery evidence are explained below.

Document pipeline

1. The accountant selects PDFs through the system picker and searches for a recipient. Filtering helps locate a business but does not authorize an upload. In a batch spanning businesses, each file retains its own client, category and optional reporting month.

2. Every row is reviewed before confirmation. The application rechecks clients and files and verifies server support when a reporting month is supplied. One persistence step accepts the entire batch into the queue: failed preparation does not accept only some rows. Subsequent publication is confirmed per document.

3. The API checks permissions, identity and PDF structure, stores the file privately and records the result. Local selection and sent bytes do not count as confirmed publication.

4. If the response is lost, the application checks the same job’s result before another upload. The accountant or client can then request the document through their authorized interface. The service rechecks access and integrity. The panel also verifies the received PDF before opening or saving.

Concurrency and interrupted responses

An interrupted response does not establish that a document was not saved. Each job retains an operation identity, recipient and queryable result. The queue persists accepted work and reconstructs its state when the panel reopens. It distinguishes a definitive rejection from a result that still needs checking. Retries run while the application is open and connected; closing it does not leave a background upload service.

Saving a batch to the queue and publishing it on the server are separate events. Preparation saves all jobs together, but publication is confirmed for each PDF. Partial results remain visible without being described as complete delivery. While a server-capability query is slow, preparation references remain reserved to prevent another equivalent batch.

Document views discard stale responses when the open client changes. History retains outcomes for the local profile, including confirmed, rejected and withdrawn-unsent work. It is neither a central record of every device nor evidence of a recipient receiving or reading the document.

Decisions

Five decisions explain the project’s engineering: review recipients, recover uncertain operations, distinguish reporting month and history, control Windows updates and publish for the available hosting. Each presents the problem, selected approach, rejected alternative and tradeoff.

Version 2.3.0 adds convenience without turning an automated proposal into the accountant’s decision. Compatibility with earlier documents and receipts remains part of the design: a new reporting-month field does not reinterpret historical records.

  1. ADR-014Review the recipient before publishing

    Problem: A search match or filename can look correct while identifying another business.

    Decision: The accountant reviews the client and category for each PDF before confirming. A suggestion never authorizes publication on its own.

    Rejected alternative: Publish directly from a search match or a default document type.

    Tradeoff: Preparation reduces repetitive work while retaining human review of the destination and contents.

  2. ADR-002Check the result before repeating an upload

    Problem: A response can be lost after the server has saved a document.

    Decision: Each job retains its identity and a queryable receipt. The queue distinguishes a definitive rejection from an uncertain result.

    Rejected alternative: Treat every timeout as a failed upload and send the PDF again.

    Tradeoff: More states must be retained and handled in exchange for recovering the same job without blind duplication.

  3. ADR-038Separate reporting month, upload date and history

    Problem: A September balance sheet may be uploaded in October. Using its upload date would misclassify the document.

    Decision: The reporting month is optional and explicit. Filename suggestions are reviewed per PDF before the whole batch is saved to the queue. History belongs to the local profile.

    Rejected alternative: Infer the month from the upload date, backfill old documents, or describe one computer’s history as a record of every device.

    Tradeoff: The app checks server support and retains compatibility with earlier documents and receipts.

  4. ADR-028Update Windows with integrity checks and consent

    Problem: A new version must match the reviewed release and respect saved work.

    Decision: The private channel checks the signed manifest and installer integrity. The user chooses when to check, download and install. Unresolved work blocks restarting.

    Rejected alternative: Install silently or replace the working profile to complete an update.

    Tradeoff: Delivery retains safeguards and requires user action. The channel signature is separate from a commercial Windows certificate.

  5. ADR-020Publish for the actual hosting environment

    Problem: Copying files or updating Git does not establish which version Node.js is running.

    Decision: Publication follows the managed hosting startup procedure, preserves operational data and checks the activated service.

    Rejected alternative: Declare deployment complete after uploading files.

    Tradeoff: Operation requires its own checks, separate from builds and local tests.

Security

Commercial content, accountant tasks and client retrieval use different controls. The API revalidates identity, state and ownership before delivering each file. Hiding a button is not a substitute. PDFs stay outside public web paths and undergo structural checks before acceptance.

The server verifies stored-document integrity before delivery. Electron’s main process also verifies received bytes before opening or saving. Temporary previews are cleaned at startup and exit. Files locked by an external viewer are retried on the next startup; user-chosen downloads are preserved.

Exported history can contain filenames and client identities and requires a private destination. CSV export neutralizes values a spreadsheet might interpret as formulas. Access and integrity checks use fictitious identities and PDFs. The public case explains these controls without publishing credentials, real records or proprietary code.

Testing

On 26/10/2026 the original suites were rerun in an isolated copy of version 2.3.0: 44 backend suites, 525 passing cases and one skipped placeholder; Windows panel 258/258; frontend 75/75. Another 61 backup and delivery-tool cases passed. Backend lint passed. These are separate runs, not one combined end-to-end test.

Jest exercises real modules with simulated SQL dependencies. Panel checks combine logic and contracts with native Electron, temporary profiles and fictitious services. They include batches, history, verified downloads and presentation in both themes and window widths. Backup tools exercise orchestration with fixtures without activating a production backup. Local suites do not establish installation or acceptance of 2.3.0 on the accountant’s computer.

The project record dated 19/10/2026 documents isolated MySQL and MariaDB journeys and server/private-channel delivery. The Docker engine was unavailable to repeat those journeys during this review. They retain their historical provenance rather than being presented as fresh runs. The table distinguishes current checks, simulated services and documented delivery.

Results and scope of the checks
CheckResultScope
Backend · local review on 26/10/202644 suites · 525 passed · 1 skippedJest exercises original modules for authorization, documents, reporting months, receipts and recovery. SQL dependencies are simulated; the skipped case is a placeholder.
Windows panel · local review on 26/10/2026258/258 passedQueues, search, batches, history, verified downloads, updater and native Electron presentation with temporary profiles and simulated services.
Web frontend · local review on 26/10/202675/75 passedOriginal portal and public-site regressions: access, logout, downloads, visible states and public content.
Backup and delivery tools · local review61/61 passed31 backup orchestrator cases and 30 publication/private-channel cases use fixtures. They do not enable backups or publish to hosting.
MySQL and MariaDB · record dated 19/10/2026Isolated journeys documented as passingMigrations, reporting months, replay, conflicts, authorization and intact downloads. Retained as historical evidence; the database engines were not rerun during this review.
Version 2.3.0 delivery · record dated 19/10/2026Private release and delivery channel documentedThe record describes an updated server, signed manifest and matched assets. Publishing and downloading the installer does not establish installation and acceptance on the accountant’s computer.

Deployment

The backend and portal are published to managed hosting using its actual Node.js startup procedure. Delivery checks permitted sources, schema and the active service while preserving operational data and files. Updating the repository and publishing the service are separate steps.

Version 2.3.0 adds an optional reporting month through an additive migration that preserves older documents. The documented release updated the server first so an older server could not silently discard that value. The project record identifies the private release and channel checks. This review compares that record with source; it does not repeat an authenticated hosting inspection.

On Windows, users choose Check for updates, Download update and Update and restart. The application verifies signature and integrity and protects unresolved work before restarting. A signed channel manifest is separate from a commercial Windows certificate. Publishing an installer alone does not establish that the accountant’s device is running or has accepted that version.

Outcome

The system connects public contact, document preparation and private retrieval. The accountant can manage clients, review batches per file, assign a reporting month, open published documents and inspect this computer’s history. Each business has a place to retrieve its own records.

Version 2.3.0 brings previously separate tasks together and distinguishes a selected file, a saved job and a confirmed publication. A balance sheet retains the month it represents even when uploaded later. A lost response is checked as the same job instead of prompting another blind upload.

The result is described through concrete functionality and checks, without assigning time savings, maximum capacity or user acceptance that this review has not measured.

Evidence

The narrative was checked against implementation, tests, requirements, ADRs, the manual and the canonical version 2.3.0 status record. The status record distinguishes later deliveries from historical README and ADR notes: an earlier installation does not automatically establish a newer update.

The local review of 26/10/2026 and documented SQL journeys of 19/10/2026 are presented separately. A receipt confirms an operation outcome; the computer’s history records its jobs. Neither establishes that the client read the file. The video illustrates the interface and is not used to validate the current version. Private records and client data are excluded from this page.

Documentation behind the decisions

Selected sources show how the project moves from needs to architecture, use and operation.

README.md
Introduces the product, its actors and the relationship between the three interfaces.A starting point; release status is checked against the implementation record.
docs/SRS.md
Turns accountant and client needs into verifiable requirements.Connects user tasks to acceptance criteria.
docs/ADR.md
Records problems, alternatives and consequences of decisions.This page selects five decisions, including the document workflow introduced in version 2.3.0.
docs/DEPLOY.md
Describes publication, updates and recovery for the actual environment.Distinguishes server delivery, Windows distribution and device acceptance.
docs/MANUAL_USUARIO_CONTADOR.md
Explains batch preparation, PDF consultation and history states.Adds the user journey to the architecture.
docs/ESTADO_IMPLEMENTACION.md
Identifies the delivered version and the scope of its checks.Distinguishes historical checks from the current local review.

Software quality and UX

Search distinguishes loading, failure and no matches. Document windows associate responses with the correct client. Batch review allows each proposal to be corrected before accepting work and keeps the recipient, category and reporting month visible. An uncertain preparation result offers a check of the same batch.

View Files combines filters with PDF opening and saving. Canceling the dialog is not reported as a download. Local profile history separates states and exports them to CSV. It does not mark work complete before server confirmation or confuse withdrawn-unsent work with a delivered document.

Native presentation is checked with synthetic data in light and dark themes at widths of 420 and 1080 pixels. Dialogs account for focus and keyboard use. These checks define the interface evidence; daily usability requires observing the user in context. The following sample only explains how to assist search without choosing the recipient for the accountant.

Code sample and engineering test

A self-contained public example of the panel search rule: it normalizes accents and identifier formatting to help locate a recipient. A match only helps find the business; it neither selects it automatically nor grants permission to publish.

The check uses fictitious data and covers a name match, an identifier match, and no match. It does not reproduce authentication, private routes, or real data.

JavaScript / Node.js
function normalizeClientSearch(value) {
return String(value || '').normalize('NFD')
.replace(/[\u0300-\u036f]/g, '')
.toLocaleLowerCase('es-CL').trim();
}
function clientMatchesSearch(client, query) {
const search = normalizeClientSearch(query);
if (!search) return true;
const name = normalizeClientSearch(client?.name);
const identifier = normalizeClientSearch(client?.identifier);
const compactSearch = search.replace(/[^0-9k]/g, '');
return name.includes(search) || Boolean(/^[0-9k.\-\s]+$/i.test(search) && compactSearch && identifier.replace(/[^0-9k]/g, '').includes(compactSearch));
}

Isolated sample test

JavaScript / Node.js
import assert from 'node:assert/strict';
const client = { name: 'Empresa Demostración', identifier: '00.000.000-0' };
assert.equal(clientMatchesSearch(client, 'demostracion'), true);
assert.equal(clientMatchesSearch(client, '000000000'), true);
assert.equal(clientMatchesSearch(client, 'otra empresa'), false);

The example shows name and identifier matches plus a nonmatching search.