Repository navigation
Comparing changes
Open a pull request
base repository: mailtobalajiraghavan/pdf-studio
base: master
head repository: abidzk01/cool-pdf
compare: master
- 9 commits
- 55 files changed
- 1 contributor
Commits on Nov 7, 2026
-
Add: vendor runtime assets locally, real AES-256 encryption and a val…
…idation gate Load the three libraries and the Inter font from vendor/ instead of a CDN, so the page has no third-party origin and the CSP can be tightened to 'self'. Swap pdf-lib 1.17.1 for the API-compatible MIT fork @cantoo/pdf-lib 2.11.1: upstream silently ignored save({userPassword}), so Protect emitted unencrypted files and Unlock could not read encrypted ones. Protect now calls encrypt() (AES-256, ISO 32000-2 R6); Unlock rebuilds a fresh document to strip /Encrypt. Add one validation gate for every tool (LIMITS, clampInt, isPdfName, hasPdfMagic, readPdfFile, normalizeRange): extension, size, %PDF- magic bytes and a real parse before bytes reach PDF code, plus clamping for watermark and page-number inputs and range/merge-count limits. Fix Split's 'selected pages' mode, which exported every page instead of the user's selection. Add tools/serve.py because python -m http.server on Windows serves .js as text/plain, which blocks the Blob worker's importScripts.Configuration menu - View commit details
-
Copy full SHA for 6b23f4f - Browse repository at this point
Copy the full SHA 6b23f4fView commit details -
Docs: add architecture guide, agent rules, skills and rewrite README
docs/ARCHITECTURE.md documents the repository layout, the S state model, the Blob-worker protocol, all eight PDF pipelines, the validation gate, the security model, memory behaviour, twelve known gaps and a manual QA matrix. .opencode/rules.md is the normative rule set (invariants, code style, JavaScript, UI including a Tailwind policy, validation, security, review checklist) and is registered as project instructions by .opencode/opencode.jsonc. Two custom skills cover tool development and privacy/security audits. README.md is rewritten around the current stack: local vendoring, AES-256, requirements (including the dev server), folder structure, naming conventions and how to use the OpenCode agents and skills. SECURITY.md and CONTRIBUTING.md drop the CDN/SRI guidance and document the vendored assets and MIME caveat.
Configuration menu - View commit details
-
Copy full SHA for b110e5e - Browse repository at this point
Copy the full SHA b110e5eView commit details -
Add: rebrand to RxPDF Cool and open straight on the tools
Use the brand assets from assets/: icon-rxpdf-cool.png as the topbar mark, plus favicon.ico, favicon-32x32.png and favicon-rxpdf-cool.png for the tab and Apple touch icon (this also removes the old favicon 404). Replace the full-viewport landing page and bento grid with a compact sticky topbar (brand + privacy badge + theme switch) and a one-paragraph hero with fact chips, followed immediately by the tabs and drop zones. No onboarding screen or scroll-to-start cue; the tool is visible on first paint, including on mobile where the tab strip scrolls horizontally and keeps the active tab in view. Fold the tool descriptions that lived in the marketing cards into per-panel info boxes (Split, Merge, Watermark, Page Numbers) so the page stays informative. Clean up what the old landing needed: delete the hl-/bt-/rv- CSS, the spotlight handler, scrollToTools, the window.setTheme monkey patch and the reveal observer; setTheme now drives the single theme group, and switchTab lost its superseded matching pass. Update meta/JSON-LD (AES-256, no third-party URLs), footer, docs, README, agent rules and skills for the new name and layout.
Configuration menu - View commit details
-
Copy full SHA for a6eefe8 - Browse repository at this point
Copy the full SHA a6eefe8View commit details -
Add: signature pad and overlay PDF editor
New 'Edit' tab with a shared overlay engine. Sign draws with Pointer Events (mouse, trackpad, stylus or touch) on a DPR-scaled canvas, crops to the stroke bounding box and embeds a transparent PNG. Text, images, rectangles, ellipses, lines, freehand ink, highlights and cover boxes can be placed, moved, resized, duplicated, reordered and undone (40-step history). Pages can be rotated, duplicated, inserted (blank), deleted and reordered through a page plan that keeps the source untouched; metadata (title, author, subject, keywords) is editable. Save copies the plan into a new document and flattens every object through the pdf.js viewport, so coordinates survive rotation and CropBox offsets. Cover is documented as a cover, not redaction. Limits live in EDIT_LIMITS: 300 MB/500 pages (warn), 600 objects, 500 chars, 5 MB images, 400 signature strokes. Editor state is isolated in S.edit and S.signPad; the tool is wired into validation, drag-and-drop, progress and the busy lock. Docs, rules, skills and README updated for nine tools.
Configuration menu - View commit details
-
Copy full SHA for a455eec - Browse repository at this point
Copy the full SHA a455eecView commit details -
Refactor: split CSS and JS by concern, keep index.html as a markup shell
index.html drops from ~3,200 to ~570 lines: it now only holds the head, topbar, hero, tabs, panels, signature modal and footer, and links the assets. CSS is split by concern into assets/css/: theme (tokens/font/reset), layout (shell/topbar/hero), components (tabs/cards/drop zones/buttons/toasts/forms), editor (overlay editor + signature modal) and responsive (media queries, loaded last). JS is split into js/: core (validation, S state, helpers, theme, tabs, drag & drop, downloads, progress, worker), split, merge, tools (compress, images, watermark, page numbers, protect, unlock), editor and app (init and listeners). Scripts stay classic and load in dependency order, so they share one global scope with a single declaration per name; there is still no bundler, module transform or build step. Docs, rules, skills, README, SECURITY and CONTRIBUTING describe the new layout and the load-order rules. Verified after the split: all five stylesheets and six scripts load, zero console errors, Split runs through the Blob worker, and the editor draws a signature, saves, and the output reopens with extractable text.
Configuration menu - View commit details
-
Copy full SHA for 729a998 - Browse repository at this point
Copy the full SHA 729a998View commit details -
Add: bilingual English/Indonesian UI, support button and profile link
Add a dependency-free i18n layer: English is the source language, markup uses data-i18n (plus placeholder/title/aria variants) and JS calls t(), with 267 English->Indonesian entries in js/i18n-data.js. applyI18n() also updates the title, meta description and Open Graph/Twitter titles, and calls refreshDynamicTranslations() so the page grid, parts summary, merge list, editor labels and props re-render on switch. Language comes from ?lang= or navigator.language; switching rewrites the query string with history.replaceState, so no localStorage/cookie is introduced. <html lang> and the EN/ID aria-pressed state stay in sync. Add a Support button in the topbar pointing to https://teer.id/rxdiag and footer links to https://rxdiag.my.id and the support page, both with target=_blank and rel=noopener noreferrer. Add tools/check-i18n.js to fail on missing keys or unwrapped toast literals, and update README, ARCHITECTURE (load order + i18n section), rules, skills, SECURITY and CONTRIBUTING. Verified EN/ID switching with a live document, editor labels, dynamic page labels, mobile layout and zero console errors.
Configuration menu - View commit details
-
Copy full SHA for e7e732c - Browse repository at this point
Copy the full SHA e7e732cView commit details -
Fix: persist the language choice and bust asset caches on deploy
Language: setLang() now stores the choice in localStorage['rxpdf.lang'] and initLang() restores it, with precedence ?lang= > stored > navigator.language > en. The query string is still rewritten so a page URL stays shareable, and storage access is wrapped in try/catch for private mode/file://. This key is the only thing the app stores; docs and rules now state that exception explicitly (no PDF bytes, names, passwords, cookies or telemetry). VPS cache: index.html now links all 13 first-party CSS/JS files with ?v=<sha256-8> via tools/stamp-assets.js (idempotent, with a --check mode). netlify.toml makes index.html revalidate and caches assets/js/vendor immutably, and deploy/ ships nginx/apache examples plus a checklist for the classic 'styles did not update' causes (partial upload, cached index.html). Verified: only rxpdf.lang is stored, reload restores ID/EN, ?lang= overrides, all stylesheets/scripts carry hashes, i18n check passes, zero console errors.
Configuration menu - View commit details
-
Copy full SHA for 6345e04 - Browse repository at this point
Copy the full SHA 6345e04View commit details -
Add: compression modes with size control (lossless, balanced, small, …
…target, percentage) Compress now offers five modes instead of a single re-save: - Lossless keeps the current behaviour (structure only, text stays selectable). - Balanced rasterizes at 150 DPI / q0.70, Small at 100 DPI / q0.55. - Target size takes KB/MB and Percentage takes 5-90% of the original; both run a bounded search (<=3 DPI candidates x <=5 quality steps) that measures the real output every step and prefers the largest file that still fits. - Pages are rendered once per DPI into JPEG masters (32 MP cap, 300-page limit) and only re-encoded during the search, so the PDF is not re-rendered per step. - Results are always reported honestly: 'Compressed to X (target Y)' or 'Could not reach Y - smallest was Z at N DPI'; Balanced growing a file says so and suggests Small or a lower target instead of claiming success. - Lossy modes show a warning that text, links, forms, annotations and bookmarks are lost, the drop zone now loads the file before compressing, and a preview shows 'before -> target' for target/percentage. All processing stays client-side: pdf.js renders, canvas encodes, pdf-lib assembles; no server and no new dependency. Added the mode/limit strings to the EN/ID dictionary, fmtBytes now reports bytes under 1 KB, and docs, rules and the skill checklist cover the modes, limits and trade-offs. Verified with a 1.49 MB image-heavy fixture: Small 720 KB, target 600 KB -> 575 KB, target 50 KB -> warning at 272 KB, 30% -> 432 KB (target 436 KB), lossless unchanged; text extraction empty after a lossy pass; 0 console errors.
Configuration menu - View commit details
-
Copy full SHA for e4974ff - Browse repository at this point
Copy the full SHA e4974ffView commit details -
Release: v1.0.0 with PWA install, offline cache, versioning and SEO
PWA: - manifest.webmanifest with relative id/start_url/scope, standalone display, 192/512 + maskable icons and four ?tab= shortcuts. - sw.js precaches the shell, hashed CSS/JS, vendor libraries, pdf.js worker, Inter font and icons; navigation is network-first with a cached fallback, hashed assets are cache-first, everything else stale-while-revalidate. - assets/pwa icons are generated from the brand mark by tools/make-pwa-icons.js (alpha-aware PNG decoder/scaler/encoder, no deps). - js/pwa.js registers the worker, shows the topbar Install button on beforeinstallprompt, reports appinstalled, exposes an offline-ready badge, and only activates a waiting update when the page is idle. - netlify/nginx/apache configs revalidate sw.js and the manifest and serve application/manifest+json. Versioning: - VERSION (1.0.0) is the single source, stamped into core.js (footer), manifest.webmanifest, the service-worker cache name and every asset URL. - tools/stamp-assets.js now rewrites hashes, the SW precache list, the cache version and the version fields in one pass; --check validates all of them. - CHANGELOG.md follows Keep a Changelog; README documents the release flow. SEO: - sitemap.xml, robots.txt and llms.txt for https://pdf.rxdiag.my.id/, plus canonical, og:url and JSON-LD url in index.html. Verified: manifest 200 as application/manifest+json, three icons 200, SW active with 29 precached entries, install prompt wired, offline reload keeps CSS, font, all libraries and a working lossless compress, no console errors; i18n and stamp checks pass.
Configuration menu - View commit details
-
Copy full SHA for 625ba60 - Browse repository at this point
Copy the full SHA 625ba60View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...master