{
  "id": 22481623,
  "title": "How We Built a Multi-Tenant Invoicing & Inventory SaaS on Next.js 15, Cloudflare Workers & D1",
  "url": "https://urgent.news/2026/11/29/how-we-built-a-multi-tenant-invoicing-inventory-saas-on-next-js-15",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-29T00:42:22.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/growi_seo_68c2036cdc15b54/how-we-built-a-multi-tenant-invoicing-inventory-saas-on-nextjs-15-cloudflare-workers-d1-512a"
  },
  "original_language": null,
  "account": "When Aura Core Digital began developing AuraInvoice, their goal was to create a rapid, globally accessible invoicing and inventory management SaaS solution that runs at the edge with minimal startup times and no credit card storage. The team settled on the following stack and architecture for their product:\n\n1. Edge Runtime: Next.js 15 and OpenNext were deployed on Cloudflare Workers. By leveraging the @opennextjs/cloudflare library, the team was able to execute App Router pages, API routes, and server-side A4 PDF generation on Cloudflare Workers. This resulted in worker startup times of under 20 milliseconds worldwide.\n\n2. Multi-Tenant Persistence: The invoices, quotes, clients, inventory SKUs, stock movement audit trail, purchase orders, expenses, and time entries for each user were stored in Cloudflare D1 SQL. All data was isolated within the database by the authenticated account ID of each user.\n\n3. Practical Security and Zero Card Storage: Passwords were hashed using 100,000 iteration PBKDF2-SHA256 with the Web Crypto API. HttpOnly session cookies and optional 6-digit email two-factor authentication were employed to secure user accounts. Subscription billing was handled exclusively through Safepay's PCI-DSS compliant hosted checkout, ensuring that card numbers never reached the team's servers.\n\n4. Real Server-Side PDFs for iOS Compatibility: During mobile testing, the team encountered an issue with iOS Gmail and WhatsApp in-app browsers blocking client-side blob downloads and window.print(). To overcome this challenge, they served vector A4 PDFs directly from an HTTPS route ( /api/public/invoice/[id]/pdf ) with the appropriate Content-Type header set to application/pdf. This approach enabled seamless mobile downloads across iPhone, Android, and desktop devices. Additionally, the team published free no-signup tools along with the app, such as a UAE 5% VAT Calculator and a Profit Margin & Markup Calculator. AuraInvoice was launched publicly in just 48 hours at https://aurainvoice.com, offering a Free Forever Starter tier. The team expressed willingness to answer any questions about deploying Next.js 15 and Cloudflare D1 on Cloudflare.",
  "summary": "When we started building AuraInvoice at Aura Core Digital , we wanted a fast, global invoicing and auto-stock inventory SaaS that runs at the edge with near-zero cold starts and zero credit card storage. Here is the exact stack and architecture we shipped: 1. Edge Runtime: Next.js 15 + OpenNext on Cloudflare Workers Using @opennextjs/cloudflare , our App Router pages, API routes, and server-side…",
  "summary_source": "publisher",
  "key_points": [
    "AuraCore Digital built AuraInvoice using Next.js 15, Cloudflare Workers, and Cloudflare D1.",
    "Multi-tenant data isolated by user account ID in Cloudflare D1 SQL database.",
    "Free Forever Starter tier launched in 48 hours at https://aurainvoice.com."
  ],
  "editors_take": "Using edge computing and isolated databases allows this new software to provide fast global access and secure data separation for users managing their business finances.",
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}