No description
Find a file
DocFast CEO 03f82a8d03
Some checks failed
Build & Deploy to Staging / Build & Deploy to Staging (push) Failing after 9m34s
fix: update basic-ftp and rollup to resolve security vulnerabilities
- basic-ftp: critical path traversal (GHSA-5rq4-664w-9x2c) - production dep via puppeteer
- rollup: high path traversal (GHSA-mw96-cpmx-2vgc) - dev dep via vitest
- npm audit now shows 0 vulnerabilities
- All 291 tests pass
2026-02-28 07:02:30 +00:00
.forgejo/workflows fix: make test suite runnable without DB/Chrome, add tests to CI 2026-02-25 07:07:12 +00:00
deploy Add landing page, tests, Docker deployment, nginx config 2026-02-14 13:01:07 +00:00
dist docs: add missing OpenAPI annotations for signup/verify, billing/success, billing/webhook 2026-02-27 16:04:55 +00:00
infrastructure Add comprehensive backup and restore infrastructure 2026-02-15 11:06:42 +00:00
public docs: add missing OpenAPI annotations for signup/verify, billing/success, billing/webhook 2026-02-27 16:04:55 +00:00
scripts feat: Add JS minification to build pipeline and expand test coverage 2026-02-25 10:05:50 +00:00
sdk feat: add Go, PHP, and Laravel SDKs 2026-02-21 13:29:48 +00:00
src feat: add email change routes (BUG-090) 2026-02-27 19:04:36 +00:00
templates/partials Consolidate build system and add JS minification (fixes BUG-084) 2026-02-22 07:02:59 +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 feat: add SMTP auth support for K3s migration 2026-02-18 12:47:33 +00:00
Dockerfile v0.4.1: Code-driven OpenAPI docs via swagger-jsdoc 2026-02-20 07:54:37 +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
logrotate-docfast Fix: nginx duplicate MIME type, update version to 0.2.1, improve log rotation 2026-02-16 08:36:55 +00:00
nginx-docfast.conf fix: QA audit bugs BUG-051/052/056/057/059/062/063/064/065/066/068 2026-02-17 08:15:03 +00:00
package-lock.json fix: update basic-ftp and rollup to resolve security vulnerabilities 2026-02-28 07:02:30 +00:00
package.json test: add route tests for signup, recover, health 2026-02-26 16:05:05 +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
vitest.config.ts fix: make test suite runnable without DB/Chrome, add tests to CI 2026-02-25 07:07:12 +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