diff --git a/deploy/nginx.conf b/deploy/nginx.conf new file mode 100644 index 0000000..42c5ba6 --- /dev/null +++ b/deploy/nginx.conf @@ -0,0 +1,38 @@ +# Nginx reverse proxy config for DocFast +# Place in /etc/nginx/sites-available/docfast.conf and symlink to sites-enabled +# Requires: certbot for SSL (or existing wildcard cert) + +server { + listen 80; + server_name api.docfast.dev; + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl http2; + server_name api.docfast.dev; + + # SSL certs (adjust paths) + ssl_certificate /etc/letsencrypt/live/api.docfast.dev/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/api.docfast.dev/privkey.pem; + + # Security headers + add_header X-Frame-Options DENY; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + + # Max body size (HTML/Markdown input) + client_max_body_size 2m; + + location / { + proxy_pass http://127.0.0.1:3100; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + # PDF responses can be large + proxy_read_timeout 30s; + proxy_buffering off; + } +} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..319fa8c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +version: "3.8" +services: + docfast: + build: . + restart: unless-stopped + ports: + - "127.0.0.1:3100:3100" + environment: + - API_KEYS=${API_KEYS} + - PORT=3100 + - NODE_ENV=production + mem_limit: 512m + cpus: 1.0 diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..b990008 --- /dev/null +++ b/public/index.html @@ -0,0 +1,199 @@ + + +
+ + +One API call. Beautiful PDFs. Built-in invoice templates. No headless browser setup, no dependencies, no hassle.
+Sub-second PDF generation. Persistent browser pool means no cold starts.
+Full CSS support. Custom fonts, colors, layouts. Your PDFs, your brand.
+Built-in invoice and receipt templates. Pass data, get PDF. No HTML needed.
+REST API with JSON in, PDF out. Works with any language. No SDKs required.
+A4, Letter, custom sizes. Portrait or landscape. Configurable margins.
+Your data is never stored. PDFs are generated and streamed — nothing hits disk.
+No per-page fees. No hidden limits. Pay for what you use.
+