Docmaker
ActiveDocuments, done smoothly.
AI platform · Document utilities · My role: Core Engineer · Billing, AI Router & Templates
What it is
Docmaker (docmaker.io) is an all-in-one document platform where users can generate documents from prompts with AI, convert across file formats, merge/split/compress PDFs, run OCR, translate, and e-sign documents in one place.
Why it exists
Routine document work normally fragments across half a dozen paid tools with paywalls, watermarks, and daily file limits. Docmaker unifies core PDF and document utilities for free while layering credit-backed AI drafting and structured templates on top.
What I did
- Integrated end-to-end Paddle SDK billing: checkout API routes, billing portal/status endpoints, interactive sandbox/live setup script, and webhook signature verification with raw JSON fallback
- Built the Muse and DeepSeek AI document router with tier-aware input/output token caps, rolling rate limits, and quota deduction/refund accounting
- Shipped 20 SEO document template builders and polish/render APIs spanning contracts, proposals, finance notices, and HR operations
- Built pricing, billing dashboard, enterprise, help, terms, privacy, and refund-policy compliance pages wired to live support
Technical decisions that mattered
Prefix-cached static system prompt with tier token caps
Keeping the drafting system prompt strictly constant at messages[0] with zero dynamic timestamps or user IDs enables Muse and DeepSeek prefix caches to hit on repeat runs, while tier-bounded token truncation prevents hitting upstream price cliffs.
Signature-first Paddle webhook validation
Webhook handlers verify the Paddle signature against the raw request body before unmarshaling or mutating subscription state, preventing spoofed billing events while supporting a clean fallback parser.
Atomic quota deduction with automatic refund on failure
AI generation routes resolve the effective tier (free, credit pack, pro, or business) and deduct quotas up front, automatically refunding credits if an upstream model request fails.
What I learned
Shipping monetization and AI routing together means thinking defensively about every boundary — webhook authenticity, quota race conditions, and token budgets are product features, not afterthoughts.
Status
Active — live at docmaker.io