InvoiceFlow
The Invoice Management System
A simple, Laravel-powered invoice management system for small retail and service businesses โ raise an invoice in seconds from the invoice terminal, then manage the product catalog, cash register shifts, customer accounts and loyalty, expenses, and reports from one admin panel.
Introduction
InvoiceFlow is a simple, single-application invoice management system built on Laravel 12. Every sale becomes an invoice you can print, download as a PDF, or settle later against a customer account. It covers the day-to-day invoicing of a small retail or service business:
Invoice Terminal
Barcode scanning, cash and card tenders, A4 PDF invoices, thermal receipts, and register shifts.
Product Catalog
Products with variants, add-ons, categories, brands, tags, and units of measure.
Reports & Admin
Order, product, customer, user, and expense reports over any date range.
Everything runs as one Laravel application โ no separate frontend server required, and the admin and invoice terminal work in a phone browser. Follow this documentation to install and configure InvoiceFlow on your server.
System Architecture
InvoiceFlow is a monolithic Laravel application โ one codebase, one deployment. Livewire handles reactive UI components server-side, so no separate JS build server is needed in production.
What's Included
- โ Laravel 12 full source code
- โ Web installer wizard
- โ Pre-seeded demo data (optional)
- โ Documentation
Tech Stack
- โข PHP 8.2+ / Laravel 12
- โข Livewire 4 / Alpine.js
- โข Tailwind CSS v4
- โข MySQL 5.7+ / MariaDB
- โข Server-side barcode generation (picqer/php-barcode-generator)
Changelog
- โ Invoice terminal โ Livewire invoice screen with cash and card tenders, per-line customization notes, and invoice editing
- โ Product catalog โ products with variants, add-ons, warranty, categories, brands, tags and units
- โ Barcode โ scan-to-search on the invoice terminal, plus printable barcode label sheets (server-side SVG generation)
- โ Cash register / shifts โ open & close register sessions, cash in/out movements, printable Z-Report. Refunded and cancelled orders are excluded from expected drawer cash
- โ Customer accounts โ due/credit ledger, loyalty points (earn on sale, redeem for value), per-customer ledger view
- โ Order statuses & payments โ configurable statuses with history, and a payments screen filterable by payment date
- โ Expense management โ expense categories and expenses with date filtering
- โ Reports โ Order, Product, Customer, User and Expense reports over a selectable date range
- โ Invoices & receipts โ A4 PDF invoices and 80mm / 58mm thermal receipts
- โ Customers, users, roles & permissions โ granular permissions with staff/customer separation enforced on web and API
- โ Multi-language, settings, REST API โ six languages with RTL support, DB-backed settings, and a Sanctum-authenticated
/api/v1 - โ FAQ management โ admin-managed help content with categories
- โ Web installer โ browser-based multi-step setup wizard (requirements, purchase verification, database, admin, finish)
- โ Database backup & restore โ admin-initiated SQL dump/restore (no shell access required)
- โ Activity log & notifications โ audit trail of admin actions and in-app notifications
Server Requirements (VPS)
Minimum recommended specs for running InvoiceFlow (Laravel + MySQL) on a VPS.
CPU
1 vCPU minimum. 2 vCPUs recommended for production.
RAM
1 GB minimum. 2 GB recommended.
OS
Ubuntu 22.04 LTS (recommended) or Debian 12.
Important Server Documentation
Follow these notes when the application shows a server error.
500 Internal Server Error โ Common Fix
The most common cause is a missing .env file or missing Laravel app key:
Then update .env with your database credentials before continuing.
Storage Permissions
File uploads and cache will fail if storage folder permissions are wrong:
Install & Configure Nginx
1. Install Nginx
sudo apt update
sudo apt install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginx
2. Virtual host โ /etc/nginx/sites-available/yourdomain.com
server {
listen 80;
server_name yourdomain.com www.yourdomain.com;
root /var/www/invoiceflow/public;
index index.php;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
}
location ~ /\.ht { deny all; }
}
3. Enable site & reload
sudo ln -s /etc/nginx/sites-available/yourdomain.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Install & Configure MySQL
1. Install MySQL 8
sudo apt install -y mysql-server
sudo systemctl enable mysql
sudo mysql_secure_installation
2. Create database & user
sudo mysql -u root -p
CREATE DATABASE invoiceflow CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'invoiceflow_user'@'localhost' IDENTIFIED BY 'StrongPassword!';
GRANT ALL PRIVILEGES ON invoiceflow.* TO 'invoiceflow_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
3. Update Laravel .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=invoiceflow
DB_USERNAME=invoiceflow_user
DB_PASSWORD=StrongPassword!
Install PHP & Extensions
InvoiceFlow requires PHP 8.2 or higher. The commands below install PHP 8.3 (recommended) with all required extensions.
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install -y php8.3 php8.3-fpm php8.3-mysql php8.3-mbstring \
php8.3-xml php8.3-bcmath php8.3-curl php8.3-zip php8.3-gd php8.3-intl
sudo systemctl enable php8.3-fpm
sudo systemctl start php8.3-fpm
php -v should show PHP 8.3.x
Install Composer
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
composer --version
Then inside your project directory:
cd /var/www/invoiceflow
composer install --optimize-autoloader --no-dev
Domain & DNS Configuration
Point your domain to the VPS IP via your registrar's DNS panel.
| Type | Name / Host | Value | TTL |
|---|---|---|---|
| A | @ | YOUR_VPS_IP | Auto |
| A | www | YOUR_VPS_IP | Auto |
dig yourdomain.com.
SSL Setup with Certbot (HTTPS)
1. Install Certbot
sudo apt install -y certbot python3-certbot-nginx
2. Obtain certificate
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com
3. Verify & test auto-renewal
sudo nginx -t && sudo systemctl reload nginx
sudo certbot renew --dry-run
APP_URL=https://yourdomain.com in your Laravel .env and clear cache: php artisan config:clear
Shared Hosting Requirements
Confirm your cPanel environment supports the following before deploying.
Laravel / InvoiceFlow
- โ PHP 8.2+ via MultiPHP or PHP Selector
- โ MySQL 5.7+ or MariaDB
- โ Composer (SSH Terminal)
- โ SSH Terminal access (cPanel โ Terminal)
- โ Addon Domain / Subdomain creation
- โ File Manager or FTP access
- โ AutoSSL / Let's Encrypt SSL
Laravel Setup on cPanel
Deploy InvoiceFlow on shared hosting step by step.
Create Domain & Point to public/
In cPanel โ Domains, add your domain and set its Document Root to the project's public/ folder:
/home/yourusername/invoiceflow/public
Upload Project Files
Upload the ZIP via cPanel โ File Manager then extract:
cd ~/invoiceflow unzip invoiceflow.zip -d . rm invoiceflow.zip
Set PHP Version to 8.2+
In cPanel โ MultiPHP Manager (or PHP Selector), select your domain and set PHP to 8.2 or newer. Enable extensions: pdo_mysql mbstring xml curl zip gd bcmath fileinfo.
Create MySQL Database
cPanel โ MySQL Databases:
- Create database:
yourusername_invoiceflow - Create user with a strong password
- Add user to database with All Privileges
Configure .env
Rename .env.example โ .env and edit:
# App APP_NAME="InvoiceFlow" APP_ENV=production APP_DEBUG=false APP_URL=https://yourdomain.com # Database DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=yourusername_invoiceflow DB_USERNAME=yourusername_dbuser DB_PASSWORD=StrongPassword! # Mail (optional) MAIL_MAILER=smtp MAIL_HOST=mail.yourdomain.com MAIL_PORT=587 [email protected] MAIL_PASSWORD=your_email_password [email protected]
Install Composer & Run Artisan
cd ~/invoiceflow curl -sS https://getcomposer.org/installer | php php composer.phar install --optimize-autoloader --no-dev php artisan key:generate php artisan migrate --force php artisan db:seed --force php artisan storage:link php artisan optimize
Set Permissions & Enable SSL
chmod -R 755 storage bootstrap/cache
Enable SSL via cPanel โ SSL/TLS โ AutoSSL or Let's Encrypt.
Test the Installation
Visit your domain โ you should see the login page:
Server Requirements
Verify your hosting environment before installation.
PHP & Extensions
- โ PHP 8.2 or higher
- โ OpenSSL
- โ PDO + PDO_MySQL Extension
- โ Mbstring Extension
- โ Tokenizer Extension
- โ XML Extension
- โ Ctype Extension
- โ cURL Extension
- โ JSON Extension
- โ BCMath Extension
- โ Fileinfo Extension
- โ ZIP Extension
- โ GD Extension
Database & Server
- โ MySQL 5.7+ or MariaDB
- โ Composer 2.x
- โ Apache or Nginx
- โ SSL Certificate (HTTPS)
- โ 512MB+ RAM
Installation Guide
Deploy InvoiceFlow on your VPS. You can use the web installer (no SSH needed for setup) or install manually via SSH.
Download from Envato
Log in to CodeCanyon โ Downloads โ InvoiceFlow โ Download All Files & Documentation. Extract the ZIP.
Upload Project to Server
Option A โ SCP / FTP
scp invoiceflow.zip user@YOUR_VPS_IP:/var/www/ ssh user@YOUR_VPS_IP cd /var/www && unzip invoiceflow.zip -d invoiceflow
Option B โ Git
sudo mkdir -p /var/www/invoiceflow cd /var/www/invoiceflow sudo git clone https://github.com/your-repo/invoiceflow.git .
Configure .env & Choose Install Method
Copy .env.example โ .env, then visit the installer in your browser and follow the on-screen steps โ no SSH needed for the rest of the setup:
Installer Steps Preview
Copy and edit .env via SSH, then run artisan commands:
cd /var/www/invoiceflow cp .env.example .env nano .env # set APP_URL, DB_* values composer install --optimize-autoloader --no-dev php artisan key:generate php artisan migrate --force php artisan db:seed --force php artisan storage:link php artisan optimize
Set Folder Permissions
chmod -R 775 storage bootstrap/cache chown -R www-data:www-data storage bootstrap/cache
Test the Installation
Open your browser and visit the admin panel โ you should see the login page.
Before going live, verify:
APP_DEBUG=false- Storage symlink exists:
ls -la public/storage - Folder permissions set on
storage/andbootstrap/cache/ - SSL certificate active
Configuration
Key settings available from Admin โ Settings after installation.
General Settings
- โข Store name, logo, currency, timezone
- โข Tax rate and tax name
- โข Service fee applied at checkout
- โข Loyalty points rate (earn per sale amount) and redemption rate
- โข Receipt header / footer text
- โข Default language
Thermal Receipt Printer
Configure from Settings โ Receipt Settings. Choose paper width (80mm or 58mm) and enable auto-print after an invoice is completed.
Mail (SMTP)
Set in your .env file:
MAIL_MAILER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=587 MAIL_USERNAME=your_username MAIL_PASSWORD=your_password [email protected] MAIL_FROM_NAME="InvoiceFlow"
Queue Worker & Background Jobs
InvoiceFlow ships with QUEUE_CONNECTION=sync in .env โ emails and notifications are sent immediately during the request, so everything works out of the box with no worker process and no extra setup.
sync.
1. Enable background sending
Set the queue driver to database in your .env, then clear the config cache:
QUEUE_CONNECTION=database
php artisan config:clear
Queued jobs are now stored in the database โ but they only run while a queue worker is running. Pick one of the options below.
2a. Recommended (VPS): Supervisor
Supervisor keeps the worker alive permanently and restarts it if it crashes:
sudo apt install -y supervisor sudo nano /etc/supervisor/conf.d/invoiceflow-worker.conf
[program:invoiceflow-worker] process_name=%(program_name)s_%(process_num)02d command=php /var/www/invoiceflow/artisan queue:work database --sleep=3 --tries=3 --max-time=3600 autostart=true autorestart=true stopasgroup=true killasgroup=true user=www-data numprocs=1 redirect_stderr=true stdout_logfile=/var/www/invoiceflow/storage/logs/worker.log stopwaitsecs=3600
sudo supervisorctl reread sudo supervisorctl update sudo supervisorctl start invoiceflow-worker:*
2b. Fallback (shared hosting): Cron
No Supervisor on shared hosting? Add a cron job (cPanel โ Cron Jobs) that drains the queue every minute and exits when it's empty:
* * * * * php /home/yourusername/invoiceflow/artisan queue:work --stop-when-empty
Adjust the path to your installation. Emails may be delayed by up to a minute โ acceptable for most stores.
sudo supervisorctl restart invoiceflow-worker:* or php artisan queue:restart) so it picks up the new code.
Features
All modules available in InvoiceFlow v1.0.0.
Dashboard
Real-time overview of store performance โ today's revenue, orders, and top products.
- โ Daily, weekly, and monthly revenue charts
- โ Total orders and top-selling products
- โ Recent order activity feed
Invoice Terminal
Fast invoice screen with barcode scan-to-add, discounts, and instant A4 PDF or thermal receipt printing.
- โ Barcode scan-to-search (USB/Bluetooth scanner)
- โ Cash and card tenders, with change due on cash
- โ 80mm / 58mm thermal receipt + A4 PDF
- โ Redeem customer loyalty points against an invoice
- โ Tax and service fee applied server-side from settings
Product Catalog
Full product catalog with categories, brands, tags, units, variants and add-ons. Products carry a price and an availability flag โ not a stock count.
- โ Products with variants, add-ons, and images
- โ Categories, brands, tags, and units of measure
- โ Warranty period carried through to order lines
- โ Availability flag to hide a product from the invoice terminal
- โ Printable barcode label sheets (server-side SVG)
Cash Register & Shifts
Shift management with opening cash, in/out movements, and a printable Z-Report on close.
- โ Open/close register sessions with opening cash
- โ Cash in/out movements during shift
- โ Printable Z-Report on close
- โ Refunded and cancelled orders excluded from expected cash
- โ Payment status reflects partial and full refunds
Customer Accounts & Loyalty
Run customer tabs with a due/credit ledger, and reward repeat business with loyalty points.
- โ Per-customer due/credit ledger with statement view
- โ Record payments and add charges against an account
- โ Loyalty points earned on sale, redeemable for value
- โ Points re-settle automatically when an order is edited
Roles & Permissions
Fine-grained role-based access control โ define exactly what each staff member can see and do.
- โ Unlimited custom roles (cashier, manager, admin)
- โ Toggle individual permissions per role
- โ Assign multiple roles to one user
- โ Activity log of all admin actions
Settings & Utilities
Store settings, multi-language management, database backup/restore, and more โ all from the admin panel.
- โ Store info, currency, tax, and receipt settings
- โ Loyalty points earn/redeem rates
- โ Multi-language with admin-editable translations
- โ Database backup & restore (no shell needed)
REST API
InvoiceFlow ships a token-authenticated REST API under /api/v1, built on Laravel Sanctum. It is available for your own integrations and mobile clients. No extra setup is needed โ it is enabled on every install.
Getting a token
curl -X POST https://yourdomain.com/api/v1/login \
-H "Accept: application/json" \
-d "[email protected]&password=your-password"
# -> { "token": "1|abcdef...", "user": { ... } }
Send it on every subsequent request:
curl https://yourdomain.com/api/v1/products \
-H "Accept: application/json" \
-H "Authorization: Bearer 1|abcdef..."
Endpoint groups
| Group | Auth | What it covers |
|---|---|---|
| basic-info, categories, products, languages | None | Public catalog and store settings |
| login, register, forgot-password | None | Issue a token (throttled 10/min) |
| profile, orders | Bearer | The signed-in customer's own data only |
| staff/* | Bearer + permission | Store-wide: products, categories, barcode scan, customers, orders, FAQs. Each endpoint checks the caller's role permissions |
per_page (max 100).
POST /api/v1/logout, and every other token is revoked when that user changes their password. You can also clear them from the database if a device is lost.
Every route is defined in routes/api.php in the application root.
Updating to a New Version
mysqldump) and copy your .env file and storage/app folder somewhere safe before you overwrite anything.
- Download the new release ZIP from your CodeCanyon downloads page.
- Put the site into maintenance mode:
php artisan down - Replace the application files, but keep these: your
.env,storage/(uploads and logs), andpublic/storageif it is a real symlink. - Reinstall dependencies:
composer install --no-dev --optimize-autoloader - Apply any new migrations:
php artisan migrate --force - Clear stale caches:
php artisan optimize:clear - Repair the uploads symlink if images 404:
php artisan invoiceflow:install-assets - Bring it back up:
php artisan up
storage/installed.lock. It is what tells InvoiceFlow it is already set up. Removing it sends every visitor back to the installer.
If you run a queue worker, restart it after updating so it picks up the new code: php artisan queue:restart. See the Queue Worker section.
Third-Party Licenses
InvoiceFlow bundles open-source libraries. Most use permissive MIT/BSD/Apache licenses; two are LGPL and worth knowing about:
vendor/ after composer install. Using them as-is places no obligation on your own code โ only modifying the libraries themselves would.
The full list of bundled third-party libraries and their licenses is in credits.txt in the application root.