Your go-to command-line bookstore. ๐๐ฑ
- Clone this GitHub Repository
- Make sure you have PostgreSQL installed and configured on your machine. You can download it here if you don't already have it.
- Create a fresh PostgreSQL database with the name 'bookstore'.
- You can do this in PgAdmin or with the command
CREATE DATABASE bookstore
- You can do this in PgAdmin or with the command
- Use the
DDL.sql
file in this repository to create the tables in the bookstore database. - Use the
smallRelationsInsertFile.sql
file in this repository to seed the database with some sample data. - In the
initialize()
method in themodel.rb
file in the repository change the password to your PostgreSQL password where it says'insert your password here'
- In the terminal run
bundle install
to install all dependencies required to run this project - In the terminal run
rake
to begin using the application.
Note: If you need help with the set up process please don't hesitate to contact me at [email protected]
Login or create an account. Here is the login menu:
- Select 1 to login. Feel free to use the accounts below:
account 1 (customer account) username: cherryIrma password: huskyape account 2 (owner account) username: senatorHanna password: resistmaterial
Select 2 to login create an account. Enter the information you are prompted to enter.
Enter any search query to explore our collection of books. For example:
After you search for a book, you can add the book to your cart, view more details on it or make another search.
Please note that when you select a book you must identify it by the identifying integer on its right hand side wrapped in square brackets. For example:
You may track an order by entering the order_id associated with your order.
Displays all books in your cart and your purchase information. Prompts you to check out.
You may add a book to your store's offering by entering the details of the book and the quantity availiable.
You may remove a book to your store's offering by entering the isbn of the book.
When you choose to view reports, you will be met with a report menu. Select the report you would like to view.
Note: These reports are based on a database that has been used for several purchases. To see meaningful reports you will have to buy a few books with the customer account first
For example, here is the report that displays sales by genre.
Here is the report that display sales by author.
Here is the report that displays total sales.