PDF Vault

Reading app — versioning, access and administration

PDF Vault is an application for managing a PDF document with version control: the team can publish a new version and roll back to an earlier one. The client also wanted readers to sign in without creating or remembering a password, so they only need to enter their email to access the document inside the app. Administrators manage users, versions and activity in a separate backoffice. Three pieces — user application, backoffice and shared API — run on ASP.NET Core and PostgreSQL, with Next.js frontends. The project was built with spec-driven development.

Architecture

User app Next.js Backoffice Next.js ASP.NET Core API vertical slices per use case register, magic link, PDF, metrics PostgreSQL EF Core Storage outside the webroot Email MailKit Modular monolith: the decision not to split it was argued before starting

The solution separates the reading portal and backoffice into two Next.js applications connected to an ASP.NET Core API and PostgreSQL. The backend groups functionality by use case and keeps reader and administrator sessions separate; PDF files stay in private storage behind a dedicated interface.

Published versions and rollback

From the backoffice, an administrator uploads a new edition and chooses a major, minor or patch version bump. Each file is stored as its own version with its upload date and author; a new upload becomes current without deleting earlier editions. If needed, the administrator can roll back to any available version.

Email sign-in without a password

The client wanted readers to access the document without creating or remembering a password. Readers enter their email and the app starts a session to open the PDF; they do not fill in a password form or wait for a sign-in link. The session identifies the user and protects authenticated actions.

A PDF reader with personal annotations

The document opens inside the app with page and chapter navigation, search and reading controls. Each reader can save highlights and comments anchored to text. When the PDF version changes, the app attempts to relocate annotations in the new document using their saved text excerpt.

Private document delivery

Document request Valid session? 401 Resolves the key opaque, never sent to the client Reads from storage traversal rejected Streams the content No static-file middleware no route serves the file The physical name derives from neither the original nor the version number

The PDF has no public URL and is never served as a static file. Files live outside public routes; when requested, the API validates the session and streams the content from private storage without exposing its key to the browser. Access activity is recorded once the transfer completes.

Users and activity in the backoffice

The admin panel keeps reader accounts separate from administrator accounts. The user list shows email, creation date, blocked status, sign-ins and PDF accesses; the detail view exposes activity and lets an admin block or unblock an account. The dashboard summarizes users, sign-ins and reads by day, week and month.