MVP / SaaS Foundation / Project Detail

Billora SaaS Invoicing & Billing Platform

A full-stack SaaS invoicing MVP with organization ownership, team membership, business profiles, customer records, invoice creation, manual payments, PDF generation, background jobs, and audit visibility.

MVP / SaaS Foundation / Multi-tenant SaaS billing platform

Project Overview

This page expands the case-study summary into a clearer view of scope, architecture, workflow, and technical signals.

Stack

Next.js, NestJS, PostgreSQL, Prisma, Redis, TypeScript, JWT, bcrypt

  • Authenticated SaaS invoicing workflows, organization and team management, business profiles, customers, invoice items, manual payments, payment status tracking, PDF generation, audit logs, background jobs, and dashboard summaries.
  • Small businesses often manage invoices through spreadsheets, manually edited PDFs, message threads, and disconnected payment notes. That creates duplicate records, unclear payment state, inconsistent customer data, and weak ownership across teams.
  • Built a working SaaS invoicing MVP foundation with authentication, organization membership, business profiles, customer management, invoice creation, calculated totals, manual payment tracking, generated invoice documents, audit logs, dashboard summaries, and initial API/web test coverage.

Features

Functional Scope

The project scope is framed around real product and operations behavior rather than a surface-level screen list.

Authenticated registration, login, profile access, protected web routes, and JWT-protected API routes

Organization, member, invite, and role-aware team workflow foundation

Business profile and customer management tied to organization ownership

Invoice creation with line items, tax, discounts, due dates, notes, calculated totals, and status tracking

Manual payment recording with paid amount, outstanding balance, partial payment, and paid-state handling

Generated invoice documents with current payment summary and invalidation after edits or payment updates

Audit logs for important organization, business, customer, invoice, invite, and payment events

Redis-backed job queue foundation for invoice PDF generation and email job orchestration

Engineering

Technical Signals

These signals show the implementation concerns that matter when a system moves beyond a prototype.

01

Engineering Signal

NestJS modules separate auth, users, businesses, customers, invoices, payments, organizations, audit, jobs, dashboard, and health endpoints

02

Engineering Signal

Prisma relational models connect users, organizations, members, invites, businesses, customers, invoices, invoice items, payments, and audit logs

03

Engineering Signal

DTO validation and global validation pipes keep create/update payloads explicit before business logic runs

04

Engineering Signal

Ownership checks scope business, customer, invoice, payment, invite, organization, and audit operations to authorized members

05

Engineering Signal

Manual payment creation prevents overpayment by checking successful payments against the invoice total

06

Engineering Signal

Invoice total updates prevent reducing the invoice below already received payments

07

Engineering Signal

PDF documents are invalidated after invoice edits, manual payments, and mark-paid actions so stale billing documents are not served

08

Engineering Signal

Frontend workflows use reusable API helpers, loading states, empty states, pagination, validation helpers, and deduplicated toast feedback

Workflow

How The System Moves

The strongest project pages explain what happens to state as users, admins, workers, and services interact.

Case Study

Architecture Breakdown

The original systems-delivered breakdown remains available here for a compact architecture view.

MVP / SaaS Foundation

Billora SaaS Invoicing & Billing Platform

View Project

Engineering Scope

Authenticated SaaS invoicing workflows, organization and team management, business profiles, customers, invoice items, manual payments, payment status tracking, PDF generation, audit logs, background jobs, and dashboard summaries.

Problem Statement

Small businesses often manage invoices through spreadsheets, manually edited PDFs, message threads, and disconnected payment notes. That creates duplicate records, unclear payment state, inconsistent customer data, and weak ownership across teams.

Architecture Overview

Next.js and TypeScript web app with authenticated dashboard, customer, invoice, settings, registration, and invite flows. A modular NestJS API uses Prisma and PostgreSQL for users, organizations, members, invites, businesses, customers, invoices, invoice items, payments, and audit logs. Redis-backed jobs support invoice PDF generation and email job orchestration.

Data Flow Explanation

An authenticated user selects a business and customer, enters invoice items, tax, discount, issue date, due date, and notes, then submits the invoice to the API. The backend validates the DTO, checks organization and business access, calculates totals, writes invoice data through Prisma transactions, and records audit events. Manual payments update payment records, paid totals, invoice status, and generated-document freshness.

Engineering Decisions

NestJS was selected for modular backend boundaries, guards, dependency injection, and DTO validation. Prisma and PostgreSQL fit the relational billing model, while Next.js provides a practical TypeScript web foundation. Redis-backed jobs keep document and email workflows outside the request path. Real payment gateways, production email delivery, and the planned Flutter mobile app were deferred so the core SaaS ownership and billing model could be hardened first.

Scale & Reliability Considerations

Organization-level ownership prepares the platform for teams and multi-business workspaces. Pagination and filtering support customers, invoices, payments, and audit logs. Transactions protect invoice creation and payment recording, while background jobs prepare PDF and email workflows for heavier workloads.

Outcome

Built a working SaaS invoicing MVP foundation with authentication, organization membership, business profiles, customer management, invoice creation, calculated totals, manual payment tracking, generated invoice documents, audit logs, dashboard summaries, and initial API/web test coverage.