Skip to content
/ buy-more Public

RustBuy is a simple command-line interface (CLI) e-commerce application built in Rust, designed specifically to help you understand and practice working with terminal user interfaces (TUI) in Rust.

License

Notifications You must be signed in to change notification settings

ffex/buy-more

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RustBuy

RustBuy is a simple command-line interface (CLI) e-commerce application built in Rust, designed specifically to help you understand and practice working with terminal user interfaces (TUI) in Rust.

A gif demo of the script

The above example was generated with VHS

Overview

RustBuy allows users to browse available products, add them to an order, view the cart, and complete checkout. The application calculates taxes and discounts based on predefined thresholds.

Key Features

  • Product Management: Display all available products.
  • Order Management: Add products to the cart and calculate the total.
  • Tax and Discount Calculation: Automatically apply taxes and discounts based on purchase amount.

Getting Started

Prerequisites

  • Rust programming language (>= 1.56.0)
  • Cargo package manager

Installation

git clone https://github.com/federicobassini/rust-buy-more.git
cd rust-buy-more
cargo build --release

Running the Application

After building, run the application with:

cargo run --release

Usage

The application presents a simple menu-driven interface. Users can navigate through various options using numbers (1 to 5) corresponding to each action.

Menu Options

  • Show products: Displays all available products.
  • Make an order: Add selected products to the cart and start checkout.
  • Show cart: View current items in the cart and their total.
  • Checkout: Complete the purchase, including tax and discount calculations.
  • Exit: Quit the application.

Contributing

The project had the goal of learning Rust and practicing TUI development. Contributions are welcome!

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

RustBuy is a simple command-line interface (CLI) e-commerce application built in Rust, designed specifically to help you understand and practice working with terminal user interfaces (TUI) in Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages