DEV Community

Palks Studio
Palks Studio

Posted on • Edited on

If your business depends on 5 tools, you don’t have a system

Clean self-hosted invoice system with PDF preview and paid validation process

Still managing quotes, invoices and payments across multiple tools?

I built a complete financial system that runs on your own domain.

Not a SaaS.
No subscription.
No critical dependencies.

The system runs on your own hosting.

Quotes → online signature → invoicing → payment confirmation → revenue journal.

Everything is semi-automated.


Quote / contract

Simple interface:

  • your fixed company details
  • client information
  • service lines
  • currency / VAT
  • your fixed banking details

The PDF is generated directly in the browser and sent to the client by email.

No data is sent to the server before validation.

Once the quote is sent:

  • a secure link is sent to the client
  • the client can view and sign the quote online
  • the quote is archived
  • you receive a confirmation email

The quote then becomes a signed contract.


Invoicing

The system includes a smart client lookup.

You only need to enter a single piece of information:

  • email
  • SIRET / SIREN
  • client name

and the system automatically retrieves:

  • the client’s details
  • their existing quotes (a list is suggested in the quote field)

The most recent quote is automatically suggested.

You simply select the correct quote from the list.

The system retrieves:

  • service lines
  • amounts
  • client information

If no quote exists, the invoice can be generated directly with a free service description.

Once validated, the system immediately generates:

  • the invoice
  • the stamped invoice (pre-generated)

The invoice is sent to the client and archived.

The stamped version is stored while waiting for payment.


Payment confirmation

The interface lists all pending invoices.

One click is enough to:

  • mark the invoice as paid
  • send the stamped invoice
  • add the entry to the revenue journal

The system also allows:

  • monthly invoice export (ZIP)
  • monthly revenue export (CSV)
  • annual revenue journal export

All data is stored in simple files.

No database.


This system is designed to be:

  • autonomous
  • installable on any PHP hosting
  • bilingual FR / EN
  • fully documented

The data stays with the client.

https://palks-studio.com/en/invoicing-without-saas


This is the type of systems I design at Palks Studio:

simple tools that automate complete business processes.

If you want to install this system on your own infrastructure:

contact@palks-studio.com


If you're interested in how it works under the hood:

Here’s a technical breakdown of the system architecture.


Overview

Billing System is a suite of three interconnected billing tools accessible from a unified interface. It covers the full lifecycle of a service engagement: from quote generation to invoice settlement, including electronic signature and structured archiving.

The system is designed to be deployed directly on the client's server, on a standard Apache hosting environment with PHP 8.x and Composer. It requires no database, no third-party service, and no subscription.


Features

  • Client-side quote PDF generation (jsPDF)
  • Server-side invoice PDF generation (Dompdf)
  • Automatic pre-generation of the paid invoice at billing time
  • Electronic quote signing by the client (touch/mouse canvas)
  • Client auto-fill from archives (SIREN, SIRET, VAT, email, name)
  • Structured archiving by client and period
  • Secure sequential numbering (file lock)
  • Monthly export of invoices (ZIP)
  • Monthly export of revenue records (CSV)
  • Yearly export of the revenue journal (CSV)
  • Automatic email notifications at each stage (quote, invoice, settlement)
  • Cross-module navigation bar
  • Bilingual FR/EN interface with real-time language switch
  • Dark mode / light mode with persistence
  • No database
  • No SaaS dependency
  • Basic security: secure sessions, tokens, brute-force protection

Project Structure

billing-system-en/
│
├── billing-public/
│   │  └── assets/
│   │      ├── logo*              → User logo if provided
│   │      ├── signature.png      → User signature used on quotes and invoices
│   │      ├── favicon*           → Optional site favicon displayed in the browser tab
│   │      └── jspdf.umd.min.js   → jsPDF library used to generate PDFs in the browser
│   │
│   ├── generator-direct.php      → Quote generation endpoint
│   ├── engine-direct.php         → Invoice generation endpoint
│   ├── invoice-direct.php        → Direct invoice generation endpoint
│   │
│   ├── quote-generator.php       → Web interface for quote generation
│   ├── invoice-engine.php        → Web interface for direct invoice generation
│   ├── mark-paid.php             → Web interface used to mark an invoice as paid
│   ├── signer.php                → Web interface for quote viewing and signing
│   ├── export-invoices.php       → ZIP export of archived invoices
│   ├── export-recettes.php       → CSV export of the revenue journal
│   │
│   ├── lookup.php                → Client information lookup and auto-fill
│   ├── pdf-proxy.php             → Secure PDF access via token
│   ├── .htaccess                 → Apache security and configuration rules
│   └── quote-generator-save.php  → Generated quote saving and archiving
│
├── vendor/                       → Libraries used for PDF document generation
├── templates/                    → HTML templates used to render documents
│   └── invoice-template.php      → Document rendering template (PDF or preview)
│ 
├── config.php                    → Central configuration for issuer and bank details
├── mailer.php                    → Internal email sending script with attachments
├── engine.php                    → Main engine: document generation, calculations and archiving logic
├── LICENSE.md                    → Project license
│ 
├── contracts/                    → Archive of signed and unsigned quotes
├── counters/                     → Sequential numbering counters for quotes and invoices
├── logs/                         → System logs (optional)
├── data/
│   ├── invoices/                 → Archive of invoices awaiting payment
│   ├── invoices_state/           → Pre-generated paid invoices
│   ├── invoices_paid/            → Paid invoices archive
│   └── revenues/                 → Revenue CSV files
│
└── docs/
    ├── USER_GUIDE.md             → User guide
    ├── OVERVIEW.md               → Project overview and general system description
    └── README.md                 → Usage documentation (client version)
Enter fullscreen mode Exit fullscreen mode

If you want to explore the technical implementation, you can find it here:

https://github.com/Palks-Studio/billing-system


https://palks-studio.com

Top comments (0)