Commit graph

47 commits

Author SHA1 Message Date
openclawd
9e5163d499 Add version file - test CI/CD pipeline trigger
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 23s
2026-02-15 11:03:52 +00:00
openclawd
302c4b372a Merge remote changes with CI/CD pipeline additions
Some checks failed
Deploy to Production / Deploy to Server (push) Has been cancelled
Resolved minor conflict in rate limiting comment.
Maintains CI/CD deployment setup with latest backend changes.
2026-02-15 11:03:40 +00:00
openclawd
7d3525fe57 Add CI/CD deployment pipeline with Forgejo Actions
- Add .forgejo/workflows/deploy.yml for automated deployment
- Include rollback mechanism with image tagging
- Add health check verification (http://127.0.0.1:3100/health)
- Create manual rollback script for emergency use
- Add deployment documentation and setup instructions
- Supports auto-rollback on deployment failure
2026-02-15 11:02:43 +00:00
DocFast Bot
8454330a0b fix(BUG-032): force flex display on code-section in mobile media query 2026-02-15 10:46:05 +00:00
DocFast Bot
16187c0ecb fix(BUG-032): eliminate mobile terminal gap - flexbox layout + white-space fix 2026-02-15 10:45:08 +00:00
DocFast Bot
75aa80eea2 Build dist for BUG-037 2026-02-15 10:44:58 +00:00
DocFast Bot
ebdeb74094 BUG-037: Filter webhook by product_id prod_TygeG8tQPtEAdE
Shared Stripe account - only process checkout events for DocFast product.
Retrieves session with expanded line_items to check product ID.
2026-02-15 10:44:09 +00:00
DocFast Bot
8a8b7e2a9b Fix migration script syntax 2026-02-15 10:18:48 +00:00
DocFast Bot
e9d16bf2a3 Migrate from JSON to PostgreSQL, update SLA to 99.5%
- Replace JSON file storage with PostgreSQL (pg package)
- Add db.ts service for connection pool and schema init
- Rewrite keys.ts, verification.ts, usage.ts for async PostgreSQL
- Update all routes for async function signatures
- Add migration script (scripts/migrate-to-postgres.mjs)
- Update docker-compose.yml with DATABASE_* env vars
- Change SLA from 99.9% to 99.5% in landing page
2026-02-15 10:18:25 +00:00
OpenClaw
bb1881af61 feat: add checkout.session.completed webhook handler for pro key provisioning
Safety net: provisions pro API key on successful checkout via webhook,
in case user doesn't reach the success page. Idempotent with existing
createProKey logic. Gracefully handles missing STRIPE_WEBHOOK_SECRET.
2026-02-15 09:52:48 +00:00
OpenClaw
aa23d4ae2a Add checkout.session.completed webhook handler for Pro key creation
- Extract customer email from session.customer_details?.email
- Check if Pro key already exists for that email (idempotent)
- Create Pro key only if one does not exist
- Add comprehensive logging for debugging
- Ensures webhook and success page work together without duplicates
2026-02-15 09:52:25 +00:00
OpenClaw Agent
0453176544 Fix BUG-033: Update OpenAPI spec with Pro tier rate limit (30 req/min)
Fix BUG-032: Add 375px mobile breakpoint for terminal gap issues
- Reduced container padding to 12px on smallest screens
- Optimized code-section margins and padding
- Improved terminal header and code-block spacing
- Enhanced hero section padding for mobile
2026-02-15 09:50:04 +00:00
OpenClaw
f5a85c6fc3 feat: data-backed rate limits, concurrency limiter, copy button fix (BUG-025, BUG-022) 2026-02-15 08:14:39 +00:00
OpenClaw Agent
73917551bd Fix rate limits, concurrency control, copy button
- DATA-BACKED RATE LIMITS:
  * Reduce global rate limit from 10,000/min to 100/min
  * Add PDF conversion rate limits: 10/min free, 30/min pro
  * Set recovery rate limit to 3/hour (was 5/hour)
  * Add concurrency limiter: max 3 simultaneous PDFs, queue rest
  * Return 429 if queue > 10

- BUG-025: Fix copy button functionality
  * Improve fallback handling for execCommand
  * Add better error handling and user feedback
  * Fix secure context detection

- Add concurrency monitoring endpoint /v1/concurrency
2026-02-15 08:04:56 +00:00
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