Invoicing and expenses, made beautifully simple.

  • Project Folio
  • Year 2026
  • Role Full-Stack Developer
  • Stack Next.js, Prisma, Auth.js, Claude
Folio — Invoicing & Expense SaaS

Freelancers and small businesses spend hours every month on invoicing and expense paperwork. Existing tools are either bloated enterprise software or barely-functional spreadsheets — nothing in between feels modern, fast, or simple to use.

Folio is a multi-tenant SaaS that handles the boring parts: send professional invoices in seconds, snap a photo of any receipt and let AI fill in the details, and keep multiple businesses cleanly isolated in separate workspaces.

Build a true multi-tenant SaaS where every user can own multiple workspaces, with strict data isolation between them. Each invoice, client, and expense must belong to exactly one workspace, and switching workspaces must feel instant.

On top of that, integrate Claude AI to parse arbitrary receipt photos — extracting vendor, amount, date, and category accurately enough that the user only has to confirm, not retype.

How it works.

Send invoices in seconds

Pick a client, add line items, and Folio handles auto-numbering, tax calculations, and PDF generation. Status tracks from draft to sent to paid — no manual bookkeeping.

AI receipt scanning

Snap a photo of any receipt. Claude extracts vendor name, amount, date, and category in seconds. The user just confirms and saves — no typing required.

Multi-workspace

Run multiple businesses or accounts side-by-side with separate workspaces. Each workspace has its own clients, invoices, expenses, and team members. Switching is instant.

Real-time dashboard

A single overview shows paid lifetime, outstanding balance, active clients, and monthly spend. Recent invoices and expenses surface at the top so nothing slips through.

Under the hood.

FrameworkNext.js 16 (App Router, Server Actions)
DatabasePostgres + Prisma ORM
AuthAuth.js (NextAuth) with email + OAuth
AIClaude API (vision) for receipt parsing
UITailwind CSS + custom components
PDFServer-side rendering with React PDF
HostingVercel + Neon Postgres
Next.js App Router | Server Actions (no separate API) | Prisma ORM → Postgres (Neon) | ├── Workspace-scoped queries ├── Auth.js sessions └── Claude API → Receipt parsing

Features.

Multi-Tenant Workspaces AI Receipt Scanning Auto Invoice Numbering Tax Calculations PDF Export Client Management Expense Tracking Dashboard Analytics Email + OAuth Auth Status Tracking

What I built.

Multi-tenant data layer

Every Prisma query is automatically scoped to the current workspace through a session-aware middleware. No accidental cross-tenant reads, no hand-written WHERE clauses, no leaks.

Claude vision pipeline

Receipt images are uploaded, sent to Claude with a structured prompt, and parsed into typed JSON. The user gets a pre-filled form with vendor, amount, date, and category — confirm and save in two clicks.

Server-rendered invoices

Invoices render on the server using React PDF, producing pixel-perfect downloads with no client-side library bloat. Users get a polished PDF the moment they click "Download."

Auth + workspace switcher

Auth.js sessions extended with workspace context. The top-right pill ("Mohammed Shafi's workspace") shows the active tenant and switches the entire app's data without a page reload.

Challenges.

Strict tenant isolation

Multi-tenancy is easy to get wrong. I used a Prisma extension that injects workspaceId on every read and write — even a buggy route handler can't leak data because the ORM enforces the boundary.

Reliable AI extraction

Claude is great at OCR but inconsistent on edge cases — handwritten totals, bilingual receipts, faded ink. I added a confidence-aware prompt and always show extracted fields as editable, never auto-saved.

PDF generation cost

Headless Chromium PDFs were too slow and expensive on serverless. Switched to React PDF for a fully streamed, server-rendered approach — sub-second exports, zero cold-start cost.

Stripe payments directly on invoices so clients can pay with one click. Recurring invoices and subscription billing. Team roles per workspace (admin, member, viewer). Mobile capture flow optimised for snapping receipts on the go.