SlimBooks

A secure, self-hosted billing and invoice management application built with React, TypeScript, and SQLite. Complete control over your financial data — no telemetry, no hosted tier, no vendor lock-in.

Security-First
Docker Ready
Raspberry Pi Optimized
AGPL-3.0-or-later
Docker Quick Start
# Clone the repository
git clone https://github.com/rbenzing/SlimBooks.git
cd SlimBooks

# Generate cryptographically secure secrets
./scripts/generate-secrets.sh

# Deploy with Docker Compose
./scripts/deploy.sh

# App available at http://localhost:8080

Key Features

Everything you need to bill clients, get paid and track where the money went — while keeping full ownership of your data.

Business Management

  • Dashboard — Real-time financial overview with interactive charts
  • Client Management — Complete profiles, contact details & history
  • Professional Invoices — Customizable templates with line items, taxes & shipping
  • Recurring Invoices — Automated billing (weekly / monthly / quarterly / yearly)
  • Expense Tracking — Categorized expenses with vendor, approval status & CSV import
  • Financial Reports — P&L (cash or accrual), invoice, expense & client reports with multi-period columns

Getting Paid

  • Stripe Payment Links — Send any invoice with a card payment link
  • Automatic Reconciliation — Webhooks record the payment and mark the invoice paid
  • Signature Verified — Every webhook is checked before anything is written
  • Safe to Retry — A redelivered event never books a payment twice
  • Keys Stay Server-Side — The secret key never reaches the browser
  • Entirely Optional — Every other feature works without it

Email

  • Your Own Mail Server — Invoices and reminders sent over your SMTP
  • Provider Presets — Gmail, Outlook, Yahoo, iCloud, Zoho, Fastmail, SendGrid, Mailgun, Postmark, Brevo, Amazon SES
  • One Choice, Three Settings — Host, port and encryption filled in together
  • Custom Servers — Or enter host, port and encryption yourself
  • Connection Testing — Prove it works before an invoice depends on it
  • Credentials Held Server-Side — Never returned to the settings screen

Security & Privacy

  • Hardened by Default — Rate limiting, input validation, security headers (Helmet)
  • JWT Authentication — Access tokens with silent refresh and rotation
  • Account Lockout — Automatic protection after failed login attempts
  • Password Hashing — bcrypt, with configurable strength requirements
  • Self-Hosted — Complete data ownership, zero third-party sharing
  • No Telemetry — Nothing phones home; no analytics, no tracking

Deployment

  • Docker Ready — One-command deployment with Docker Compose
  • Raspberry Pi — Optimized for ARM and low-power systems
  • Fast Setup — Automated scripts for secrets, deploy & cron
  • Portable — Single-file SQLite database; copy it to back it up
  • Versioned Schema — Migrations run automatically on start
  • No External Services — Everything runs on your hardware

Application Screenshots

A clean, modern interface focused on clarity and speed. Replace the placeholders below with actual captures from your instance.

Dashboard

Real-time revenue, expenses & charts

Dashboard — interactive overview of financial health

Invoice Editor

Line items, taxes, shipping & templates

Professional invoice creation with recurring support

Client Management

Profiles, history & contact details

Full client records and activity history

Reports

P&L, cash/accrual, multi-period

Flexible financial reporting with period breakdowns

To add real screenshots: place optimized WebP/PNG files in your static assets and replace the placeholder frames above. Always include meaningful alt text describing the UI state.

Modern Tech Stack

Built for performance, maintainability, and developer experience

Frontend

  • React 18 UI Library
  • TypeScript Language
  • Vite Build Tool
  • shadcn/ui + Tailwind CSS Styling & UI
  • Lucide Icons Icon Library

Backend

  • Node.js Runtime
  • Express Web Framework
  • SQLite Database
  • Recharts Charts

Security & Deployment

Helmet Rate Limiting JWT bcrypt bcrypt Docker Docker Compose AGPL-3.0-or-later

Quick Start Guide

Get SlimBooks running in minutes

Docker Deployment (Recommended)

# Clone the repository
git clone https://github.com/rbenzing/SlimBooks.git
cd SlimBooks

# Generate secure secrets
./scripts/generate-secrets.sh

# Deploy with Docker
./scripts/deploy.sh

Access the application at http://localhost:8080

Raspberry Pi Setup

# Prepare your Raspberry Pi
curl -fsSL https://raw.githubusercontent.com/rbenzing/SlimBooks/main/scripts/setup-raspberry-pi.sh | bash

# Deploy the application
./scripts/deploy.sh

Development Setup

# Install dependencies
npm install

# Start development servers
npm run dev

Frontend: http://localhost:8080 • Backend: http://localhost:3002

Backend changes need a manual restart; the frontend hot-reloads via Vite HMR. Database migrations run automatically on server start.

Quality Gates

Every change has to clear all four before it lands.

npm run typecheck   # TypeScript across frontend, vite config, and server
npm run lint        # ESLint (0 errors, 0 warnings) + typecheck
npm test            # Vitest suite
npm run build       # Production build

Configuration

Secure defaults, fully customizable

Environment Variables

.env.example is the single template and lists every variable the application reads. Copy it to .env and edit that:

# Security (REQUIRED – change in production)
JWT_SECRET=your-secure-64-character-secret
JWT_REFRESH_SECRET=your-secure-refresh-secret
SESSION_SECRET=your-secure-session-secret

# Network
CORS_ORIGIN=http://localhost:8080
PORT=3002

# Email — note SMTP_*, not EMAIL_*
SMTP_HOST=
SMTP_PORT=587
SMTP_USER=
SMTP_PASS=
EMAIL_FROM=noreply@slimbooks.app

# Stripe (optional) — setting both keys switches it on
STRIPE_PUBLISHABLE_KEY=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=

# Features
ENABLE_DEBUG_ENDPOINTS=false

Run ./scripts/generate-secrets.sh to create cryptographically secure values.

Database

  • SQLite — Lightweight, serverless, perfect for self-hosting
  • Versioned Schema — Migrations run automatically on server start
  • Data Portability — Single-file database for easy migration
  • No External Dependencies — Everything runs locally on your hardware

Security Features

Defense in depth for sensitive financial data

Rate Limiting

Protection against brute-force attacks (100 req / 15 min)

JWT Authentication

Secure token-based auth with configurable expiration

Input Validation

Server-side validation prevents injection attacks

Security Headers

Comprehensive protection via Helmet.js

Account Lockout

Automatic lockout after repeated failed logins

Token Rotation

Expired access tokens refresh silently; refresh tokens rotate in place

Request Logging

Every request logged with timing, on your own box

Documentation

Guides for deployment, theming, and contribution

Management Commands

View application logs

docker-compose logs -f

Update deployment

./scripts/deploy.sh

Generate new secrets

./scripts/generate-secrets.sh

Set up recurring-invoice cron

./scripts/setup-cron.sh

License

Free software, and it stays that way.

SlimBooks is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but without any warranty — without even the implied warranty of merchantability or fitness for a particular purpose.

What AGPL means for a self-hosted app: if you modify SlimBooks and let others use it over a network, you must offer those users the source of your modified version. Running it privately for your own business places no obligation on you.

SPDX identifier: AGPL-3.0-or-later · Read the full licence

About the Author

SlimBooks is built by Russell Benzing.

It's developed with heavy use of AI coding assistants — architecture, implementation, tests and this documentation. That's a deliberate choice, and worth stating plainly: it means the project moves quickly, and it means every change still gets reviewed, type-checked, linted and covered by the test suite before it lands. The full history is public; judge the code, not the tooling.

It's released free and open source under the AGPL so that freelancers and small businesses can run their own billing on their own hardware, and own their data outright rather than rent access to it. There's no hosted tier, no telemetry, and nothing held back for a paid version.

Bug reports, feature requests and pull requests are all welcome — see CONTRIBUTING.md.

Support Development

SlimBooks is free, open-source software released under the GNU Affero General Public License v3 (or later). If it saves you time or helps your business, consider buying the maintainer a coffee.

No hosted tier · No telemetry · No paid version · Your data stays on your hardware