# PSCOT v1.1.10 PSCOT is a framework-free PHP and SQLite site for presenting books, novellas, short stories, articles, and other writing by Jay Pscot. ## What changed in v1.1.10 v1.1.10 is a focused interface refinement built on the confirmed v1.1.9 baseline. In the Desk catalog editor, **Permissions** now appears before the **Librarian-only file** panel. The public navigation adds **Desk** between Library and About. The PSCOT footer brand is now an undecorated home link in both public and Desk footers. The software-license scope notice is promoted from a bold paragraph to a level-two heading. The v1.1.9 public-document architecture remains unchanged: public Preview/Read links go directly to the isolated `docs.pscot.com` origin, prepared HTML viewers run as ordinary top-level HTML pages, and PSCOT does not truncate uploaded files. The Librarian-only attachment remains separate, private, and stored outside every public document root. ## Requirements - PHP 8.2 or newer - PDO SQLite (`pdo_sqlite`) - Fileinfo (`fileinfo`) - JSON - Apache with `.htaccess` support, or equivalent hosting rules - HTTPS for both `pscot.com` and `docs.pscot.com` - `docs.pscot.com` mapped to `~/sites/pscot.docs/` PSCOT has no Composer, PHP framework, JavaScript framework, CSS framework, Node, build system, database server, or third-party analytics dependency. ## Production layout ```text ~/sites/pscot.com/ Main public Library and /desk application docs-site/ Deployment source for docs.pscot.com support files ~/sites/pscot.docs/ Document-reader site for docs.pscot.com .htaccess index.html read.php content/ New public document uploads .htaccess Denies direct web access ~/data/pscot.com/ Private persistent data pscot.sqlite3 documents/ Legacy pre-v1.1.8 public uploads, retained as fallback admin-files/ Librarian-only attachments covers/ Front- and back-cover images backups/ config.php Optional host-specific overrides ``` The `docs.pscot.com` root redirects to `https://pscot.com/`. Reader URLs use `read.php` and do not expose the stored random filename. Requests to the `content/` storage directory are denied directly. ## Upgrade from v1.1.9 1. Back up `~/data/pscot.com/` and `~/sites/pscot.docs/content/`. 2. Copy the contents of the packaged `pscot-site/` directory over `~/sites/pscot.com/`. 3. Do **not** rerun the installer. v1.1.10 has no database migration and does not require a docs-host refresh. Existing catalog entries, uploads, Authors, Series, Tags, prepared Views, covers, permissions, summaries, settings, private attachments, and analytics remain intact. ## Fresh installation 1. Map `pscot.com` to `~/sites/pscot.com/` and `docs.pscot.com` to `~/sites/pscot.docs/`, with HTTPS enabled for both. 2. Copy the packaged `pscot-site/` contents to `~/sites/pscot.com/`. 3. Run: ```bash /usr/local/bin/php ~/sites/pscot.com/bin/install.php ``` The installer creates the private data directories, initializes SQLite, and deploys the document-reader support files into `~/sites/pscot.docs/`. ## Public and private file roles Each catalog entry supports two independent uploads: 1. **Public document** — the exact complete file visitors may Preview, Read, and optionally Download. Supported types remain PDF, EPUB, text, Markdown, HTML, RTF, Word, and ODT. 2. **Librarian-only file** — an optional full source or review attachment. It may be any file type and is available only through an authenticated Desk route. For HTML, PSCOT serves the complete uploaded file from `docs.pscot.com`. Embedded JavaScript may execute and `localStorage` persists under the `docs.pscot.com` origin. PSCOT does not edit, truncate, inject into, or manufacture the preview content. The public HTML response uses the separate docs origin itself as the primary security boundary: no PSCOT session is started, the main site's cookies and storage are unavailable, direct storage paths are hidden, framing by another page is denied, and reader responses are not cached or indexed. PSCOT does not apply a CSP `sandbox` or script restrictions to prepared public HTML, because those restrictions can break the document's built-in reader JavaScript. Authenticated Desk viewing of the Librarian-only file retains its separate restricted sandbox behavior. The private file never receives a public route. Default limits are: ```text Public document: 50 MB Librarian-only file: 50 MB Front cover: 5 MB Back cover: 5 MB ``` The main-site `.htaccess` request limits remain 64 MB. When replacing more than one large file, save them in separate requests if their combined upload size approaches that request limit. ## Librarian workflow On **Desk → Catalog**, upload the exact public file visitors should receive. Under **Permissions**: - **Allow visitors to open the public document?** enables the Preview or Read action. - **Public reading action: Preview / Read** controls the action label and analytics event only. - **Allow visitors to download the public document?** independently enables full-file download of that same public upload. The percentage slider and byte-truncation behavior no longer exist. The Catalog list and editor retain authenticated View and Download actions for both the public document and the Librarian-only attachment. Deleting a catalog entry removes its current public upload, private attachment, and covers. ## Operations Refresh the docs host support files after any release that changes them: ```bash /usr/local/bin/php ~/sites/pscot.com/bin/deploy-docs-site.php ``` Check the installation: ```bash /usr/local/bin/php ~/sites/pscot.com/bin/check.php ``` Create a backup: ```bash /usr/local/bin/php ~/sites/pscot.com/bin/backup.php ``` Backups include the SQLite database, current public documents, legacy public documents, Librarian-only files, covers, and host configuration. ## Deployment checks - Visit `https://docs.pscot.com/`; confirm it redirects temporarily to `https://pscot.com/`. - Confirm a request beneath `https://docs.pscot.com/content/` is denied. - Upload a self-contained prepared HTML public document and select **Preview** or **Read**. - Open it from the public Library; confirm the link goes directly to `docs.pscot.com`, embedded JavaScript works without sandbox console errors, and reader preferences survive a reload through `localStorage`. - Confirm the HTML viewer cannot see the signed-in Librarian session or main-origin browser storage. - Disable Read permission or unpublish the entry; confirm its docs-host reader URL returns not found. - Confirm Download still serves the complete public file only when Download permission is enabled. - Upload a Librarian-only full document; confirm it is accessible only while signed into the Desk. - Run the backup command and confirm `public-documents/`, `legacy-documents/`, and `admin-files/` are represented as applicable. ## Software license The PSCOT application source code is released under the MIT License. The license does not apply to books, articles, stories, uploaded documents, private attachments, cover artwork, logos, branding, or other catalog content unless separately identified as licensed. Current release: v1.1.10, September 27, 2026.