Back to Projects
Quoteflare

Quotes and invoices for a one-person business.

Self-hosted on Cloudflare's free tier.

  • Cloudflare Workers
  • D1
  • TanStack Start
The Quoteflare admin dashboard

Quoteflare

Quotes and invoices for a one-person business, running on Cloudflare's free tier.

Cloudflare WorkersD1TanStack StartReact

Quoteflare is a self-hosted invoicing app for a single owner. Visitors build a quote with a public pricing calculator. You turn the quote into an invoice, email it to the client, and let the app chase late payments.

It runs as one Cloudflare Worker with a D1 database and an R2 bucket, so a small business can host it without paying for servers. It does not take payments. Invoices carry a status that you set yourself.

What it does

Pricing calculator

A visitor picks services, options and quantities. The server recomputes the total from current prices, so the client cannot change it.

Quotes to invoices

A submitted quote becomes an invoice numbered like INV-2026-0001. Advance payments are supported.

Email

Invoices go out through Resend with a link to a public page. A webhook records delivery, bounces and complaints.

Reminders

A daily job marks unpaid invoices overdue and can email clients before and after the due date.

Recurring invoices

Schedules create, and optionally send, invoices weekly, monthly, quarterly or yearly.

Admin dashboard

Clients, services, packages, quotes, invoices and settings, behind Cloudflare Access.

Behind the calculator sits a service catalogue with categories, fixed or custom pricing, weekly to yearly billing, option groups, required services and packages. You can import a whole catalogue from JSON.

Tech stack

  • TanStack Start — React 19 framework and routing.
  • Cloudflare Workers — Runs the app and the daily cron.
  • Cloudflare D1 — Database, queried with Drizzle ORM.
  • Cloudflare R2 — Stores the logo.
  • Hono — Serves /api.
  • Resend — Sends email and reports delivery.
  • React Email — Renders email templates.
  • Cloudflare Access — One-time PIN login for /admin.
  • Tailwind CSS 4 and shadcn/ui — Styling and components.
  • Vitest — Runs the tests.

Design notes

  • The browser sends only the choices a visitor made. The server reads current prices from D1 and computes the total, and Turnstile checks the submit.
  • Money is stored in cents and percentages in basis points, so every amount is an integer.
  • One daily cron run does three jobs in order. It marks overdue invoices, sends reminders, then creates recurring invoices.

Limits

  • It has one owner. Access allows a single email.
  • It takes no payments. You set each invoice's status yourself.
  • Reminders stay off until you turn them on in settings.
  • Sending email needs a domain verified in Resend.
  • The Cloudflare free plan allows 100,000 Worker requests, 5 million D1 rows read and 100,000 D1 rows written per day.
  • A daily run handles at most 5 recurring schedules to stay within the free plan's subrequest limit. The rest wait for the next day.

Deploy it

The Deploy to Cloudflare button above copies the repository to your GitHub account, creates the D1 database and R2 bucket, and deploys the Worker to workers.dev. It asks for the secrets listed in .dev.vars.example. Then:

  1. Run bunx wrangler d1 migrations apply DB --remote from a clone of your copy.
  2. Set ACCESS_TEAM_DOMAIN, TURNSTILE_SITE_KEY, EMAIL_FROM, APP_ORIGIN and ALLOWED_ORIGINS in wrangler.toml and push.
  3. Create a Cloudflare Access application for /admin/* with one allow policy for your email, then set ACCESS_AUD to its audience tag.

Until the third step is done, /admin rejects every request. The GitHub guide covers deploying by hand, the email webhook and backups.

Run it locally

You need Node.js 22.12 or newer and Bun.

git clone https://github.com/NandiyaLive/quoteflare.git
cd quoteflare
bun install
cp .dev.vars.example .dev.vars
bun run db:migrate:local
bun run db:seed
bun run dev

The app runs at http://localhost:3000. Use bun run dev, not bun --bun run dev, which breaks the Cloudflare plugin. The example env file uses Cloudflare's always-pass Turnstile test keys, so add a RESEND_API_KEY to send real email.

Source

Quoteflare is an open source project released under the MIT License. It is an independent project and is not affiliated with, endorsed by or sponsored by Cloudflare. The code, the deploy steps and a full guide are on GitHub. Issues and pull requests are welcome.