Commit graph

83 commits

Author SHA1 Message Date
OpenClaw
922230c108 fix: revert custom CSP - Helmet defaults are correct
Inline script was already extracted to swagger-init.js (BUG-004/005).
Helmet defaults allow style-src unsafe-inline and font-src https,
so Google Fonts and inline styles work without custom directives.
2026-02-14 22:31:18 +00:00
OpenClaw
6aa1fa4d84 fix: swagger UI symlink, CSP headers, email-change route, updateKeyEmail
- Fix swagger-ui symlink in Dockerfile (was pointing to /opt/docfast instead of /app)
- Add CSP directives to allow inline scripts/styles and Google Fonts
- Add email-change.ts route with rate limiting (3/hr) and verification
- Add updateKeyEmail to keys service
- Add email-change route to index.ts with CORS support
2026-02-14 22:29:56 +00:00
OpenClaw
5f10977705 fix: move Swagger init to external JS (CSP compliance) 2026-02-14 22:27:15 +00:00
OpenClaw
d859e9fa60 feat: email change UI, Swagger UI improvements, key recovery link on landing page
- Email change modal: API key + new email → verification code → confirmed
- Swagger UI with proper OpenAPI spec (public/openapi.json + swagger-ui assets)
- Key recovery link prominently on landing page hero section
- Footer link for email change
- Updated docs.html to use swagger-ui bundle
2026-02-14 22:15:31 +00:00
OpenClaw
efa39661cf feat: multi-browser pooling (2 Chromium instances × 8 pages)
- Launch BROWSER_COUNT separate Chromium instances (default: 2)
- Each with PAGES_PER_BROWSER pages (default: 8, 16 total)
- Round-robin distribution across browser instances
- Independent restart scheduling per browser
- Updated health endpoint to show per-browser stats
- docker-compose: added BROWSER_COUNT and PAGES_PER_BROWSER env vars
2026-02-14 21:55:29 +00:00
a177020186 Security: never send API keys via email, add browser-based recovery UI, adjust rate limits
Investor Directive 1: Key recovery now shows key in browser after email verification code.
- Removed sendRecoveryEmail function entirely
- Recovery endpoint returns apiKey in JSON response (shown once in browser)
- Added full recovery modal UI (email → code → key displayed)
- Added "Lost your API key?" links throughout signup flow

Investor Directive 3: Rate limits adjusted to match server capacity.
- Global rate limit: 100/min → 30/min (server handles ~28 PDFs/min)
- CORS: recover routes now restricted to docfast.dev origin
2026-02-14 19:42:53 +00:00
1af1b07fb3 fix: update key recovery messaging across all pages 2026-02-14 19:27:21 +00:00
87a49d8e93 feat: key recovery via email verification (BUG-014)
- POST /v1/recover: request recovery code
- POST /v1/recover/verify: verify code, receive key via email
- Key sent via email only (not in API response) for security
- Rate limited to 3 attempts per hour
- Non-enumerable: same response whether email exists or not
- DKIM-signed emails via postfix/opendkim
2026-02-14 19:26:47 +00:00
874bbc4267 fix(BUG-025): attach click listener to copy button on API key display 2026-02-14 19:17:18 +00:00
210fb26ec1 fix(BUG-021): remove verification code from API response, send via email
- Replace Resend email service with nodemailer via local postfix relay
- Remove code field from POST /v1/signup/free response
- Send 6-digit verification code via email only (noreply@docfast.dev)
- Add extra_hosts for Docker-to-host SMTP relay
- Fire-and-forget email sending to avoid blocking API response
2026-02-14 19:10:45 +00:00
OpenClaw
a67c16cd0f fix: BUG-022 check duplicate email before rate limit, BUG-024 support X-API-Key header 2026-02-14 18:41:46 +00:00
f59b99203e feat: add 6-digit code email verification to signup flow
- POST /v1/signup/free now returns verification code (temp in response)
- New POST /v1/signup/verify endpoint to verify code and get API key
- Codes expire after 15 minutes, max 3 attempts
- Frontend updated with 2-step signup modal (email → code → key)
- Legacy token verification kept for existing links
2026-02-14 18:25:55 +00:00
OpenClaw
0a3f935af1 fix: use npm install instead of npm ci in Dockerfile 2026-02-14 18:16:42 +00:00
OpenClaw
1b20665b0d feat: email verification for free tier signup
- Signup now requires email verification before API key is revealed
- Verification token sent via email (Resend) with console fallback
- GET /verify?token=xxx shows API key in styled HTML page
- Handles expired (24h), invalid, and already-verified tokens
- Frontend modal shows 'check your email' instead of key
- Keeps existing rate limiting
2026-02-14 18:12:25 +00:00
890b82e5ec Apply aggressive mobile overflow fixes
- Add !important declarations to override any conflicting styles
- Force overflow-x: hidden on html and body globally
- Apply universal max-width: 100% on mobile
- Specifically target code blocks with word-break and overflow fixes
- Reduce container padding to prevent width issues

This should definitively resolve horizontal scrolling on 375px viewports.
2026-02-14 17:57:09 +00:00
36a34a7cc2 Fix mobile horizontal scrolling issue
- Add overflow-x: hidden on body and container for mobile viewports
- Improve code block responsive behavior with pre-wrap and word-break
- Constrain code-section width to prevent viewport overflow
- Fix trust-grid horizontal overflow on small screens

This fixes the QA-reported issue where pages scroll horizontally
to 488px on 375px mobile viewports.
2026-02-14 17:55:04 +00:00
OpenClaw
b0766c82bc Polish landing page: modern design, new signup flow (no email), trust signals, responsive 2026-02-14 17:24:44 +00:00
OpenClaw
3c0bac889a fix: BUG-012 remove email requirement from free signup + fix 429 handling 2026-02-14 17:24:03 +00:00
73bb041513 Security fixes: non-root user, signup rate limiting, differentiated CORS, persistent usage tracking 2026-02-14 17:04:55 +00:00
6a38ba4adc fix: critical security issues - webhook bypass, SSRF, XSS 2026-02-14 16:19:48 +00:00
bba19442f4 fix: copy button fallback for clipboard API failures (BUG-006) 2026-02-14 15:46:54 +00:00
53bebc0119 fix: BUG-006 copy feedback, BUG-008 white border CSS reset, BUG-010 CORS allow all origins 2026-02-14 15:41:22 +00:00
d8bc3fd8e6 fix: BUG-009 setTimeout syntax, BUG-010 CORS helmet policy, BUG-011 content-type validation 2026-02-14 15:34:21 +00:00
6891e488b6 fix(BUG-006,007,008): copy feedback, invoice data unwrap, zero margins
BUG-007: Unwrap req.body.data for template endpoint (docs show wrapped format)
BUG-008: Default PDF margins set to 0 (user can override via request body)
BUG-006: Copy button shows Copied! for 2s then reverts
2026-02-14 15:28:00 +00:00
2638f6638c fix(BUG-004): extract inline JS to app.js for CSP compliance 2026-02-14 15:28:00 +00:00
6276d61aa3 fix: add CORS headers and trust proxy for rate limiter
- Added CORS middleware allowing docfast.dev origin
- Added app.set('trust proxy', 1) to fix ERR_ERL_UNEXPECTED_X_FORWARDED_FOR
- The rate limiter was crashing on every proxied request through nginx
2026-02-14 14:37:28 +00:00
7f04789997 Add proper API docs page, fix Stripe lazy init, update docs links 2026-02-14 14:31:44 +00:00
467a97ae1c fix: self-service signup, unified key store, persistent data volume
- Added /v1/signup/free endpoint for instant API key provisioning
- Built unified key store (services/keys.ts) with file-based persistence
- Refactored auth middleware to use key store (no more hardcoded env keys)
- Refactored usage middleware to check key tier from store
- Updated billing to use key store for Pro key provisioning
- Landing page: replaced mailto: link with signup modal
- Landing page: Pro checkout button now properly calls /v1/billing/checkout
- Added Docker volume for persistent key storage
- Success page now renders HTML instead of raw JSON
- Tested: signup → key → PDF generation works end-to-end
2026-02-14 14:20:05 +00:00
c12c1176b0 Add Stripe billing integration + update free tier to 100 PDFs/mo 2026-02-14 13:53:19 +00:00
facb8df8f4 fix: ARM Chromium support, Dockerfile improvements, ESM build fix 2026-02-14 13:46:15 +00:00
6896b72e0c Add URL→PDF endpoint, usage tracking middleware, free tier limits 2026-02-14 13:02:40 +00:00
8e03b8ab3c Add landing page, tests, Docker deployment, nginx config 2026-02-14 13:01:07 +00:00
feee0317ae Initial MVP: DocFast PDF API
- HTML/Markdown to PDF conversion via Puppeteer
- Invoice and receipt templates
- API key auth + rate limiting
- Dockerfile for deployment
2026-02-14 12:38:06 +00:00