← Writing

Post

TUI Inventory App

A terminal inventory manager built with Rust and Cursive: create, list and delete items, persisted in a flat JSON file.

11 October 2024 Anatolii Maltsev 1 min read Making & side quests rust tui project

An old-school terminal-based inventory management system built with Rust and Cursive. Built with cursive 0.21.1.

GitHub Repository

This project is an experiment in building a Text User Interface application with the Cursive library, a TUI framework for Rust. Inspired by classic terminal apps, it manages a simple inventory of products with full keyboard interaction.

It suits Rust learners and enthusiasts exploring terminal UI development.

Tools and stack

  • rust 1.83.0
  • cursive 0.21.1
  • CI

Features

  1. Create and save items. Define the product type, set the quantity and input the price per unit.

  2. Display all items. View the inventory in a structured list, with the total price and sales tax calculated automatically.

  3. Delete items. Remove an item by specifying its ID.

  4. Local JSON-based database. Persistent storage using a flat file database, with the path defined as:

    const FILE_PATH: &str = "products.json";

Demo

Terminal recording of the inventory app being launched and navigated with the keyboard to add, list and delete products

Installation and run

  1. Clone the repository:

    git clone https://github.com/maltsev-dev/inventory_system_app
    cd inventory_system_app
  2. Build the project:

    cargo build --release
  3. Run the app:

    cargo run

License

This project is licensed under the MIT License. Free to use, modify and distribute.

Neighbors in time

when name
2024-10 Actix-Web Server Read →
2024-10 TUI Pomodoro App Read →

Related: the posts that share this one's subject, and where the thread goes next.