Work02Featured
Workbill
Invoicing and lightweight bookkeeping for freelancers: write invoices in a live PDF preview, share them as a link, track payments and expenses, and see real profit per currency.
- Role
- Fullstack
- Built for
- Personal
- Status
- active
- Stack
- Next.js, NestJS, PostgreSQL, Prisma, TypeScript
The project
A full-stack invoicing and bookkeeping app for freelancers and one-person practices, designed and built end to end. It covers the whole money loop: write an invoice, share it with your client, record what they pay, log your expenses, and see what you actually earned.
Invoicing:
- Split-screen editor with a live PDF preview that matches the final document, autosave, and drag-and-drop line items
- Five invoice templates (Classic, Modern, Ledger, Plain, Professional), each versioned so a sent invoice always renders the way it was sent
- Gapless invoice numbering with a custom pattern (e.g. INV-{0000} or {YYYY}-{000}), allocated safely inside a database transaction
- Sent invoices are immutable: billing and business details are frozen at send time, and corrections happen by voiding and reissuing
- Multi-currency invoices, with every figure kept per currency and never silently converted
Sharing and payments:
- Each sent invoice gets a private share link: a fast, branded page that works without JavaScript, plus a server-rendered PDF download
- Record full or partial payments; paid, partially paid, and overdue are derived from payments and due dates instead of stored flags
- Payment instructions and up to five payment links on every invoice
Bookkeeping:
- Expenses with categories and receipt photos, served through signed, short-lived URLs
- Rebill expenses to a client as invoice line items
- Dashboard with outstanding, overdue, and paid-this-month figures, a six-month income chart, and an activity feed
- Reports for income, expenses, and profit by month, quarter, or year on a cash basis, with CSV exports for an accountant
Account and operations:
- Onboarding flow, business profile, logo upload, and invoice defaults
- Account deletion with a 30-day grace window, recovery, and a scheduled purge
- Internal admin panel with an append-only audit log
Engineering:
- pnpm monorepo: Next.js 16 and React 19 frontend, NestJS 11 API with Prisma on PostgreSQL (Neon), deployed on Vercel
- Shared packages for money math (integer minor units with dinero.js), PDF templates (@react-pdf), and design tokens used by both the UI and the PDFs
- Tenant-scoped database access so every query is limited to the signed-in business
- Session auth with httpOnly cookies, hashed session tokens, and Argon2id passwords
- Hundreds of API integration tests against a real Postgres database, unit tests for the money and template packages, and Playwright end-to-end tests
- CI on GitHub Actions running build, typecheck, lint, tests, and end-to-end tests on every push
- Database migrations that each ship with a hand-written rollback script, and architecture decisions recorded as ADRs
Next project
All work