Initial commit: Loma PDF Editor with Coolify deploy setup
Browser-only PDF editor (React + Vite + pdf-lib + pdf.js + tesseract.js), plus a multi-stage Dockerfile that builds the SPA and serves it from nginx on port 80 with a /health endpoint for Coolify. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+59
@@ -0,0 +1,59 @@
|
||||
# Product
|
||||
|
||||
<!-- impeccable:product-schema 1 -->
|
||||
|
||||
## Platform
|
||||
|
||||
web
|
||||
|
||||
## Users
|
||||
|
||||
Thai office workers and SME staff. They receive PDFs (quotations, contracts, forms, reports) and need to sign them, fill in forms, fix a few words, or merge/split pages, then send the file back. They do this between other work, without buying Adobe Acrobat. Some open PDFs on a phone after receiving them by LINE or email.
|
||||
|
||||
## Product Purpose
|
||||
|
||||
Loma PDF Editor lets people do Acrobat-style PDF work (edit existing text and images, comment, sign, fill and create forms, manage pages, redact, OCR, convert) entirely in the browser. Success: a user opens a PDF, finishes the job, and downloads a correct file without help, an account, or a payment.
|
||||
|
||||
## Positioning
|
||||
|
||||
Free with no sign-up: no account, no watermark on output, no usage quota. Files are processed only in the browser and are never uploaded (confirmed: the product stays browser-only, no server storage).
|
||||
|
||||
## Operating Context
|
||||
|
||||
- Inputs: PDFs (often Thai + English text), images for "images → PDF".
|
||||
- Output: a downloaded file named `<name>-edited.pdf`, plus Word/Excel/PNG/JPG/TXT conversions.
|
||||
- Signatures and stamps are stored in the user's browser (localStorage) only.
|
||||
- OCR downloads language data from the tesseract CDN on first use; the PDF itself is not sent anywhere.
|
||||
|
||||
## Capabilities and Constraints
|
||||
|
||||
- Browser-only (React + Vite, pdf.js, pdf-lib, tesseract.js). No backend; file size is bounded by browser memory. Large files multiply in memory through undo history.
|
||||
- Redaction rasterises affected pages on save (irreversible); "Flatten forms" makes fields non-editable (irreversible).
|
||||
- Edited text is always written in Sarabun, not the original font.
|
||||
- Not supported: password-protected PDFs, Word/Excel/PowerPoint → PDF (needs a server).
|
||||
- UI is bilingual: Thai (primary) and English, switchable (`src/i18n.ts`).
|
||||
|
||||
## Brand Commitments
|
||||
|
||||
- Name: "Loma PDF Editor". Logo source: `public/logo/พรีเซนเทชันแบรนด์ Loma PDF Editor.png` (navy "L" page mark + red PDF tag + pen). Derived assets in `public/logo/`: `loma-icon-*.png` (rounded app icon: favicon, apple-touch, top bar) and `loma-lockup.png` (horizontal lockup, background knocked out — use on white/light surfaces only).
|
||||
- Voice: plain, native Thai (not translated), short instructions.
|
||||
- Sarabun is the document font for Thai text written into PDFs.
|
||||
- Promise shown on the start screen: files are not uploaded anywhere.
|
||||
- Colour palette follows the sister product Lomalotto (`D:\Project 4tech\Lomalotto`): brand blue `#1164C2`, navy gradient header (`#0b2b7c → #1164C2 → #081d63`), page background `#eef3f8`, slate neutrals. Requested by the owner on 2026-11-19.
|
||||
|
||||
## Evidence on Hand
|
||||
|
||||
- `samples/sample.pdf` (generated by `scripts/make-sample.mjs`); its Thai text has spacing artefacts because it is generated without the Thai width fix.
|
||||
- No testimonials, user counts, benchmarks, or press exist. Do not fabricate them.
|
||||
|
||||
## Product Principles
|
||||
|
||||
1. Finishing the job beats feature count: sign, fill, and save must be the shortest paths.
|
||||
2. Never surprise the user with irreversible results; say what becomes permanent before it happens.
|
||||
3. Thai first: Thai text must render, copy, and search correctly, and the UI must read naturally in Thai.
|
||||
4. Private by construction: never introduce a flow that sends file content off the device.
|
||||
5. Works for whoever opens it: keyboard, screen reader, and phone users can complete the core jobs.
|
||||
|
||||
## Accessibility & Inclusion
|
||||
|
||||
Target WCAG 2.2 AA for the app chrome: visible focus, keyboard paths for core jobs (open, edit, sign, fill, save), named controls, 4.5:1 text contrast, touch targets ≥ 44px on mobile. Thai UI text must be large enough for stacked vowels and tone marks.
|
||||
Reference in New Issue
Block a user