mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-07-18 23:05:20 +00:00
3df2a018328192feb5279509866c4205f23b52c7
Adds three new read-only tools the chat LLM can call to answer "who/what did the most X" questions that previously fell through the cracks: - rank_top_customers — ranks customers by invoiced_total, paid_total, invoice_count, or outstanding_balance over a named time period - rank_top_items — ranks catalog items by quantity_sold or revenue - rank_expense_categories — ranks expense categories by total spend All three share a new ResolvesPeriod trait that centralizes the period-name → [start, end] logic. GetCompanyStatsTool is refactored onto the same trait (identical public schema — the 'all_time' option is only exposed on the new ranking tools, where an unbounded window makes sense; stats over "all time" collapses every record into one giant bucket and is rarely useful). Each tool follows the existing pattern: snake_case name, one-sentence description tuned for LLM tool selection, JSON-schema parameters with injected company scoping (never trusting LLM-supplied company IDs), and JSON-encodable output. outstanding_balance on the customer tool explicitly ignores the period param since it's a current-state snapshot. Multi-company scoping tests lock down the session-authoritative boundary on every new tool. Per-metric ordering tests verify the aggregate queries actually rank correctly, and an ad-hoc-item exclusion test verifies rank_top_items skips invoice lines where item_id is null (free-typed entries that have no catalog row to rank by id). 15 new tests added (tests/Feature/Ai/Tools/); test suite grows from 398 to 413 passing. LLM tool count goes from 9 to 12 — the model will discover the new tools automatically via the function-calling schema with no prompt changes required.
Introduction
InvoiceShelf is an open-source web app that helps you track expenses, record payments, and create professional invoices and estimates. It is self-hosted, multi-tenant, and built for individuals and small businesses that want to keep their books on their own infrastructure.
The web application is built with Laravel and Vue 3.
To get started using Docker Compose, follow the Installation guide.
Table of Contents
Documentation
System Requirements
- PHP 8.4+ is required (since v2.2.0, when InvoiceShelf moved to Laravel 13).
- Database: MySQL, MariaDB, PostgreSQL, or SQLite.
- Before updating from inside the app, verify your server meets the target version's PHP and extension requirements.
- The in-app updater verifies requirements and refuses to proceed if they are not met.
Download
Discord
Join the discussion on the InvoiceShelf Discord: Invite Link
Roadmap
Rough roadmap of things to come, not in any specific order:
- Automatic Update
- Email Configuration
- Installation Wizard
- Address Customisation & Default Notes
- Edit Email before Sending Invoice
- Available as a Docker image
- Performance Improvements
- Customer View Page
- Custom Fields on Invoices & Estimates
- Multiple Companies
- Recurring Invoices
- Customer Portal
- Decoupled system settings from company settings (v3.0)
- Proper multi-tenancy system (v3.0)
- Company member invitations with custom roles (v3.0)
- Dark mode (v3.0)
- Full TypeScript refactor of the frontend (v3.0)
- Improved backend architecture (v3.0)
- Security hardening (v3.0)
- Reworked installation wizard (v3.0)
- Module Directory (v3.0)
- Rewritten Payments module (v3.0)
- Accept Payments (Stripe integration)
- Improved template system for invoices and estimates
Translate
Help us translate InvoiceShelf into your language: https://crowdin.com/project/invoiceshelf
Star History
License
InvoiceShelf is released under the GNU Affero General Public License v3.0. See LICENSE for the full text.
Languages
PHP
59.9%
Vue
36.1%
Blade
3.2%
Shell
0.6%
Dockerfile
0.1%