Skip to content

rbenzing/SlimBooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

170 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SlimBooks

TypeScript React Node.js SQLite Docker License: MIT

A secure, self-hosted billing and invoice management application

πŸ”’ Security-First β€’ 🐳 Docker Ready β€’ πŸ₯§ Raspberry Pi Optimized

Features β€’ Quick Start β€’ Documentation β€’ License


✨ Key Features

πŸ’Ό Business Management

  • πŸ“Š Dashboard: Real-time financial overview with interactive charts
  • πŸ‘₯ Client Management: Complete client profiles with contact details and history
  • 🧾 Professional Invoices: Customizable templates with line items, taxes, and shipping
  • πŸ”„ Recurring Invoices: Automated recurring billing with customizable schedules (weekly, monthly, quarterly, yearly)
  • πŸ’° Expense Tracking: Categorized expense management with receipt uploads
  • πŸ“ˆ Financial Reports: Revenue and expense analytics with detailed monthly/quarterly columns for yearly reports

πŸ”’ Security & Privacy

  • πŸ›‘οΈ Enterprise Security: Rate limiting, input validation, and security headers
  • πŸ” JWT Authentication: Secure token-based authentication with 2FA support
  • 🏠 Self-Hosted: Complete data ownership - no third-party data sharing
  • πŸ”’ Encrypted Storage: Secure SQLite database with encrypted sensitive data

πŸš€ Deployment

  • 🐳 Docker Ready: One-command deployment with Docker Compose
  • πŸ₯§ Raspberry Pi: Optimized for ARM devices and low-power systems
  • ⚑ Fast Setup: Automated scripts for quick deployment
  • πŸ“¦ Portable: SQLite database - easy backup and migration

πŸ› οΈ Tech Stack

Component Technology
Frontend React 18 + TypeScript + Vite
UI shadcn/ui + Tailwind CSS + Lucide Icons
Backend Node.js + Express + SQLite
Security Helmet + Rate Limiting + JWT + bcrypt
Deployment Docker + Docker Compose
Charts Recharts for analytics visualization

πŸš€ Quick Start

🐳 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 your app 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

βš™οΈ Configuration

Environment Variables

The application uses environment variables for secure configuration:

# 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

# Features
ENABLE_DEBUG_ENDPOINTS=false

Use ./scripts/generate-secrets.sh to create secure secrets automatically.

Database

  • SQLite: Lightweight, serverless database perfect for self-hosting
  • Automatic Backups: Daily automated backups with rotation
  • Data Portability: Single file database for easy migration
  • No External Dependencies: Everything runs locally

πŸ”„ Recurring Invoice System

Slimbooks includes a powerful recurring invoice system for automated billing:

Features

  • πŸ“… Flexible Scheduling: Weekly, monthly, quarterly, yearly, or custom frequencies
  • πŸ€– Automated Processing: Cron job integration for hands-off billing
  • πŸ‘₯ Client-Specific Templates: Create recurring templates for each client
  • πŸ’° Dynamic Pricing: Support for line items, taxes, and shipping
  • πŸ“Š Processing Statistics: Monitor template performance and processing status
  • ⚑ Manual Triggers: Process individual templates or all due templates on-demand

API Endpoints

/api/recurring-templates/*    - Template CRUD operations
/api/cron/recurring-invoices  - Automated processing endpoint

Template Management

  • Create recurring templates with client association
  • Set payment terms and due date calculations
  • Activate/deactivate templates as needed
  • Track next invoice dates automatically
  • Monitor processing history and errors

πŸ”’ Security Features

  • πŸ›‘οΈ Rate Limiting: Protection against brute force attacks (100 req/15min)
  • πŸ” JWT Authentication: Secure token-based auth with configurable expiration
  • 🚫 Input Validation: Server-side validation prevents injection attacks
  • πŸ”’ Security Headers: Comprehensive protection with Helmet.js
  • πŸ‘€ Account Lockout: Automatic lockout after failed login attempts
  • πŸ”‘ 2FA Support: Two-factor authentication for enhanced security
  • πŸ“ Audit Logging: Request/response logging for security monitoring

πŸ“š Documentation

πŸ”§ Management Commands

# Update deployment
./scripts/deploy.sh

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

# Generate new certs for ssl
./scripts/generate-ssl-certs.sh

πŸ“„ License

MIT License - see LICENSE for details.


πŸ’¬ Support & Community

Found a bug? Have a feature request? Please open an issue.


🏠 Self-hosted β€’ πŸ”’ Secure β€’ πŸš€ Production-ready

Perfect for small businesses, freelancers, and anyone who values data privacy and control.

About

A secure, self-hosted billing and invoice management application built with React, TypeScript, and SQLite. Create, manage, and track invoices with complete control over your financial data. Perfect for small businesses, freelancers, and service providers who prioritize privacy and data ownership.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Contributors