Commit graph

235 commits

Author SHA1 Message Date
DocFast Bot
855068a011 fix: downgrade instead of delete key on subscription cancel
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 2m43s
- Replace revokeByCustomer with downgradeByCustomer in keys.ts
  - Sets tier='free' in cache and DB (UPDATE, not DELETE)
- Add isDocFastSubscription() product filter helper in billing.ts
  - Filters all subscription events by prod_TygeG8tQPtEAdE
- Handle customer.subscription.updated event
  - Downgrades on status=canceled/past_due/unpaid or cancel_at_period_end=true
- Handle customer.subscription.deleted with product filter
  - Downgrades to free (was incorrectly deleting the key)

Fixes revenue integrity bug: cancelled Pro subscribers kept Pro access.
2026-02-17 10:46:12 +00:00
OpenClaw
2bfd893510 Fix: sticky navbar on all pages
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 2m10s
2026-02-17 10:38:52 +00:00
DocFast Agent
7653939bd9 fix: QA audit bugs BUG-051/052/056/057/059/062/063/064/065/066/068
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 1m38s
- BUG-056: Fix sitemap namespace sitemapns.org -> sitemaps.org
- BUG-062: Extend <main> to wrap all page content (hero+features+pricing+EU section)
- BUG-064: Add sr-only <label> elements to all modal form inputs (signup, recovery, change-email)
- BUG-051/052: Remove duplicate X-Content-Type-Options headers from nginx (let helmet handle)
- BUG-057: Fix JSON-LD and pricing card: Pro plan is 2,500 PDFs/month not 5,000
- BUG-059: Add meta description, canonical URL, og: tags to /docs page
- BUG-063: Change eu-hosting h3 to h2 (correct heading hierarchy)
- BUG-065/066: Add aria-modal=true, role=dialog to modals; aria-label=Close to close buttons
- BUG-068: Add hash-based modal open for #change-email on page load
- Add .sr-only CSS utility class to base and index styles
2026-02-17 08:15:03 +00:00
DocFast Agent
a0d4ba964c fix: audit #18 rate limit cleanup (.unref), audit #25 consistent error shapes
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 1m4s
Audit #18 - Rate limit store memory growth:
- rateLimitStore already had cleanup via cleanupExpiredEntries() per-request + 60s interval
- Added .unref() to the setInterval timer for clean graceful shutdown behaviour

Audit #25 - Consistent error response shapes:
- billing.ts: Fixed 409 plain-text response -> JSON { error: "..." }
- index.ts: Simplified 404 from 4-field object to { error: "Not Found: METHOD path" }
- signup.ts: Removed extra retryAfter field from rate-limit message object
- pdfRateLimit.ts: Merged limit/tier/retryAfter into single error message string
- usage.ts: Merged limit/used/upgrade fields into single error message string
- convert.ts: Merged detail field into error message (3 occurrences)

All error responses now consistently use {"error": "message"} shape.
2026-02-17 08:10:14 +00:00
OpenClaw
e7d28bc62b fix: batch usage writes (#10), retry divergence (#12), per-key queue fairness (#15)
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 3m9s
2026-02-16 20:07:11 +00:00
OpenClaw
09c6feb06e Fix audit #14 (body size limits), #17 (duplicate session_id), #22 (unused import)
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 2m53s
2026-02-16 19:51:24 +00:00
OpenClaw
6cc30db5c6 Add styled /status page, update footer/terms links from /health to /status
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 2m49s
2026-02-16 19:48:25 +00:00
OpenClaw
59cc8f3d0e Session 45: support email, audit fixes (template validation, content-type, admin auth, waitUntil)
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 2m20s
- Added support@docfast.dev to footer, impressum, terms, landing page, openapi.json
- Fixed audit #6: Template render validates required fields (400 on missing)
- Fixed audit #7: Content-Type check on markdown/URL routes (415)
- Fixed audit #11: /v1/usage and /v1/concurrency now require ADMIN_API_KEY
- Fixed audit Critical #3: URL convert uses domcontentloaded instead of networkidle0
2026-02-16 19:30:21 +00:00
OpenClaw
8a86e34f91 fix: critical and high-severity security fixes
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 2m52s
- CRITICAL: DNS rebinding SSRF - pin DNS resolution via request interception
- CRITICAL: XSS in billing success - use data-attribute instead of JS string
- HIGH: Webhook signature bypass - refuse unverified webhooks (500)
- HIGH: Filename header injection - sanitize Content-Disposition filename
- HIGH: Verification code timing attack - use crypto.timingSafeEqual()
- HIGH: Remove duplicate unreachable 404 handler
- HIGH: Add IPv6 unique local (fc00::/7) to SSRF private IP check
- HIGH: Replace console.warn with structured logger
2026-02-16 18:56:21 +00:00
a01fbb0357 feat: website templating system — shared nav/footer partials, build-time HTML assembly
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 1m55s
- Build script: scripts/build-pages.js (zero dependencies, Node.js only)
- Shared partials: nav.html, footer.html (single source of truth)
- 5 page templates in templates/pages/
- Output is byte-for-byte identical to current production
- Run: npm run build:pages
- Also fixes JSON-LD: 2,500 → 5,000 PDFs/month (was inconsistent)
2026-02-16 18:54:17 +00:00
OpenClaw
e51e65524a refactor: extract shared partials from HTML pages (nav, footer, styles, modals)
Some checks failed
Deploy to Production / Deploy to Server (push) Has been cancelled
- Created build-time templating system using existing build-html.cjs
- Extracted index.html into source template with partials:
  _styles_index.html, _nav_index.html, _modals.html
- All 4 templated pages (index, impressum, privacy, terms) use partials
- docs.html excluded (Swagger UI, completely different structure)
- Added HTML build step to Dockerfile
- Built output is byte-identical to original files
2026-02-16 18:52:31 +00:00
OpenClaw
aab6bf3bee feat: Pro limit 2,500/mo, website templating, cleanup
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 2m24s
- Set Pro tier limit to 2,500 PDFs/month (was unlimited/5000)
- Added Pro limit enforcement in usage middleware
- Updated landing page, JSON-LD, and Stripe product description
- Created build-time HTML templating (partials for nav/footer/styles)
- Source files in public/src/, partials in public/partials/
- Build script: node scripts/build-html.cjs
- Deleted stale backup file
- Fixed index.html nav logo to use <a> tag for consistency
2026-02-16 18:46:59 +00:00
d3015826e5 cleanup: remove incomplete template partials
Some checks failed
Deploy to Production / Deploy to Server (push) Has been cancelled
2026-02-16 18:44:52 +00:00
c903860917 Enforce Pro plan limit of 5,000 PDFs/month
Some checks failed
Deploy to Production / Deploy to Server (push) Has been cancelled
2026-02-16 18:41:57 +00:00
OpenClaw
b98e8bc253 fix: BUG-046 usage endpoint data leak, BUG-047 copy button, BUG-048 email change links
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 1m18s
BUG-046 (CRITICAL): getUsageStats() now accepts apiKey param and returns
only that key usage instead of all users. Route passes req.apiKeyInfo.key.

BUG-047: Added visible Copy button to Pro key success page in billing.ts.

BUG-048: Added class="open-email-change" to Change Email links in all
HTML pages so the JS modal opener can find them.
2026-02-16 18:06:52 +00:00
OpenClaw
a1d26b85ec Add off-site BorgBackup to Hetzner Storage Box
Some checks failed
Deploy to Production / Deploy to Server (push) Has been cancelled
- Separate borg repo on Hetzner Storage Box (repokey-blake2)
- Runs daily at 03:30 UTC (after local backup at 03:00)
- Same data: PG dump, Docker volumes, nginx, SSL, DKIM, app files
- Same retention: 7 daily + 4 weekly + 3 monthly
- Remote: ssh://u149513-sub11@u149513-sub11.your-backup.de:23/./docfast-1
2026-02-16 18:05:44 +00:00
DocFast Bot
5b7e343139 build: compile dist for sitemap, favicon, and graceful shutdown changes
All checks were successful
Deploy to Production / Deploy to Server (push) Successful in 1m12s
2026-02-16 16:10:15 +00:00
DocFast Bot
d7b0a0eaa6 fix(landing): BUG-045 — Pro tier says Unlimited instead of 10,000 PDFs
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 22s
The Pro tier has no limit in code (unlimited). Fixed landing page copy
and JSON-LD structured data to match.
2026-02-16 16:07:26 +00:00
DocFast Bot
b1135edcca security: disable JavaScript execution in Puppeteer for PDF generation
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 21s
2026-02-16 15:32:34 +00:00
OpenClaw
59d563841d merge: resolve conflicts, keep standardized footer versions
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 20s
2026-02-16 15:04:24 +00:00
OpenClaw
e926349d7f fix: standardize footer across all pages, add Home link, fix mobile footer CSS 2026-02-16 15:03:29 +00:00
DocFast Bot
735e788acd Fix footer link order to match home page exactly
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 21s
2026-02-16 14:47:53 +00:00
DocFast Bot
f53a6a5460 Update impressum with real company data, unify footer across all pages
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 21s
2026-02-16 14:46:54 +00:00
openclawd
1ef8f5743c feat: Add built dist files with EU compliance routes
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 20s
- Include compiled TypeScript with new /impressum, /privacy, /terms routes
- Temporary commit of dist files for Docker deployment
2026-02-16 13:09:25 +00:00
openclawd
5ef8f34133 feat: Add EU compliance pages and EU hosting marketing
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 20s
- Add footer links for Impressum, Privacy Policy, Terms of Service
- Create legal pages: /impressum, /privacy, /terms (Austrian/EU compliant)
- Add EU hosting badge highlighting GDPR compliance and EU data residency
- Add Express routes for legal pages with caching headers
- All pages use consistent dark theme design matching landing page
2026-02-16 13:07:24 +00:00
openclawd
03dd6c17df Fix three critical issues: Docker healthcheck, USD->EUR pricing, static asset caching
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 22s
- Docker healthcheck: Use Node.js instead of curl (not installed in slim image)
- Pricing: Change from USD ($) to EUR (€) in frontend and backend Stripe integration
- Static assets: Add Cache-Control headers (1 day) for /public and /docs files
2026-02-16 13:04:47 +00:00
openclawd
76714d799e Fix: nginx duplicate MIME type, update version to 0.2.1, improve log rotation
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 22s
- Remove duplicate text/html from nginx gzip_types (fixes nginx -t warning)
- Update hardcoded API version from 0.2.0 to 0.2.1 to match package.json
- Update logrotate config: daily rotation, 7 days retention, improved postrotate
- Add Docker logging configuration with size/file limits
2026-02-16 08:36:55 +00:00
openclawd
7b55a1ddc6 Fix SSRF vulnerability: Add IPv6 link-local blocking and update error message
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 20s
- Add fe80::/10 (IPv6 link-local) detection to isPrivateIP()
- Update error message to match specification: 'URL resolves to a private/internal IP address'
- Existing protections already covered all required IPv4 ranges and IPv6 localhost
2026-02-16 08:36:08 +00:00
DocFast CEO
86f8da62ec v0.2.1: request logging, 404 handler, permissions-policy, SEO improvements, typo fix
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 20s
2026-02-16 08:32:57 +00:00
openclawd
210e71e3d8 feat: SEO + Nginx optimization
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 21s
- Update sitemap.xml to include /v1/health endpoint
- Add proper 404 handling (JSON for API paths, HTML for browser paths)
- Create optimized nginx config with gzip, cache headers, specific locations
- Add logrotate configuration for DocFast logs
- Add security headers and static asset caching
2026-02-16 08:30:14 +00:00
OpenClaw
9541ae1826 Backend hardening: structured logging, timeouts, memory leak fixes, compression, XSS fix
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 20s
- Add pino structured logging with request IDs (X-Request-Id header)
- Add 30s timeout to acquirePage() and renderPdf/renderUrlPdf
- Add verification cache cleanup (every 15min) and rate limit cleanup (every 60s)
- Read version from package.json in health endpoint
- Add compression middleware
- Escape currency in templates (XSS fix)
- Add static asset caching (1h maxAge)
- Remove deprecated docker-compose version field
- Replace all console.log/error with pino logger
2026-02-16 08:27:42 +00:00
OpenClaw
4833edf44c SEO & accessibility: OG tags, robots.txt, sitemap, OG image, aria labels, focus trap, keyboard nav
Some checks failed
Deploy to Production / Deploy to Server (push) Has been cancelled
2026-02-16 08:27:25 +00:00
openclawd
ed273430c7 Merge branch 'main' of ssh://git.cloonar.com/openclawd/docfast
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 21s
2026-02-15 11:06:49 +00:00
openclawd
76c1cc3bfb Add comprehensive backup and restore infrastructure
- scripts/borg-backup.sh: Complete disaster recovery backup (PostgreSQL, Docker volumes, configs, SSL certs, DKIM keys)
- scripts/borg-restore.sh: Automated restore from Borg backups with manual verification steps
- scripts/rollback.sh: Quick application rollback using Docker image tags
- Enhanced setup.sh with BorgBackup installation and cron job setup
- Updated README with detailed backup strategy documentation (2-tier: SQLite + Borg)

Backup retention: 7 daily + 4 weekly + 3 monthly Borg archives + 7 days SQLite snapshots
2026-02-15 11:06:42 +00:00
OpenClaw
7e74f22ea3 Update backup system and local changes
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 21s
- BorgBackup disaster recovery system
- Health endpoint updates
- Merged with remote changes
2026-02-15 11:04:58 +00:00
OpenClaw
ef84279eae Add BorgBackup disaster recovery system
- Full backup of PostgreSQL, Docker volumes, nginx config, SSL certs, crontabs, OpenDKIM
- Daily backups at 03:00 UTC with 7d/4w/3m retention
- Local storage at /opt/borg-backups/docfast
- Restore testing verified
- Documentation for disaster recovery procedures
2026-02-15 11:04:58 +00:00
openclawd
3820d7ea4d Add complete infrastructure automation and documentation
Some checks failed
Deploy to Production / Deploy to Server (push) Has been cancelled
- infrastructure/setup.sh: Master provisioning script for fresh Ubuntu servers
- infrastructure/docker-compose.yml: Production Docker Compose configuration
- infrastructure/.env.template: Environment variables template
- infrastructure/nginx/: Nginx configuration with security headers
- infrastructure/postfix/: Postfix + OpenDKIM email configuration
- infrastructure/README.md: Complete disaster recovery guide
- scripts/docfast-backup.sh: SQLite backup script with rotation

All services now fully reproducible with documented disaster recovery procedures.
2026-02-15 11:04:34 +00:00
openclawd
d99eea517c Add comprehensive CI/CD setup completion documentation
Some checks failed
Deploy to Production / Deploy to Server (push) Has been cancelled
2026-02-15 11:04:25 +00:00
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