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
This commit is contained in:
OpenClaw 2026-02-16 18:46:26 +00:00
parent d3015826e5
commit aab6bf3bee
15 changed files with 556 additions and 407 deletions

View file

@ -2,6 +2,7 @@ import { isProKey } from "../services/keys.js";
import logger from "../services/logger.js";
import pool from "../services/db.js";
const FREE_TIER_LIMIT = 100;
const PRO_TIER_LIMIT = 5000;
// In-memory cache, periodically synced to PostgreSQL
let usage = new Map();
function getMonthKey() {
@ -36,6 +37,15 @@ export function usageMiddleware(req, res, next) {
const key = keyInfo?.key || "unknown";
const monthKey = getMonthKey();
if (isProKey(key)) {
const record = usage.get(key);
if (record && record.monthKey === monthKey && record.count >= PRO_TIER_LIMIT) {
res.status(429).json({
error: "Pro tier limit reached (5,000/month). Contact support for higher limits.",
limit: PRO_TIER_LIMIT,
used: record.count,
});
return;
}
trackUsage(key, monthKey);
next();
return;
@ -46,7 +56,7 @@ export function usageMiddleware(req, res, next) {
error: "Free tier limit reached",
limit: FREE_TIER_LIMIT,
used: record.count,
upgrade: "Upgrade to Pro for unlimited conversions: https://docfast.dev/pricing",
upgrade: "Upgrade to Pro for 5,000 PDFs/month: https://docfast.dev/pricing",
});
return;
}

View file

@ -67,7 +67,7 @@ a { color: #4f9; }
<p>Your API key:</p>
<div class="key" style="position:relative">${escapeHtml(keyInfo.key)}<button onclick="navigator.clipboard.writeText('${escapeHtml(keyInfo.key)}');this.textContent='Copied!';setTimeout(()=>this.textContent='Copy',1500)" style="position:absolute;top:8px;right:8px;background:#4f9;color:#0a0a0a;border:none;border-radius:4px;padding:4px 12px;cursor:pointer;font-size:0.8rem;font-family:system-ui">Copy</button></div>
<p><strong>Save this key!</strong> It won't be shown again.</p>
<p>10,000 PDFs/month All endpoints Priority support</p>
<p>5,000 PDFs/month All endpoints Priority support</p>
<p><a href="/docs">View API docs </a></p>
</div></body></html>`);
}
@ -171,7 +171,7 @@ async function getOrCreateProPrice() {
else {
const product = await getStripe().products.create({
name: "DocFast Pro",
description: "Unlimited PDF conversions via API. HTML, Markdown, and URL to PDF.",
description: "5,000 PDFs / month via API. HTML, Markdown, and URL to PDF.",
});
productId = product.id;
}

View file

@ -4,6 +4,7 @@
"description": "Markdown/HTML to PDF API with built-in invoice templates",
"main": "dist/index.js",
"scripts": {
"build:html": "node scripts/build-html.cjs",
"build": "tsc",
"start": "node dist/index.js",
"dev": "tsx src/index.ts",

View file

@ -20,38 +20,29 @@ body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Robo
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
.container { max-width: 800px; margin: 0 auto; padding: 0 24px; }
/* Nav */
nav { padding: 20px 0; border-bottom: 1px solid var(--border); }
nav .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; color: var(--fg); display: flex; align-items: center; gap: 8px; }
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; color: var(--fg); display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--fg); }
/* Content */
main { padding: 60px 0 80px; }
h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -1px; }
h2 { font-size: 1.5rem; font-weight: 700; margin: 32px 0 16px; color: var(--accent); }
p { margin-bottom: 16px; line-height: 1.7; }
.highlight { background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.15); border-radius: 8px; padding: 16px; margin: 24px 0; color: var(--accent); font-size: 0.9rem; }
.info { background: rgba(96,165,250,0.08); border: 1px solid rgba(96,165,250,0.15); border-radius: 8px; padding: 16px; margin: 24px 0; color: #60a5fa; font-size: 0.9rem; }
/* Footer */
footer { padding: 40px 0; border-top: 1px solid var(--border); }
footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.content { padding: 60px 0; min-height: 60vh; }
.content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 32px; letter-spacing: -1px; }
.content h2 { font-size: 1.3rem; font-weight: 700; margin: 32px 0 16px; color: var(--fg); }
.content h3 { font-size: 1.1rem; font-weight: 600; margin: 24px 0 12px; color: var(--fg); }
.content p, .content li { color: var(--muted); margin-bottom: 12px; }
.content ul, .content ol { padding-left: 24px; }
.content strong { color: var(--fg); }
footer { padding: 32px 0; border-top: 1px solid var(--border); margin-top: 60px; }
footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-left { color: var(--muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--fg); }
/* Responsive */
@media (max-width: 640px) {
main { padding: 40px 0 60px; }
h1 { font-size: 2rem; }
.footer-links { gap: 16px; }
@media (max-width: 768px) {
footer .container { flex-direction: column; text-align: center; }
.nav-links { gap: 16px; }
}
</style>
</head>

View file

@ -17,7 +17,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"SoftwareApplication","name":"DocFast","url":"https://docfast.dev","applicationCategory":"DeveloperApplication","operatingSystem":"Web","description":"Convert HTML and Markdown to beautiful PDFs with a simple API call. Fast, reliable, developer-friendly.","offers":[{"@type":"Offer","price":"0","priceCurrency":"EUR","name":"Free","description":"100 PDFs/month"},{"@type":"Offer","price":"9","priceCurrency":"EUR","name":"Pro","description":"5,000 PDFs / month","billingIncrement":"P1M"}]}
{"@context":"https://schema.org","@type":"SoftwareApplication","name":"DocFast","url":"https://docfast.dev","applicationCategory":"DeveloperApplication","operatingSystem":"Web","description":"Convert HTML and Markdown to beautiful PDFs with a simple API call. Fast, reliable, developer-friendly.","offers":[{"@type":"Offer","price":"0","priceCurrency":"EUR","name":"Free","description":"100 PDFs/month"},{"@type":"Offer","price":"9","priceCurrency":"EUR","name":"Pro","description":"2,500 PDFs per month","billingIncrement":"P1M"}]}
</script>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>⚡</text></svg>">
<style>
@ -271,7 +271,7 @@ html, body {
<nav aria-label="Main navigation">
<div class="container">
<div class="logo">⚡ Doc<span>Fast</span></div>
<a href="/" class="logo">⚡ Doc<span>Fast</span></a>
<div class="nav-links">
<a href="#features">Features</a>
<a href="#pricing">Pricing</a>
@ -404,7 +404,7 @@ html, body {
<div class="price-amount">€9<span> /mo</span></div>
<div class="price-desc">For production apps and businesses</div>
<ul class="price-features">
<li>5,000 PDFs / month</li>
<li>2,500 PDFs per month</li>
<li>All conversion endpoints</li>
<li>All templates included</li>
<li>Priority support</li>

View file

@ -1,325 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DocFast — HTML & Markdown to PDF API</title>
<meta name="description" content="Convert HTML and Markdown to beautiful PDFs with a simple API call. Built-in invoice templates. Fast, reliable, developer-friendly.">
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>⚡</text></svg>">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #0b0d11; --bg2: #12151c; --fg: #e4e7ed; --muted: #7a8194;
--accent: #34d399; --accent-hover: #5eead4; --accent-glow: rgba(52,211,153,0.12);
--accent2: #60a5fa; --card: #151922; --border: #1e2433;
--radius: 12px; --radius-lg: 16px;
}
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--fg); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
.container { max-width: 1020px; margin: 0 auto; padding: 0 24px; }
/* Nav */
nav { padding: 20px 0; border-bottom: 1px solid var(--border); }
nav .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; color: var(--fg); display: flex; align-items: center; gap: 8px; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--fg); }
/* Hero */
.hero { padding: 100px 0 80px; text-align: center; position: relative; }
.hero::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 600px; height: 400px; background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%); pointer-events: none; }
.badge { display: inline-block; padding: 6px 16px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; color: var(--accent); background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.15); margin-bottom: 24px; letter-spacing: 0.3px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; margin-bottom: 20px; letter-spacing: -1.5px; line-height: 1.15; }
.hero h1 .gradient { background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 1.2rem; color: var(--muted); max-width: 560px; margin: 0 auto 40px; line-height: 1.7; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 10px; font-size: 0.95rem; font-weight: 600; transition: all 0.2s; border: none; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--accent); color: #0b0d11; }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(52,211,153,0.2); }
.btn-secondary { border: 1px solid var(--border); color: var(--fg); background: transparent; }
.btn-secondary:hover { border-color: var(--muted); text-decoration: none; background: rgba(255,255,255,0.03); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
/* Code block */
.code-section { margin: 56px auto 0; max-width: 660px; text-align: left; }
.code-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: #1a1f2b; border: 1px solid var(--border); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; }
.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #f87171; }
.code-dots span:nth-child(2) { background: #fbbf24; }
.code-dots span:nth-child(3) { background: #34d399; }
.code-label { font-size: 0.75rem; color: var(--muted); font-family: monospace; }
.code-block { background: var(--card); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); padding: 24px 28px; font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; font-size: 0.85rem; line-height: 1.85; overflow-x: auto; }
.code-block .c { color: #4a5568; }
.code-block .s { color: var(--accent); }
.code-block .k { color: var(--accent2); }
.code-block .f { color: #c084fc; }
/* Sections */
section { position: relative; }
.section-title { text-align: center; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -0.5px; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 48px; font-size: 1.05rem; }
/* Features */
.features { padding: 80px 0; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 768px) { .features-grid { grid-template-columns: 1fr; } }
.feature-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; transition: border-color 0.2s, transform 0.2s; }
.feature-card:hover { border-color: rgba(52,211,153,0.3); transform: translateY(-2px); }
.feature-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 16px; background: rgba(52,211,153,0.08); }
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
/* Pricing */
.pricing { padding: 80px 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 700px; margin: 0 auto; }
@media (max-width: 640px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; position: relative; }
.price-card.featured { border-color: var(--accent); }
.price-card.featured::before { content: 'POPULAR'; position: absolute; top: -10px; right: 20px; background: var(--accent); color: #0b0d11; font-size: 0.65rem; font-weight: 700; padding: 3px 10px; border-radius: 50px; letter-spacing: 0.5px; }
.price-name { font-size: 0.9rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.price-amount { font-size: 3rem; font-weight: 800; letter-spacing: -2px; margin-bottom: 4px; }
.price-amount span { font-size: 1rem; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.price-desc { color: var(--muted); font-size: 0.85rem; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.price-features { list-style: none; margin-bottom: 28px; }
.price-features li { padding: 5px 0; color: var(--muted); font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }
.price-features li::before { content: "✓"; color: var(--accent); font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
/* Trust */
.trust { padding: 60px 0 80px; }
.trust-grid { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }
.trust-item { text-align: center; flex: 1; min-width: 160px; max-width: 220px; }
.trust-num { font-size: 2rem; font-weight: 800; color: var(--accent); letter-spacing: -1px; }
.trust-label { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
/* Footer */
footer { padding: 40px 0; border-top: 1px solid var(--border); }
footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-left { color: var(--muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--fg); }
/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; max-width: 460px; width: 90%; position: relative; }
.modal h2 { margin-bottom: 8px; font-size: 1.4rem; font-weight: 700; }
.modal p { color: var(--muted); margin-bottom: 24px; font-size: 0.95rem; }
.modal .close { position: absolute; top: 16px; right: 20px; color: var(--muted); font-size: 1.4rem; cursor: pointer; background: none; border: none; transition: color 0.2s; }
.modal .close:hover { color: var(--fg); }
/* Signup states */
#signupInitial, #signupLoading, #signupResult { display: none; }
#signupInitial.active { display: block; }
#signupLoading.active { display: flex; flex-direction: column; align-items: center; padding: 40px 0; text-align: center; }
#signupResult.active { display: block; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; margin-bottom: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.key-box { background: var(--bg); border: 1px solid var(--accent); border-radius: 8px; padding: 16px; font-family: monospace; font-size: 0.82rem; word-break: break-all; margin: 16px 0 12px; position: relative; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.key-box:hover { background: #151922; }
.key-text { flex: 1; }
.copy-btn { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.2); color: var(--accent); border-radius: 6px; padding: 6px 14px; font-size: 0.8rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all 0.2s; }
.copy-btn:hover { background: rgba(52,211,153,0.2); }
.warning-box { background: rgba(251,191,36,0.06); border: 1px solid rgba(251,191,36,0.15); border-radius: 8px; padding: 12px 16px; font-size: 0.85rem; color: #fbbf24; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.warning-box .icon { font-size: 1.1rem; flex-shrink: 0; }
.signup-error { color: #f87171; font-size: 0.85rem; margin-bottom: 16px; display: none; padding: 10px 14px; background: rgba(248,113,113,0.06); border: 1px solid rgba(248,113,113,0.15); border-radius: 8px; }
/* Responsive */
@media (max-width: 640px) {
.hero { padding: 72px 0 56px; }
.nav-links { gap: 16px; }
.code-block { font-size: 0.75rem; padding: 18px 16px; }
.trust-grid { gap: 24px; }
}
</style>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
</head>
<body>
<nav>
<div class="container">
<div class="logo">⚡ Doc<span>Fast</span></div>
<div class="nav-links">
<a href="#features">Features</a>
<a href="#pricing">Pricing</a>
<a href="/docs">Docs</a>
</div>
</div>
</nav>
<section class="hero">
<div class="container">
<div class="badge">🚀 Simple PDF API for Developers</div>
<h1>HTML to <span class="gradient">PDF</span><br>in one API call</h1>
<p>Convert HTML, Markdown, or URLs to pixel-perfect PDFs. Built-in templates for invoices &amp; receipts. No headless browser headaches.</p>
<div class="hero-actions">
<button class="btn btn-primary" id="btn-signup">Get Free API Key →</button>
<a href="/docs" class="btn btn-secondary">Read the Docs</a>
</div>
<div class="code-section">
<div class="code-header">
<div class="code-dots"><span></span><span></span><span></span></div>
<span class="code-label">terminal</span>
</div>
<div class="code-block">
<span class="c"># Convert HTML to PDF — it's that simple</span>
<span class="k">curl</span> <span class="f">-X POST</span> https://docfast.dev/v1/convert/html \
-H <span class="s">"Authorization: Bearer YOUR_KEY"</span> \
-H <span class="s">"Content-Type: application/json"</span> \
-d <span class="s">'{"html": "&lt;h1&gt;Hello World&lt;/h1&gt;&lt;p&gt;Your first PDF&lt;/p&gt;"}'</span> \
-o <span class="f">output.pdf</span>
</div>
</div>
</div>
</section>
<section class="trust">
<div class="container">
<div class="trust-grid">
<div class="trust-item">
<div class="trust-num">&lt;1s</div>
<div class="trust-label">Avg. generation time</div>
</div>
<div class="trust-item">
<div class="trust-num">99.9%</div>
<div class="trust-label">Uptime SLA</div>
</div>
<div class="trust-item">
<div class="trust-num">HTTPS</div>
<div class="trust-label">Encrypted &amp; secure</div>
</div>
<div class="trust-item">
<div class="trust-num">0 bytes</div>
<div class="trust-label">Data stored on disk</div>
</div>
</div>
</div>
</section>
<section class="features" id="features">
<div class="container">
<h2 class="section-title">Everything you need</h2>
<p class="section-sub">A complete PDF generation API. No SDKs, no dependencies, no setup.</p>
<div class="features-grid">
<div class="feature-card">
<div class="feature-icon">⚡</div>
<h3>Sub-second Speed</h3>
<p>Persistent browser pool — no cold starts. Your PDFs are ready before your spinner shows.</p>
</div>
<div class="feature-card">
<div class="feature-icon">🎨</div>
<h3>Pixel-perfect Output</h3>
<p>Full CSS support including flexbox, grid, and custom fonts. Your brand, your PDFs.</p>
</div>
<div class="feature-card">
<div class="feature-icon">📄</div>
<h3>Built-in Templates</h3>
<p>Invoice and receipt templates out of the box. Pass JSON data, get beautiful PDFs.</p>
</div>
<div class="feature-card">
<div class="feature-icon">🔧</div>
<h3>Dead-simple API</h3>
<p>REST API. JSON in, PDF out. Works with curl, Python, Node, Go — anything with HTTP.</p>
</div>
<div class="feature-card">
<div class="feature-icon">📐</div>
<h3>Fully Configurable</h3>
<p>A4, Letter, custom sizes. Portrait or landscape. Headers, footers, and margins.</p>
</div>
<div class="feature-card">
<div class="feature-icon">🔒</div>
<h3>Secure by Default</h3>
<p>HTTPS only. Rate limiting. No data stored. PDFs stream directly — nothing touches disk.</p>
</div>
</div>
</div>
</section>
<section class="pricing" id="pricing">
<div class="container">
<h2 class="section-title">Simple, transparent pricing</h2>
<p class="section-sub">Start free. Upgrade when you're ready. No surprise charges.</p>
<div class="pricing-grid">
<div class="price-card">
<div class="price-name">Free</div>
<div class="price-amount">$0<span> /mo</span></div>
<div class="price-desc">Perfect for side projects and testing</div>
<ul class="price-features">
<li>100 PDFs per month</li>
<li>All conversion endpoints</li>
<li>All templates included</li>
<li>Rate limiting: 10 req/min</li>
</ul>
<button class="btn btn-secondary" style="width:100%" id="btn-signup-2">Get Free API Key</button>
</div>
<div class="price-card featured">
<div class="price-name">Pro</div>
<div class="price-amount">$9<span> /mo</span></div>
<div class="price-desc">For production apps and businesses</div>
<ul class="price-features">
<li>10,000 PDFs per month</li>
<li>All conversion endpoints</li>
<li>All templates included</li>
<li>Priority support</li>
</ul>
<button class="btn btn-primary" style="width:100%" id="btn-checkout">Get Started →</button>
</div>
</div>
</div>
</section>
<footer>
<div class="container">
<div class="footer-left">© 2026 DocFast. Fast PDF generation for developers.</div>
<div class="footer-links">
<a href="/docs">Docs</a>
<a href="/health">API Status</a>
</div>
</div>
</footer>
<!-- Signup Modal -->
<div class="modal-overlay" id="signupModal">
<div class="modal">
<button class="close" id="btn-close-signup">&times;</button>
<div id="signupInitial" class="active">
<h2>Get your free API key</h2>
<p>Enter your email to get started. No credit card required.</p>
<div class="signup-error" id="signupError"></div>
<input type="email" id="signupEmail" placeholder="your.email@example.com" style="width:100%;padding:12px;border:1px solid var(--border);background:var(--bg);color:var(--fg);border-radius:8px;font-size:0.9rem;margin-bottom:16px;" required>
<button class="btn btn-primary" style="width:100%" id="signupBtn">Generate API Key →</button>
<p style="margin-top:16px;color:var(--muted);font-size:0.8rem;text-align:center;">100 free PDFs/month • All endpoints included</p>
</div>
<div id="signupLoading">
<div class="spinner"></div>
<p style="color:var(--muted);margin:0">Generating your API key…</p>
</div>
<div id="signupResult">
<h2>🚀 You're in!</h2>
<div class="warning-box">
<span class="icon">⚠️</span>
<span>Save your API key now — we can't recover it later.</span>
</div>
<div class="key-box" id="apiKeyDisplay">
<span class="key-text" id="apiKeyText"></span>
<button class="copy-btn" id="copyBtn">Copy</button>
</div>
<p style="margin-top:20px;color:var(--muted);font-size:0.9rem;">100 free PDFs/month • <a href="/docs">Read the docs →</a></p>
</div>
</div>
</div>
<script src="/app.js"></script>
</body>
</html>

View file

@ -0,0 +1,14 @@
<footer aria-label="Footer">
<div class="container">
<div class="footer-left">© 2026 DocFast. Fast PDF generation for developers.</div>
<div class="footer-links">
<a href="/">Home</a>
<a href="/docs">Docs</a>
<a href="/health">API Status</a>
<a href="/#change-email" class="open-email-change">Change Email</a>
<a href="/impressum">Impressum</a>
<a href="/privacy">Privacy Policy</a>
<a href="/terms">Terms of Service</a>
</div>
</div>
</footer>

10
public/partials/_nav.html Normal file
View file

@ -0,0 +1,10 @@
<nav aria-label="Main navigation">
<div class="container">
<a href="/" class="logo">⚡ Doc<span>Fast</span></a>
<div class="nav-links">
<a href="/#features">Features</a>
<a href="/#pricing">Pricing</a>
<a href="/docs">Docs</a>
</div>
</div>
</nav>

View file

@ -0,0 +1,37 @@
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #0b0d11; --bg2: #12151c; --fg: #e4e7ed; --muted: #7a8194;
--accent: #34d399; --accent-hover: #5eead4; --accent-glow: rgba(52,211,153,0.12);
--card: #151922; --border: #1e2433;
--radius: 12px; --radius-lg: 16px;
}
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--fg); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
.container { max-width: 800px; margin: 0 auto; padding: 0 24px; }
nav { padding: 20px 0; border-bottom: 1px solid var(--border); }
nav .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; color: var(--fg); display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--fg); }
.content { padding: 60px 0; min-height: 60vh; }
.content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 32px; letter-spacing: -1px; }
.content h2 { font-size: 1.3rem; font-weight: 700; margin: 32px 0 16px; color: var(--fg); }
.content h3 { font-size: 1.1rem; font-weight: 600; margin: 24px 0 12px; color: var(--fg); }
.content p, .content li { color: var(--muted); margin-bottom: 12px; }
.content ul, .content ol { padding-left: 24px; }
.content strong { color: var(--fg); }
footer { padding: 32px 0; border-top: 1px solid var(--border); margin-top: 60px; }
footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-left { color: var(--muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--fg); }
@media (max-width: 768px) {
footer .container { flex-direction: column; text-align: center; }
.nav-links { gap: 16px; }
}
</style>

View file

@ -20,41 +20,29 @@ body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Robo
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
.container { max-width: 800px; margin: 0 auto; padding: 0 24px; }
/* Nav */
nav { padding: 20px 0; border-bottom: 1px solid var(--border); }
nav .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; color: var(--fg); display: flex; align-items: center; gap: 8px; }
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; color: var(--fg); display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--fg); }
/* Content */
main { padding: 60px 0 80px; }
h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -1px; }
h2 { font-size: 1.5rem; font-weight: 700; margin: 32px 0 16px; color: var(--accent); }
h3 { font-size: 1.2rem; font-weight: 600; margin: 24px 0 12px; }
p { margin-bottom: 16px; line-height: 1.7; }
ul { margin-bottom: 16px; padding-left: 24px; }
li { margin-bottom: 8px; line-height: 1.7; }
.highlight { background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.15); border-radius: 8px; padding: 16px; margin: 24px 0; color: var(--accent); font-size: 0.9rem; }
.info { background: rgba(96,165,250,0.08); border: 1px solid rgba(96,165,250,0.15); border-radius: 8px; padding: 16px; margin: 24px 0; color: #60a5fa; font-size: 0.9rem; }
/* Footer */
footer { padding: 40px 0; border-top: 1px solid var(--border); }
footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.content { padding: 60px 0; min-height: 60vh; }
.content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 32px; letter-spacing: -1px; }
.content h2 { font-size: 1.3rem; font-weight: 700; margin: 32px 0 16px; color: var(--fg); }
.content h3 { font-size: 1.1rem; font-weight: 600; margin: 24px 0 12px; color: var(--fg); }
.content p, .content li { color: var(--muted); margin-bottom: 12px; }
.content ul, .content ol { padding-left: 24px; }
.content strong { color: var(--fg); }
footer { padding: 32px 0; border-top: 1px solid var(--border); margin-top: 60px; }
footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-left { color: var(--muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--fg); }
/* Responsive */
@media (max-width: 640px) {
main { padding: 40px 0 60px; }
h1 { font-size: 2rem; }
.footer-links { gap: 16px; }
@media (max-width: 768px) {
footer .container { flex-direction: column; text-align: center; }
.nav-links { gap: 16px; }
}
</style>
</head>

50
public/src/impressum.html Normal file
View file

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Impressum — DocFast</title>
<meta name="description" content="Legal notice and company information for DocFast API service.">
<link rel="canonical" href="https://docfast.dev/impressum">
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>⚡</text></svg>">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
{{> styles_base}}
</head>
<body>
{{> nav}}
<main>
<div class="container">
<h1>Impressum</h1>
<p><em>Legal notice according to § 5 ECG and § 25 MedienG (Austrian law)</em></p>
<h2>Company Information</h2>
<p><strong>Company:</strong> Cloonar Technologies GmbH</p>
<p><strong>Address:</strong> Linzer Straße 192/1/2, 1140 Wien, Austria</p>
<p><strong>Email:</strong> <a href="mailto:legal@docfast.dev">legal@docfast.dev</a></p>
<h2>Legal Registration</h2>
<p><strong>Commercial Register:</strong> FN 631089y</p>
<p><strong>Court:</strong> Handelsgericht Wien</p>
<p><strong>VAT ID:</strong> ATU81280034</p>
<p><strong>GLN:</strong> 9110036145697</p>
<h2>Responsible for Content</h2>
<p>Cloonar Technologies GmbH<br>
Legal contact: <a href="mailto:legal@docfast.dev">legal@docfast.dev</a></p>
<h2>Disclaimer</h2>
<p>Despite careful content control, we assume no liability for the content of external links. The operators of the linked pages are solely responsible for their content.</p>
<p>The content of our website has been created with the greatest possible care. However, we cannot guarantee that the content is current, reliable or complete.</p>
<h2>EU Online Dispute Resolution</h2>
<p>Platform of the European Commission for Online Dispute Resolution (ODR): <a href="https://ec.europa.eu/consumers/odr" target="_blank" rel="noopener">https://ec.europa.eu/consumers/odr</a></p>
</div>
</main>
{{> footer}}
</body>
</html>

133
public/src/privacy.html Normal file
View file

@ -0,0 +1,133 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Privacy Policy — DocFast</title>
<meta name="description" content="Privacy policy for DocFast API service - GDPR compliant data protection information.">
<link rel="canonical" href="https://docfast.dev/privacy">
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>⚡</text></svg>">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
{{> styles_base}}
</head>
<body>
{{> nav}}
<main>
<div class="container">
<h1>Privacy Policy</h1>
<p><em>Last updated: February 16, 2026</em></p>
<div class="info">
This privacy policy is GDPR compliant and explains how we collect, use, and protect your personal data.
</div>
<h2>1. Data Controller</h2>
<p><strong>Cloonar Technologies GmbH</strong><br>
Address: Vienna, Austria<br>
Email: <a href="mailto:legal@docfast.dev">legal@docfast.dev</a><br>
Data Protection Contact: <a href="mailto:privacy@docfast.dev">privacy@docfast.dev</a></p>
<h2>2. Data We Collect</h2>
<h3>2.1 Account Information</h3>
<ul>
<li><strong>Email address</strong> - Required for account creation and API key delivery</li>
<li><strong>API key</strong> - Automatically generated unique identifier</li>
</ul>
<h3>2.2 API Usage Data</h3>
<ul>
<li><strong>Request logs</strong> - API endpoint accessed, timestamp, response status</li>
<li><strong>Usage metrics</strong> - Number of API calls, data volume processed</li>
<li><strong>IP address</strong> - For rate limiting and abuse prevention</li>
</ul>
<h3>2.3 Payment Information</h3>
<ul>
<li><strong>Stripe Customer ID</strong> - For Pro subscription billing</li>
<li><strong>Payment metadata</strong> - Subscription status, billing period</li>
</ul>
<div class="highlight">
<strong>No PDF content stored:</strong> We process your HTML/Markdown input to generate PDFs, but do not store the content or resulting PDFs on our servers.
</div>
<h2>3. Legal Basis for Processing</h2>
<ul>
<li><strong>Contract fulfillment</strong> (Art. 6(1)(b) GDPR) - Account creation, API service provision</li>
<li><strong>Legitimate interest</strong> (Art. 6(1)(f) GDPR) - Service monitoring, abuse prevention, performance optimization</li>
<li><strong>Legal obligation</strong> (Art. 6(1)(c) GDPR) - Tax records, payment processing compliance</li>
</ul>
<h2>4. Data Retention</h2>
<ul>
<li><strong>Account data:</strong> Retained while account is active + 30 days after deletion request</li>
<li><strong>API usage logs:</strong> 90 days for operational monitoring</li>
<li><strong>Payment records:</strong> 7 years for tax compliance (Austrian law)</li>
<li><strong>PDF processing data:</strong> Not stored (processed in memory only)</li>
</ul>
<h2>5. Third-Party Processors</h2>
<h3>5.1 Stripe (Payment Processing)</h3>
<p><strong>Purpose:</strong> Payment processing for Pro subscriptions<br>
<strong>Data:</strong> Email, payment information<br>
<strong>Location:</strong> EU (GDPR compliant)<br>
<strong>Privacy Policy:</strong> <a href="https://stripe.com/privacy" target="_blank" rel="noopener">https://stripe.com/privacy</a></p>
<h3>5.2 Hetzner (Hosting)</h3>
<p><strong>Purpose:</strong> Server hosting and infrastructure<br>
<strong>Data:</strong> All data processed by DocFast<br>
<strong>Location:</strong> Germany (Nuremberg)<br>
<strong>Privacy Policy:</strong> <a href="https://www.hetzner.com/legal/privacy-policy" target="_blank" rel="noopener">https://www.hetzner.com/legal/privacy-policy</a></p>
<div class="highlight">
<strong>EU Data Residency:</strong> All your data is processed and stored exclusively within the European Union.
</div>
<h2>6. Your Rights Under GDPR</h2>
<ul>
<li><strong>Right of access</strong> - Request information about your personal data</li>
<li><strong>Right to rectification</strong> - Correct inaccurate data (e.g., email changes)</li>
<li><strong>Right to erasure</strong> - Delete your account and associated data</li>
<li><strong>Right to data portability</strong> - Receive your data in machine-readable format</li>
<li><strong>Right to object</strong> - Object to processing based on legitimate interest</li>
<li><strong>Right to lodge a complaint</strong> - Contact your data protection authority</li>
</ul>
<p><strong>To exercise your rights:</strong> Email <a href="mailto:privacy@docfast.dev">privacy@docfast.dev</a></p>
<h2>7. Cookies and Tracking</h2>
<p>DocFast uses minimal technical cookies:</p>
<ul>
<li><strong>Session cookies</strong> - For login state (if applicable)</li>
<li><strong>No tracking cookies</strong> - We do not use analytics, advertising, or third-party tracking</li>
</ul>
<h2>8. Data Security</h2>
<ul>
<li><strong>Encryption:</strong> All data transmission via HTTPS/TLS</li>
<li><strong>Access control:</strong> Limited employee access with logging</li>
<li><strong>Infrastructure:</strong> EU-based servers with enterprise security</li>
<li><strong>API keys:</strong> Securely hashed and stored</li>
</ul>
<h2>9. International Transfers</h2>
<p>Your personal data does not leave the European Union. Our infrastructure is hosted exclusively by Hetzner in Germany.</p>
<h2>10. Contact for Data Protection</h2>
<p>For questions about data processing or to exercise your rights:</p>
<p><strong>Email:</strong> <a href="mailto:privacy@docfast.dev">privacy@docfast.dev</a><br>
<strong>Subject:</strong> Include "GDPR" in the subject line for priority handling</p>
<h2>11. Changes to This Policy</h2>
<p>We will notify users of material changes via email. Continued use of the service constitutes acceptance of updated terms.</p>
</div>
</main>
{{> footer}}
</body>
</html>

205
public/src/terms.html Normal file
View file

@ -0,0 +1,205 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Terms of Service — DocFast</title>
<meta name="description" content="Terms of service for DocFast API - legal terms and conditions for using our PDF generation service.">
<link rel="canonical" href="https://docfast.dev/terms">
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>⚡</text></svg>">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
{{> styles_base}}
</head>
<body>
{{> nav}}
<main>
<div class="container">
<h1>Terms of Service</h1>
<p><em>Last updated: February 16, 2026</em></p>
<div class="info">
By using DocFast, you agree to these terms. Please read them carefully.
</div>
<h2>1. Service Description</h2>
<p>DocFast provides an API service for converting HTML, Markdown, and URLs to PDF documents. The service includes:</p>
<ul>
<li>HTML to PDF conversion</li>
<li>Markdown to PDF conversion</li>
<li>URL to PDF conversion</li>
<li>Pre-built invoice and receipt templates</li>
<li>Custom CSS styling support</li>
</ul>
<h2>2. Service Plans</h2>
<h3>2.1 Free Tier</h3>
<ul>
<li><strong>Monthly limit:</strong> 100 PDF conversions</li>
<li><strong>Rate limit:</strong> 10 requests per minute</li>
<li><strong>Fair use policy:</strong> Personal and small business use</li>
<li><strong>Support:</strong> Community documentation</li>
</ul>
<h3>2.2 Pro Tier</h3>
<ul>
<li><strong>Price:</strong> €9 per month</li>
<li><strong>Monthly limit:</strong> 10,000 PDF conversions</li>
<li><strong>Rate limit:</strong> Higher limits based on fair use</li>
<li><strong>Support:</strong> Priority email support</li>
<li><strong>Billing:</strong> Monthly subscription via Stripe</li>
</ul>
<div class="highlight">
<strong>Overage:</strong> If you exceed your plan limits, API requests will return rate limiting errors. No automatic charges apply.
</div>
<h2>3. Acceptable Use</h2>
<h3>3.1 Permitted Uses</h3>
<ul>
<li>Business documents (invoices, reports, receipts)</li>
<li>Personal document generation</li>
<li>Integration into web applications</li>
<li>Educational and non-commercial projects</li>
</ul>
<h3>3.2 Prohibited Uses</h3>
<ul>
<li><strong>Illegal content:</strong> No processing of copyrighted material without permission</li>
<li><strong>Abuse:</strong> No attempts to overload or disrupt the service</li>
<li><strong>Harmful content:</strong> No generation of malicious, threatening, or harmful documents</li>
<li><strong>Reselling:</strong> No white-labeling or reselling of the raw API service</li>
<li><strong>Reverse engineering:</strong> No attempts to extract proprietary algorithms</li>
</ul>
<div class="warning">
<strong>Violation consequences:</strong> Account termination, permanent ban, and legal action if necessary.
</div>
<h2>4. API Key Security</h2>
<ul>
<li><strong>Responsibility:</strong> You are responsible for keeping your API key secure</li>
<li><strong>Unauthorized use:</strong> You are liable for all usage under your API key</li>
<li><strong>Recovery:</strong> Lost keys can be recovered via email verification</li>
<li><strong>Sharing:</strong> Do not share API keys publicly or in client-side code</li>
</ul>
<h2>5. Service Availability</h2>
<h3>5.1 Uptime</h3>
<ul>
<li><strong>Target:</strong> 99.5% uptime (best effort, no SLA for free tier)</li>
<li><strong>Maintenance:</strong> Scheduled maintenance with advance notice</li>
<li><strong>Status page:</strong> <a href="/health">https://docfast.dev/health</a></li>
</ul>
<h3>5.2 Performance</h3>
<ul>
<li><strong>Processing time:</strong> Typically under 1 second per PDF</li>
<li><strong>Rate limiting:</strong> Applied fairly to ensure service stability</li>
<li><strong>File size limits:</strong> Input HTML/Markdown up to 2MB</li>
</ul>
<h2>6. Data Processing</h2>
<ul>
<li><strong>No storage:</strong> PDF content is processed in memory only</li>
<li><strong>Logs:</strong> API usage logs retained for 90 days</li>
<li><strong>Privacy:</strong> See our <a href="/privacy">Privacy Policy</a> for details</li>
<li><strong>EU hosting:</strong> All data processed in Germany (Hetzner)</li>
</ul>
<h2>7. Payment Terms</h2>
<h3>7.1 Pro Subscription</h3>
<ul>
<li><strong>Billing cycle:</strong> Monthly, billed in advance</li>
<li><strong>Payment method:</strong> Credit card via Stripe</li>
<li><strong>Currency:</strong> EUR (Euro)</li>
<li><strong>Auto-renewal:</strong> Subscription renews automatically</li>
</ul>
<h3>7.2 Cancellation</h3>
<ul>
<li><strong>Anytime:</strong> Cancel your subscription at any time</li>
<li><strong>Access:</strong> Service continues until end of billing period</li>
<li><strong>Refunds:</strong> No partial refunds for unused portions</li>
</ul>
<div class="info">
<strong>EU Consumer Rights:</strong> 14-day right of withdrawal applies to digital services not yet delivered. Once you start using the Pro service, withdrawal right expires.
</div>
<h2>8. Limitation of Liability</h2>
<ul>
<li><strong>Service provision:</strong> Best effort basis, no guarantees</li>
<li><strong>Damages:</strong> Our liability is limited to the amount paid for the service</li>
<li><strong>Indirect damages:</strong> We are not liable for lost profits, business interruption, or data loss</li>
<li><strong>Force majeure:</strong> Not liable for events beyond our reasonable control</li>
</ul>
<h2>9. Account Termination</h2>
<h3>9.1 By You</h3>
<ul>
<li>Delete your account by emailing <a href="mailto:legal@docfast.dev">legal@docfast.dev</a></li>
<li>Cancel Pro subscription through your account or email</li>
</ul>
<h3>9.2 By Us</h3>
<p>We may terminate accounts for:</p>
<ul>
<li>Violation of these terms</li>
<li>Non-payment (Pro accounts)</li>
<li>Extended inactivity (12+ months)</li>
<li>Technical abuse or security concerns</li>
</ul>
<div class="warning">
<strong>Termination notice:</strong> We will provide reasonable notice except for immediate security threats.
</div>
<h2>10. Intellectual Property</h2>
<ul>
<li><strong>Service ownership:</strong> DocFast and its technology remain our property</li>
<li><strong>Your content:</strong> You retain rights to content you process through our API</li>
<li><strong>Generated PDFs:</strong> You own the PDFs generated from your content</li>
<li><strong>Feedback:</strong> Any feedback provided may be used to improve the service</li>
</ul>
<h2>11. Governing Law</h2>
<ul>
<li><strong>Jurisdiction:</strong> These terms are governed by Austrian law</li>
<li><strong>Courts:</strong> Disputes resolved in Vienna, Austria</li>
<li><strong>Language:</strong> German version prevails in case of translation conflicts</li>
<li><strong>EU regulations:</strong> GDPR and other EU laws apply</li>
</ul>
<h2>12. Changes to Terms</h2>
<p>We may update these terms by:</p>
<ul>
<li><strong>Email notification:</strong> For material changes affecting your rights</li>
<li><strong>Website posting:</strong> Updated version posted with revision date</li>
<li><strong>Continued use:</strong> Using the service after changes constitutes acceptance</li>
</ul>
<h2>13. Contact Information</h2>
<p>Questions about these terms:</p>
<ul>
<li><strong>Email:</strong> <a href="mailto:legal@docfast.dev">legal@docfast.dev</a></li>
<li><strong>Company:</strong> Cloonar Technologies GmbH, Vienna, Austria</li>
<li><strong>Legal notice:</strong> See <a href="/impressum">Impressum</a> for full company details</li>
</ul>
<div class="highlight">
<strong>Effective Date:</strong> These terms are effective immediately upon posting. By using DocFast, you acknowledge reading and agreeing to these terms.
</div>
</div>
</main>
{{> footer}}
</body>
</html>

View file

@ -20,42 +20,29 @@ body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Robo
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
.container { max-width: 800px; margin: 0 auto; padding: 0 24px; }
/* Nav */
nav { padding: 20px 0; border-bottom: 1px solid var(--border); }
nav .container { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; color: var(--fg); display: flex; align-items: center; gap: 8px; }
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; color: var(--fg); display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--fg); }
/* Content */
main { padding: 60px 0 80px; }
h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -1px; }
h2 { font-size: 1.5rem; font-weight: 700; margin: 32px 0 16px; color: var(--accent); }
h3 { font-size: 1.2rem; font-weight: 600; margin: 24px 0 12px; }
p { margin-bottom: 16px; line-height: 1.7; }
ul { margin-bottom: 16px; padding-left: 24px; }
li { margin-bottom: 8px; line-height: 1.7; }
.highlight { background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.15); border-radius: 8px; padding: 16px; margin: 24px 0; color: var(--accent); font-size: 0.9rem; }
.info { background: rgba(96,165,250,0.08); border: 1px solid rgba(96,165,250,0.15); border-radius: 8px; padding: 16px; margin: 24px 0; color: #60a5fa; font-size: 0.9rem; }
.warning { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.15); border-radius: 8px; padding: 16px; margin: 24px 0; color: #fbbf24; font-size: 0.9rem; }
/* Footer */
footer { padding: 40px 0; border-top: 1px solid var(--border); }
footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.content { padding: 60px 0; min-height: 60vh; }
.content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 32px; letter-spacing: -1px; }
.content h2 { font-size: 1.3rem; font-weight: 700; margin: 32px 0 16px; color: var(--fg); }
.content h3 { font-size: 1.1rem; font-weight: 600; margin: 24px 0 12px; color: var(--fg); }
.content p, .content li { color: var(--muted); margin-bottom: 12px; }
.content ul, .content ol { padding-left: 24px; }
.content strong { color: var(--fg); }
footer { padding: 32px 0; border-top: 1px solid var(--border); margin-top: 60px; }
footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-left { color: var(--muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 0.85rem; }
.footer-links a:hover { color: var(--fg); }
/* Responsive */
@media (max-width: 640px) {
main { padding: 40px 0 60px; }
h1 { font-size: 2rem; }
.footer-links { gap: 16px; }
@media (max-width: 768px) {
footer .container { flex-direction: column; text-align: center; }
.nav-links { gap: 16px; }
}
</style>
</head>

48
scripts/build-html.cjs Normal file
View file

@ -0,0 +1,48 @@
#!/usr/bin/env node
/**
* DocFast HTML Build Script
* Replaces {{> partial_name}} in source files with partial contents.
* Source: public/src/*.html Output: public/*.html
* Partials: public/partials/_*.html
*/
const fs = require('fs');
const path = require('path');
const srcDir = path.join(__dirname, '..', 'public', 'src');
const outDir = path.join(__dirname, '..', 'public');
const partialsDir = path.join(__dirname, '..', 'public', 'partials');
// Load all partials
const partials = {};
if (fs.existsSync(partialsDir)) {
for (const f of fs.readdirSync(partialsDir)) {
if (f.startsWith('_') && f.endsWith('.html')) {
const name = f.replace(/^_/, '').replace(/\.html$/, '');
partials[name] = fs.readFileSync(path.join(partialsDir, f), 'utf-8').trimEnd();
}
}
}
console.log(`Loaded partials: ${Object.keys(partials).join(', ')}`);
if (!fs.existsSync(srcDir)) {
console.error(`Source directory not found: ${srcDir}`);
process.exit(1);
}
// Process each source file
const files = fs.readdirSync(srcDir).filter(f => f.endsWith('.html'));
for (const file of files) {
let content = fs.readFileSync(path.join(srcDir, file), 'utf-8');
// Replace {{> partial_name}} with partial content
content = content.replace(/\{\{>\s*(\w+)\s*\}\}/g, (match, name) => {
if (partials[name]) return partials[name];
console.warn(` Warning: partial '${name}' not found in ${file}`);
return match;
});
const outPath = path.join(outDir, file);
fs.writeFileSync(outPath, content);
console.log(` Built: ${file}`);
}
console.log('Done.');