# Starter Dough — Comprehensive Application Specification & Architecture ## Overview Starter Dough is an enterprise-grade financial management tool crafted by LoafPickle Worldwide. Available at https://billing.loafpickle.com, it bridges lightweight client-side privacy with powerful PDF generation, ledger auditing, tax estimation, and optional encrypted cloud backup. ## Core Features & Functionality Breakdown ### 1. Invoices & Purchase Orders - 100% Free Unlimited Creation: Users can build as many PDF Invoices and Purchase Orders as needed with zero limits or paywalls. - Dynamic Form Inputs: Billed From / Billed To company info, issue date, due date, invoice number, line items with description, quantity, unit price, tax rates, and notes. - Instant Client-Side PDF Generation: Uses html2pdf / jspdf to render vector PDF documents directly in the browser DOM. No document data is ever sent to an unencrypted backend server. ### 2. Expense & Revenue Ledger - Track operational income and expenses categorized by client, vendor, project, or cost center. - Summary analytics providing gross revenue, total expenses, net income, and tax reserve suggestions. - Local storage persistence with JSON export/import capability. ### 3. Tax Estimate Calculator - Real-time calculations for self-employed individuals and 1099 freelancers. - Factor in standard deductions, self-employment tax rates (15.3%), and state/federal brackets to forecast quarterly payments. ### 4. Privacy & WebAuthn Passkey Security - Local-First Architecture: Primary data resides in browser IndexedDB/LocalStorage. - WebAuthn Passkey Encryption: Optional hardware/biometric authentication (TouchID, FaceID, Windows Hello, YubiKey) encrypts local client states. ### 5. Starter Dough Pro Upgrade - Pricing: $29 one-time payment with promo code support (e.g. STARTER100 for 100% off). - Payment Gateways: Integrated Stripe Checkout (`/api/create-checkout-session` & `/api/verify-checkout-session`) and direct Web3 Crypto payment options (Solana, Ethereum, Base, Polygon). - Exclusive Pro Features: - Multi-device Cloud Sync backed by Supabase. - Custom branding presets (logos, accent colors, typography). - Stripe live payment links directly on exported invoices. - Crypto payment QR codes embedded in client invoices. - Advanced CSV / JSON ledger exporting for accounting software (QuickBooks, Xero). ## Technical Stack - Frontend: React, Vite, Lucide Icons, html2canvas, jspdf. - Hosting & Edge APIs: Vercel Serverless Functions (`/api/*`). - Security & Database: Supabase Auth & PostgreSQL, WebAuthn API, Stripe Node SDK. ## URL Structure - Main App: https://billing.loafpickle.com - OpenAPI / Verification Endpoint: https://billing.loafpickle.com/api/verify-checkout-session - LLM Overview: https://billing.loafpickle.com/llms.txt - Sitemap: https://billing.loafpickle.com/sitemap.xml - Robots: https://billing.loafpickle.com/robots.txt