Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

CST 336: Fall 2019 - Final Project Documentation

Students: ​Marcus Gonzalez, Adam Houser, Jason Pettit, Colin Reed


Title: ​Pentagration Candy Company

Description: ​Our project created a Candy Store website, where customers can shop for their
favorite candy bars. Users can shop for candy bars and other selection criteria and can put
them in their shopping cart and checkout. Administrators are able to add, update, and delete
records. Reports are available for the administrator to run.

Database: ​The data for our application is stored in cst336_db026

Mockup:
● Home page: Allows users to see available items, they click on a cart icon to put items in
their cart. They can change the list of items they are viewing based on the bars having
nuts or not. If a user reloads their cart is preserved in the database.
● Cart: shows the images of the items in the cart, price, quantity, line item total and overall
total in the cart.
● Admin login page: requests and validates admin email address and password (use:
email = ​admin@p5.com​ password = secret to login)
● Admin page: update existing items, add items, delete items, and get reports.

Database Schema:
● p_bars: contains the item data name, wrapper color, nuts (yes/no), type of nut, size of
the bar in ounces, and price. Images are referenced by the bar_id where the image
names are all bar_id.jpg.
● p_cart : tracks the data on the items that have been placed in the cart by the user.
● p_inventory: tracks the inventory levels of the items
● p_authentication: is used for managing the administrator usernames and passwords.
Screenshots:
Navbar​ is uniform across all pages. Focus changes when navigating to different pages.
Clicking Pentagration Candy Company takes you to the homepage.
After logging out you are taken to the homepage.

There are three cart icons: ​Cart empty, cart full, out of stock 
Cart empty and cart full can be toggled, out of stock cannot be toggled. 

Item list​ shows a picture of the candy and details


collected from the database. Items are either in the
cart or not in the cart based on clicking on an item.
Clicking on the item adds it to the p_cart table of the
database. The cart is persistent if you leave the
homepage and come back the icons will reflect the
state stored in the database by reading the cart
information.

Filter buttons ​Users can change the items shown on the homepage by
clicking on the buttons.

The cart buttons continue to work when clicked in each filtered view and
update the cart.
Cart ​displays contents with
picture, price, quantity, and line
item total. Cart Total is also
displayed with data provided by
the p_cart table in the database.

Admin login page ​Nav bar


focuses for each page. Login
page uses a bootstrap template.
Authentication is compared
against the p_authentication
data in the database

Admin table​ is pre-populated with data from the database. Values can be changed and will
take effect with the update item button. Items can also be deleted.

Add item ​lower on the admin page items can be added to the database.

Reports ​below the insert item form there is a reports section.


Rubric:
Minimum requirements: 

Documentation must include Title, Description, Mockup, Database Schema and Screenshots  -20pts 
(documentation meets requirements) 
(if 
Project must use at least four database tables  
(p_bars, p_cart, p_authentication, p_inventory)  missing any) 

The combined database tables must have at least ten fields  


(We have 4 tables, with >20 fields) 

One of the database table must have at least 20 records  


(p_bars has 20 candy bars) 

Feature requirements: 

There is a "user" section in which users can search and filter data using at least three fields  10pts 
(Yes, the user can filter selection by clicking on buttons which query three different fields p_bars.nut, 
p_bar.wrap_color, p_inventory.qty_instock) 

Users can add items to a shopping cart   10pts 


(Yes, the user can add items by clicking on the shopping cart next to an item, or modifying them when viewing 
their cart) 

Users can see all items in their cart (Total cost is also displayed)  10pts 
(Yes, by going to the cart view the user can see their items and the total) 

Administrators can login and logout from the system  10pts 


(Yes, from the admin page you can enter email address= admin@p5.com password= secret) 

Administrators can update content of at least one table (using pre-populated data in the form)  10pts 
(Yes, after logging in the administrator is given the ability to modify the pre-populated data for existing items, 
update / delete buttons update the database also) 

Administrators can insert new records in at least one table  10pts 


(Yes, New items can be added in the form below the main admin table) 

Administrators can delete records  10pts 


(Yes, the administrator can delete items by clicking on a button) 

Administrators can generate at least three reports, which use aggregate functions (e.g., average price of all  10pts 
products in the table) 
(Yes, the administrator can get average price, average calories, and a table of results for the color of the candy 
wrappers) 

Project uses at least two AJAX calls with their corresponding Web APIs.   10pts 
As part of your submission, please explain where the AJAX calls are. 
(Yes, there are numerous Ajax calls initiated in the functions.js file inside the public/js folder) 

Project has a nice and consistent design (preferably, use Bootstrap)  10pts 
(Yes, we used a bootstrap template and made modifications for our purpose on the main page, we also used 
another bootstrap template for the admin login page.) 

You might also like