Inspiration

Small finance teams spend too much time chasing supplier invoices, re-keying the same information, matching bank transactions, and reconstructing why an accounting decision was made. Existing tools often split that work across inboxes, spreadsheets, document folders, and accounting platforms.

We built Smart Finance around a simple idea: AI should remove repetitive work without turning finance into a black box. Every automated result should retain its source evidence, expose uncertainty, and leave consequential decisions with a person.

What it does

Smart Finance is an end-to-end finance operations workspace for Australian businesses and their accounting advisors.

  • Capture supplier invoices from PDF, image, HEIC, upload, or email.
  • Normalize document pages and extract supplier details, ABNs, dates, line items, tax, currency, and totals through a structured multimodal vision contract.
  • Independently validate extracted data and route uncertain or inconsistent documents to human review.
  • Import bank-statement CSVs and propose exact, split, and subset matches that remain reviewable, reversible, and tied to their source rows.
  • Create quotes and Sales Invoices, generate PDFs, record payments, send reminders, and manage recurring schedules.
  • Give accounting firms role-controlled access across client Companies without crossing tenant boundaries.
  • Keep documents private, background work retry-safe, and operational history auditable.

The result is one connected workflow: a supplier invoice can be captured, reviewed, approved, and matched to a bank transaction; a customer invoice can be issued, delivered, paid, and reconciled without losing its history.

How we built it

The product uses React, TypeScript, TanStack Start, and TanStack Query for the web application. Feature-oriented APIs are implemented with Hono, Zod, and OpenAPI. Better Auth provides Magic Link registration, password sign-in, sessions, Organizations, memberships, and role boundaries.

The runtime is Cloudflare-native:

  • Workers host the application and APIs.
  • D1 and Drizzle store relational business and audit data.
  • R2 stores private originals, normalized pages, PDFs, and exports.
  • Queues run document, reconciliation, delivery, and integration jobs.
  • Cron Triggers evaluate reminders, recurring documents, and operational schedules.
  • Cloudflare Sandbox containers normalize PDFs and HEIC files into bounded image pages.

The document-intelligence layer sends multiple normalized page images through an OpenAI-compatible Chat Completions contract with strict JSON Schema output. It allows one structured repair attempt, then applies deterministic accounting validation before an invoice can become ready for approval.

How Codex and GPT-5.6 Sol shaped the project

Smart Finance was generated through a continuous 12+ hour Codex goal using GPT-5.6 Sol. Codex was our execution partner across the complete product rather than a one-shot code generator.

We used it to inventory the legacy AWS system, map every user workflow and integration boundary, design the Cloudflare-native replacement, migrate the relational model, implement the web application and APIs, and validate live staging and production behavior. Codex also helped us iterate on the decisions that mattered most: tenant isolation, idempotent background jobs, structured multimodal extraction, deterministic validation, human-review fallbacks, authentication recovery, and responsive behavior down to mobile widths.

The primary Codex /feedback session records that long-running build. The repository README identifies the key architectural and product decisions made during the goal.

Challenges we ran into

Making AI output safe for accounting

A response can be valid JSON and still contain an impossible date, invalid ABN, negative total, or numbers that do not reconcile. We separated model parsing from deterministic business validation and created explicit manual-review states instead of guessing.

Reliable work on an edge-native runtime

Document conversion and reconciliation are multi-step background processes. We needed leases, attempt history, idempotency keys, safe retry categories, bounded timeouts, and guaranteed cleanup of temporary Sandbox containers. Replaying a message must never duplicate a payment or lose the original evidence.

Real tenancy instead of a demo shell

Early versions exposed fixture organization identity and confusing authenticated states. We replaced that with real sessions, memberships, active-Organization selection, mandatory first-Company onboarding, signed-out redirects, and server-enforced Company scoping.

Preserving a calm product experience

The platform contains dense operational workflows, but users still need a clear next action. We repeatedly tested desktop and mobile journeys, repaired hydration races, removed incomplete controls, and made loading, empty, error, retry, and recovery states explicit.

Accomplishments that we're proud of

Smart Finance is a production-deployed application rather than a static prototype. It includes invoice capture and review, bank reconciliation, customers and receivables, advisor collaboration, billing, support, notifications, integrations, and operational diagnostics.

Its release gates cover strict TypeScript, zero-warning lint, unit tests, D1/R2 integration journeys, desktop and mobile browser journeys, production builds, configuration checks, and live deployment verification. We are especially proud that automation never erases accountability: source documents remain available, failures are visible, and financial actions remain human-approved and reversible.

What we learned

Structured output is only the beginning of a trustworthy AI workflow. Reliability comes from combining model capability with deterministic rules, explicit state transitions, tenant-safe authorization, idempotency, observability, and well-designed recovery paths.

We also learned that the most useful AI product does not always look like a chatbot. In Smart Finance, AI works quietly inside an operating workflow—reducing repetitive work while making decisions easier to inspect.

What's next for Smart Finance

Next we will deepen document-learning feedback, expand live Xero and Google Drive synchronization, improve advisor portfolio automation, and continue refining the path from extracted evidence to approved accounting action without weakening human control.

Built With

  • better-auth
  • cloudflare-d1
  • cloudflare-queues
  • cloudflare-r2
  • cloudflare-sandbox
  • cloudflare-workers
  • drizzle-orm
  • google-drive
  • hono
  • openai-api
  • openapi
  • react
  • stripe
  • tanstack-query
  • tanstack-start
  • typescript
  • xero
  • zod
Share this project:

Updates