Skip to content

A terminal-based Invoice Management System with unique invoice number built in Rust using Ratatui. a TUI interface for managing invoices, and PDF invoice generation support.

License

Notifications You must be signed in to change notification settings

shayyz-code/invoice-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

             _____ _   ___      ______ _____ _____ ______      _____   _____
            |_   _| \ | \ \    / / __ \_   _/ ____|  ____|    |  __ \ / ____|
              | | |  \| |\ \  / / |  | || || |    | |__ ______| |__) | (___
              | | | . ` | \ \/ /| |  | || || |    |  __|______|  _  / \___ \
             _| |_| |\  |  \  / | |__| || || |____| |____     | | \ \ ____) |
            |_____|_| \_|   \/   \____/_____\_____|______|    |_|  \_\_____/

Rust Ratatui Crossterm License: MIT Status

A terminal-based feature-rich Invoice Management System built in Rust using Ratatui.

a TUI interface for managing invoices, and PDF invoice generation support.

Features

  • Add / Edit / View Invoices directly in your terminal
  • 6 Random Invoice Numbers excluding existing ones
  • Persistent storage (SQLite planned)
  • PDF Invoice Generation using headless_chrome
  • Modular architecture with clear file separation

Project Structure


src/
├── main.rs         # App entry point
├── app.rs          # Application state and mode handling
├── models.rs       # Models and related methods
├── db.rs           # Database operations and models
├── pdf.rs          # PDF invoice generation
├── utils.rs        # Utility functions for invoice generation
└── ui
    ├── mod.rs          # UI mod file
    ├── layout.rs       # layout and styling
    ├── splash.rs       # Splash screen UI
    ├── form.rs         # Add/Edit invoice form
    ├── modal.rs        # Modal UI element
    └── button.rs       # Button UI element

Getting Started (For Development)

1. Prerequisites

  • Rust (latest stable)
  • A terminal that supports colors

2. Clone the Repository

git clone https://github.com/shayyz-code/invoice-rs.git
cd invoice-rs

3. Run the App

cargo run

The app will start with an animated INVOICE-RS splash screen, then open the invoice TUI.

Controls

Key Action
Tab Switch between input fields in the invoice form
Enter Confirm and save invoice
Esc Cancel current action
↑ / ↓ Navigate invoice list
q Quit the app
n New invoice
e Edit invoice
d Delete invoice
s Save invoice
p Export invoice pdf

Tech Stack and Crates

  • Language: Rust
  • UI Framework: Ratatui
  • Event Handling: Crossterm
  • Random IDs: Rand
  • PDF Generation: Headless Chrome
  • Database: Sqlite / Serde

Contributions are always welcome <3

Contributions Welcome

Open an issue or create a pull request to help improve invoice-rs

License

MIT License © 2025 Aung Min Khant

invoice-rs — where invoices meet terminal art.

About

A terminal-based Invoice Management System with unique invoice number built in Rust using Ratatui. a TUI interface for managing invoices, and PDF invoice generation support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published