diff --git a/PRD-Pen2Post_MVP-FINAL.md b/PRD-Pen2Post_MVP-FINAL.md new file mode 100644 index 0000000..bc95e90 --- /dev/null +++ b/PRD-Pen2Post_MVP-FINAL.md @@ -0,0 +1,327 @@ +# Pen2Post MVP – Product Requirements Document (Ad-only Freemium) + +## 1. Overview + +Pen2Post is a mobile-first handwriting-to-text app for fast, friction-free capture of handwritten notes. Users snap a handwritten page, Pen2Post turns it into editable text, and they share or copy it into their preferred tools in seconds. + +- **Name:** Pen2Post +- **Tagline:** From handwriting into posts. +- **Core flow:** Snap handwriting → Shape the text → Share the story. +- **Editor placeholder text:** `Capture your next idea…` +- **Tone:** Human, creative, encouraging—not corporate or clinical. + +The MVP is deliberately minimal: every extraction is funded by an ad, with no registration, no credits, and no storage. This gets the app to market quickly, keeps usage anonymous, and tests real demand before investing in heavier features. + +**Target users:** + +- Students and knowledge workers who take handwritten notes. +- Creatives (writers, GMs, founders, marketers) who ideate on paper but publish online. +- Researchers, field workers, and anyone who needs to digitize handwriting occasionally. + +**Platforms:** + +- iOS (App Store) +- Android (Google Play) +- Both built as web + Capacitor shells. + +*** + +## 2. Product scope + +### 2.1 What’s included in this MVP + +#### Core user flow + +1. Open Pen2Post. +2. Tap Camera. +3. Capture or select a handwritten page. +4. A rewarded or interstitial ad plays. +5. When the ad finishes, the app sends the image to the HTR backend. +6. Extracted text appears in the editor. +7. User makes light edits. +8. User taps Share to send the text to another app or copies it. +9. User taps Clear to start fresh if needed. + +#### Key features + +- Single **journal screen** with: + - Full-screen text area with placeholder `Capture your next idea…` + - Floating buttons: Camera (Extract), Clear, Share, Menu. +- **No Save button.** Saving is accomplished via Share (into Notes, docs, email, etc.). +- **Light editing only:** plain text; use native keyboard for select/copy/paste/delete. +- **HTR pipeline:** resize/compress photo on device, POST to `/api/extract`, append returned text into the editor (optionally with “— Page N —” separators). +- **Per-extraction ad:** each successful extraction is gated by one completed ad view. +- **Side menu:** overlay drawer with About, How It Works, Help & Tips, Legal, Feedback. +- **Legal/Help copy:** emphasizes privacy, no server-side storage of content, and responsibility to save text externally. + +#### Monetization model (MVP) + +- **Freemium, ad-only:** + - No credits, no banking, no IAP in this version. + - Each extraction is “paid for” by watching an ad. +- Optional banner ads on non-core pages (About, Help, maybe Legal), but **no banner ads on the main editor** to keep the writing experience clean. + +#### Infrastructure + +- Existing HTR backend endpoint: `POST /api/extract` accepting a base64-encoded image and returning extracted text. +- No user accounts, no credit system, no database schema required beyond what the HTR service already needs. +- Ad serving via AdMob with Capacitor plugin. + +*** + +### 2.2 Out of scope (future roadmap) + +Intentionally **not** included in this MVP: + +- Credit system (free daily credits, banking, bundles, caps, abuse protection). +- Registration/login, SSO with website, or identity beyond basic device info. +- Saving, loading, or organizing extracts (titles, tags, categories, archive). +- Rich formatting (headings, bold, lists), styling, or markdown/HTML export. +- Export flows (PDF, Word, HTML) beyond sharing plain text. +- Editorial/AI feedback features that consume credits or subscriptions. +- Skins/themes or settings menu with saved preferences. +- Multi-device sync and any form of cloud document storage or backup. +- In-app purchases (subscriptions, bundles). + +These are candidates for “Pen2Post Pro” or later versions once demand is validated. + +*** + +## 3. Branding and UX direction + +### 3.1 Brand pillars + +- **Name:** Pen2Post +- **Tagline:** From handwriting into posts. +- **Microcopy (for onboarding/marketing):** + - Scribble. + - Shape. + - Share. + +### 3.2 Visual identity (MVP-level guidance) + +- **Look & feel:** clean, minimal, mobile-first. +- **Color feel:** light “notebook” background, soft shadows, clear accent blue for interactive elements. +- **Tone in copy:** encouraging and human (“Capture your next idea…”) vs. technical or corporate. + +### 3.3 App icon (future polish, not blocking MVP) + +Concept directions (for designers later): + +- Ink drop above three stacked lines (a “feed” symbol). +- Pen nib merging into a rounded card (post). +- Hybrid symbol that implies handwritten ink flowing into a digital feed. + +Specs for designers: + +- Rounded-square base (iOS style). +- Neutral/light background with a strong accent blue that matches the app UI. +- Deliverables: 1024×1024 master PNG, vector source, platform-specific sizes. + +*** + +## 4. Core use cases + +### 4.1 Quick extract and share + +**Actor:** Student or knowledge worker. + +**Scenario:** + +1. Opens app between classes or meetings. +2. Taps Camera, snaps notebook page. +3. Watches a short ad. +4. Sees extracted text in the editor. +5. Fixes a couple of words, taps Share, sends to Notes or email. +6. Closes app. + +**Success criteria:** + +- Ad loads and finishes without blocking. +- Extraction completes in ~5 seconds after ad. +- The user clearly understands that sharing/copying is how they “save” their text. + +### 4.2 Several pages in a session + +**Actor:** Field researcher or creative. + +**Scenario:** + +1. Opens Pen2Post. +2. Extracts page 1 (Camera → ad → extract → copy to preferred app). +3. Taps Clear and confirms to start fresh. +4. Repeats for pages 2 and 3. + +**Success criteria:** + +- Each Camera use that leads to an extraction shows exactly one ad. +- Clear confirmation text makes it obvious that content cannot be recovered. +- No storage is expected; user willingly moves text out after each extraction. + +*** + +## 5. Functional requirements + +### 5.1 Main editor screen + +#### Layout + +- Full-height container with: + - Top-right floating buttons: Share, Menu. + - Bottom-left floating buttons: Camera (Extract), Clear. +- Central full-width textarea with: + - Placeholder `Capture your next idea…` + - Comfortable line height and font size for mobile reading and editing. + +#### Textarea behavior + +- Always editable (no read-only states). +- Auto-grows with content. +- Uses system fonts for a native feel. +- Supports copy/paste, select-all, delete via standard OS behaviors. + +#### Camera (Extract) button + +- On tap: + 1. Launch Capacitor Camera or gallery picker. + 2. If user cancels: return to editor, no ad, no extraction. + 3. If user selects/captures an image: + - Optionally show a short “Preparing…” state. + - Request and display an AdMob rewarded/interstitial ad. + - On ad completion: + - Resize/compress image client-side. + - Send to `/api/extract`. + - Insert returned text into textarea (append, with “— Page N —” separator). + - Show success toast (“Extracted”). + 4. If ad fails or is closed early: + - Do not call extraction. + - Show toast (“Ad not completed; extraction cancelled.”). + +#### Clear button + +- If textarea is empty: do nothing or show a gentle “Nothing to clear” toast. +- If textarea has text: show confirm dialog: + - Suggested copy: + > Clear all text? This cannot be undone. Make sure you’ve shared anything important first. +- On confirm: + - Clear textarea. + - Reset page counter. + - Show “Cleared” toast. + +#### Share button + +- If text present: + - Preferred: Capacitor Share plugin (native share sheet with the text). + - If plugin unavailable (e.g., web testing), fallback to `navigator.share` or copying to clipboard. + - Show “Shared” or “Copied to clipboard” toast on success. +- If no text: show “Nothing to share” toast. + +#### Menu (hamburger) button + +- Opens a side drawer overlay with items: + - About Pen2Post + - How It Works + - Help & Tips + - Legal + - Feedback +- Drawer behaviors: + - Slide in from right. + - Tap outside or tap “×” to close. + - Tapping a link navigates to the appropriate secondary page. + +*** + +### 5.2 Secondary pages + +All secondary pages: + +- Reuse the base styles (background, typography). +- Have a back button to return to the main editor. +- May include a small banner ad at the bottom (except Legal, if you want it cleaner). + +#### About Pen2Post + +- Short narrative about: + - What Pen2Post does (from handwriting into posts). + - Who it’s for (creative, human, encouraging tone). + - That it’s a lean, ad-supported 1-person project. + +#### How It Works + +- Simple 5–6 step walkthrough: + 1. Open Pen2Post. + 2. Tap Camera. + 3. Snap or select your handwritten page. + 4. Watch a quick ad while we process. + 5. Edit your text. + 6. Share or copy it into your other apps. +- Tips for best results: legible handwriting, good lighting, fill the frame. + +#### Help & Tips + +- FAQ-style: + - What kinds of images work best. + - Why extraction might fail (blurry, dark, unusual scripts). + - Clarify that Pen2Post does not store text or pages; users must move text into their own tools. +- Link or reminder to use the Feedback page if they have issues. + +#### Legal + +- Plain-language Privacy and Terms: + - Images are sent securely to the server, processed, and discarded after text generation. + - Extracted text is shown only in the app and not stored on the server. + - There is no document history; clearing/closing the app can lose text. + - The app is “as is”, accuracy is not guaranteed, and users must review and edit their text. + - Ads and app stores may collect their own data per their policies. + +#### Feedback + +- Minimal form: message field and optional email. +- On submit: compose email via the device’s mail app to a configured support address (e.g., support@prometheus.cafe) with the message and optional contact info. + +*** + +## 6. Ad integration + +- Use Capacitor AdMob plugin to integrate: + - Rewarded or interstitial ads tied 1:1 with extraction events. + - Optional banner ads on non-core pages. +- Requirements: + - Camera → image → ad → extraction, in that order. + - If the ad does not successfully complete, do not call the extraction endpoint. + - Handle errors gracefully with clear toasts and no crashes. + +*** + +## 7. Capacitor integration and build + +- Wrap existing HTML/CSS/JS into a Capacitor app. +- Use Capacitor plugins for: + - Camera (photo capture / gallery selection). + - Share (native share sheet). + - AdMob (rewarded/interstitial and optional banners). +- Build and package: + - iOS: Xcode project, signing, and submission to App Store. + - Android: Android Studio project and submission to Google Play. + +*** + +## 8. Non-functional requirements + +- Extraction time (network + processing) target: under ~5 seconds after ad completion. +- App remains responsive during ad loading and extraction. +- Network failures and server errors show clear messaging and allow retry. +- No server-side storage of user content beyond transient processing needs. +- Minimal crash rate; graceful error paths wherever third-party services (HTR or ads) fail. + +*** + +## 9. Roadmap (beyond MVP) + +Once this ad-only MVP is live and gathering data: + +- Add credits (balance, daily rewards, banking, IAP). +- Add login/SSO and deeper analytics. +- Add storage and retrieval of extracts with titles, tags, categories. +- Add rich formatting, markdown/HTML export, and AI editorial feedback. +- Add skins and personalization, potentially as Pro features. diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..cbd776b --- /dev/null +++ b/Readme.md @@ -0,0 +1,26 @@ +This is a Proof of Concept build. + +Client front-end is HTML/CSS/JS and hosted on Phoenix server with the backend services. A tunnel has been created to a publicly available web server called Dragon (soon to be replaced). + +The system captures an image of a handwritten page and passes it to Qwen3 VL 8B AWQ (4-bit) for conversion to digital text. + + +**Your config locations cheat sheet:** + +| What | Location | ------|----------| FastAPI config | `~/htr-api/.env` | vLLM +| service | `/etc/systemd/system/vllm-htr.service` | HTR service | +| `/etc/systemd/system/hhtr-api.service` | FastAPI service | +| `/etc/systemd/system/htr-api.service` | nginx config | +| `/etc/nginx/sites-enabled/htr` | Frontend | `/var/www/htr/index.html` | +| Cloudflare tunnel | `/etc/cloudflared/config.yml` | + +# After changing the model in .env, run the following: +sudo systemctl daemon-reload sudo systemctl stop vllm-htr htr-api sudo systemctl +start vllm-htr htr-api + +# Future Update +To create an MVP using Capacitor to wrap the front-end HTML/CSS/JS and call the service through a future web server (Cerberus) running Ghost with API access via FastAPI? + +Need to test Qwen3 VL 2B and modify the prompt to see if accuracy occurs. + +PRD for the MVP is located in a document, "PRD-Pen2Post_MVP-FINAL.md" \ No newline at end of file