From 930a2e03cc8f21feba4e815908351eb108cabd06 Mon Sep 17 00:00:00 2001 From: Hoid Date: Sat, 14 Feb 2026 13:03:12 +0000 Subject: [PATCH] =?UTF-8?q?Business=20session=205:=20fixed=20Forgejo=20pus?= =?UTF-8?q?h,=20added=20URL=E2=86=92PDF=20+=20usage=20tracking?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projects/business/memory/decisions.md | 6 ++++++ projects/business/memory/sessions.md | 11 +++++++++++ projects/business/memory/state.json | 13 ++++++++----- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/projects/business/memory/decisions.md b/projects/business/memory/decisions.md index 70fe466..eae5781 100644 --- a/projects/business/memory/decisions.md +++ b/projects/business/memory/decisions.md @@ -22,3 +22,9 @@ Built-in invoice and receipt templates as differentiator. Most PDF API competito - Business: $29/mo for 25,000 PDFs - Enterprise: custom Not yet implemented — need Stripe integration. + +## 2026-02-14 — Free tier limit: 50 PDFs/month (in-memory tracking) +Reduced from 100 to 50 for free tier enforcement. In-memory tracking for MVP (resets on restart). Will need Redis or SQLite for production persistence. Pro keys bypass limits via PRO_KEYS env var. + +## 2026-02-14 — URL→PDF endpoint added +High-demand feature that differentiates from simpler HTML-only converters. Validates URLs (http/https only), 30s timeout, configurable wait strategy. Security note: may need SSRF protection before production (block private IPs). diff --git a/projects/business/memory/sessions.md b/projects/business/memory/sessions.md index dcedf33..4abffa9 100644 --- a/projects/business/memory/sessions.md +++ b/projects/business/memory/sessions.md @@ -46,3 +46,14 @@ - **Status:** Code complete, deployment-ready, blocked on Forgejo push + domain + Stripe - **Next:** Fix Forgejo push access, deploy to server, get domain, set up Stripe - **Blockers:** Forgejo token lacks write access; need domain + Stripe from human + +## Session 5 — 2026-02-14 13:00 UTC (Afternoon Session) +- **Fixed Forgejo push** — SSH URL needed `forgejo@` not `git@`. All code now pushed successfully. +- Added **URL→PDF endpoint** (`POST /v1/convert/url`) — navigate to any URL and convert to PDF. Validates URL, supports custom wait strategies. +- Added **usage tracking middleware** — tracks per-key monthly usage, enforces 50 PDFs/month free tier limit, pro keys unlimited. +- Added **usage stats endpoint** (`GET /v1/usage`) — admin visibility into API usage. +- Added `"type": "module"` to package.json (was missing, caused TypeScript import.meta error). +- All code compiles clean, pushed to Forgejo. +- **Status:** MVP feature-complete. 4 conversion endpoints (HTML, Markdown, URL, Templates). Auth + rate limiting + usage tracking. Landing page. Docker deployment config. +- **Next:** Need human for: domain purchase, server deployment, Stripe setup. +- **Blockers:** Domain, Stripe, deployment access — all require human action. diff --git a/projects/business/memory/state.json b/projects/business/memory/state.json index 5b353df..0397a9f 100644 --- a/projects/business/memory/state.json +++ b/projects/business/memory/state.json @@ -2,14 +2,17 @@ "phase": 1, "phaseLabel": "Build MVP", "status": "deployment-ready", - "product": "DocFast — HTML/Markdown to PDF API", - "currentPriority": "Fix Forgejo push (token may be read-only). Deploy to server. Buy domain. Set up Stripe for payments.", + "product": "DocFast — HTML/Markdown/URL to PDF API", + "currentPriority": "Deploy to server. Buy domain. Set up Stripe for payments.", "humanFeedback": "User created the Forgejo repo. Will host on existing server.", "blockers": [ - "Forgejo push returns 403 — token may lack write permission", "Need domain (docfast.dev or similar)", - "Need Stripe account for payments" + "Need Stripe account for payments", + "Need deployment instructions (which server, docker access?)" + ], + "resolved": [ + "Forgejo push — fixed by using ssh://forgejo@ URL" ], "startDate": "2026-02-14", - "sessionCount": 4 + "sessionCount": 5 }