/Ruby-Capstone

Primary LanguageRubyMIT LicenseMIT

Catalog my things!

πŸ“— Table of Contents

πŸ“– Ruby Capstone: Cathalog my things

Cathalog my things is a console app, built with Ruby, that allows the user to store, and catalog all sorts of things, such as books, games, and music albums. The user can also place additional information on the items, labels, authors, and genre. It provides a simple and intuitive interface for adding items, listing them by category, and performing various operations. All data is going to be stored in separate JSON files, to ensure that the user input will be saved. Additionally, you can store the data in a corresponding database for future scalability. The program is structured according to the UML CLASS DIAGRAM.

πŸ›  Built With

Tech Stack

Backend
Database

(back to top)

Key Features

Catalog Management:

  • Ability to list all books, music albums, games, genres, labels, and authors.
  • Add new books, music albums, and games to the catalog.
  • View details of individual items, including their properties and associated authors/labels.

Data Storage and Persistence:

  • JSON file storage: Save and load catalog data from JSON files.
  • Automatic archiving: Items older than 10 years are automatically archived.

Class Structure and Inheritance:

  • Use of object-oriented programming principles.
  • Class hierarchy: Item class as the base class, with specific item types (books, music albums, games) inheriting from it.
  • Author class to represent authors and their association with items.

Data Validation and Error Handling:

  • Validate user input for date formats and other required fields.
  • Handle errors gracefully and provide meaningful error messages.

Menu-Based Interface:

  • Display a menu of options for users to select from.
  • Input validation to ensure the user selects a valid option.

Test Coverage:

  • Unit tests for important classes and methods using a testing framework (e.g., RSpec).

Linter Integration:

  • Use a linter (e.g., RuboCop) to enforce a consistent coding style and identify potential issues.

(back to top)

Live Demo

You can find the live demo that we did in this link

(back to top)

πŸ’» Getting Started

If you would like to get a local copy up and running, please follow these steps.

Prerequisites

In order to run this project you need to have ruby installed in your computer. You can check that by running ruby -v in your console

If you do not have ruby installed in your computer, you can follow this tutorial (for Windows)

For MacOS you can run the following commands:

brew install rbenv ruby-build
# Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile

# Install Ruby
rbenv install 3.0.1
rbenv global 3.0.1
ruby -v

Setup

Clone this repository to your desired folder:

cd my folder
git clone  https://github.com/hernandanielzamora/Ruby-Capstone.git

Install

In order to fully make use of all the features you must run:

bundle install

Usage

To run the project, you should run:

ruby main.rb

Run tests

To run tests, you can use the following command:

rspec spec

Deployment

To deploy this project locally, you can run:

ruby main.rb

πŸ‘₯ Authors

πŸ‘₯ Author: HernΓ‘n Zamora

πŸ‘₯ Author: Nshanji Hilary Ndzi

πŸ‘₯ Author: TUMBU BARTHOLOMEW ELAD

(back to top)

πŸ”­ Future Features

  • User interface
  • Adding more functions:
    • List all movies
    • List all sources (e.g. 'From a friend', 'Online shop')
    • Add a movie
  • Building full front-end

(back to top)

🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

If you like this project please express your appreciation on LinkedIn.

(back to top)

πŸ™ Acknowledgments

I would like to thank Microverse for teaching me Ruby.

(back to top)

πŸ“ License

This project is MIT licensed.

(back to top)