No description
Find a file
OpenClaw 9541ae1826
Some checks failed
Deploy to Production / Deploy to Server (push) Failing after 20s
Backend hardening: structured logging, timeouts, memory leak fixes, compression, XSS fix
- 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
.forgejo/workflows Add CI/CD deployment pipeline with Forgejo Actions 2026-02-15 11:02:43 +00:00
deploy Add landing page, tests, Docker deployment, nginx config 2026-02-14 13:01:07 +00:00
infrastructure Add comprehensive backup and restore infrastructure 2026-02-15 11:06:42 +00:00
public SEO & accessibility: OG tags, robots.txt, sitemap, OG image, aria labels, focus trap, keyboard nav 2026-02-16 08:27:25 +00:00
scripts Add comprehensive backup and restore infrastructure 2026-02-15 11:06:42 +00:00
src Backend hardening: structured logging, timeouts, memory leak fixes, compression, XSS fix 2026-02-16 08:27:42 +00:00
@ feat: email change UI, Swagger UI improvements, key recovery link on landing page 2026-02-14 22:15:31 +00:00
.gitignore fix: self-service signup, unified key store, persistent data volume 2026-02-14 14:20:05 +00:00
BACKUP_PROCEDURES.md Add BorgBackup disaster recovery system 2026-02-15 11:04:58 +00:00
bugs.md Fix rate limits, concurrency control, copy button 2026-02-15 08:04:56 +00:00
CI-CD-SETUP-COMPLETE.md Add comprehensive CI/CD setup completion documentation 2026-02-15 11:04:25 +00:00
decisions.md Fix rate limits, concurrency control, copy button 2026-02-15 08:04:56 +00:00
DEPLOYMENT.md Add CI/CD deployment pipeline with Forgejo Actions 2026-02-15 11:02:43 +00:00
docker-compose.yml Backend hardening: structured logging, timeouts, memory leak fixes, compression, XSS fix 2026-02-16 08:27:42 +00:00
Dockerfile fix: swagger UI symlink, CSP headers, email-change route, updateKeyEmail 2026-02-14 22:29:56 +00:00
Dockerfile.backup Security fixes: non-root user, signup rate limiting, differentiated CORS, persistent usage tracking 2026-02-14 17:04:55 +00:00
package-lock.json Backend hardening: structured logging, timeouts, memory leak fixes, compression, XSS fix 2026-02-16 08:27:42 +00:00
package.json Backend hardening: structured logging, timeouts, memory leak fixes, compression, XSS fix 2026-02-16 08:27:42 +00:00
README.md Initial MVP: DocFast PDF API 2026-02-14 12:38:06 +00:00
sessions.md Fix rate limits, concurrency control, copy button 2026-02-15 08:04:56 +00:00
state.json Fix rate limits, concurrency control, copy button 2026-02-15 08:04:56 +00:00
tsconfig.json Initial MVP: DocFast PDF API 2026-02-14 12:38:06 +00:00
VERSION Add version file - test CI/CD pipeline trigger 2026-02-15 11:03:52 +00:00

DocFast API

Fast, simple HTML/Markdown to PDF API with built-in invoice templates.

Quick Start

npm install
npm run build
API_KEYS=your-key-here npm start

Endpoints

Convert HTML to PDF

curl -X POST http://localhost:3100/v1/convert/html \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html": "<h1>Hello</h1><p>World</p>"}' \
  -o output.pdf

Convert Markdown to PDF

curl -X POST http://localhost:3100/v1/convert/markdown \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markdown": "# Hello\n\nWorld"}' \
  -o output.pdf

Invoice Template

curl -X POST http://localhost:3100/v1/templates/invoice/render \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "invoiceNumber": "INV-001",
    "date": "2026-02-14",
    "from": {"name": "Your Company", "email": "you@example.com"},
    "to": {"name": "Client", "email": "client@example.com"},
    "items": [{"description": "Service", "quantity": 1, "unitPrice": 100, "taxRate": 20}]
  }' \
  -o invoice.pdf

Options

  • format: Paper size (A4, Letter, Legal, etc.)
  • landscape: true/false
  • margin: {top, right, bottom, left} in CSS units
  • css: Custom CSS (for markdown/html fragments)
  • filename: Suggested filename in Content-Disposition header

Auth

Pass API key via Authorization: Bearer <key>. Set API_KEYS env var (comma-separated for multiple keys).

Docker

docker build -t docfast .
docker run -p 3100:3100 -e API_KEYS=your-key docfast