diff --git a/SRS.md b/SRS.md
new file mode 100644
index 00000000..527b659f
--- /dev/null
+++ b/SRS.md
@@ -0,0 +1,204 @@
+# Software Requirements Specification Document
+
+This serves as a template for each projects' Software Requirements Specification (SRS) document. When filling this out, you will be required to create user stories, use cases, requirements, and a glossary of terms relevant to your project. Each group member must contribute to every section, so it is crucial that your group's GitHub repository shows a commit history that reflects the work of each group member. It is highly recommended that you create separate branches for each member, but since this is one single document, you will need to manually merge the branches together. It is also advisable to have multiple working versions of this document (named separately) so that one person can compile the final SRS document from the multiple working versions. Ultimately, how you go about managing this is up to you, but consistent formatting, clear commit messages, and a thorough commit history with contributions from each group member are required.
+
+Fill the document out following the guidelines listed in each section. Maintain [proper Markdown syntax](https://www.markdownguide.org/basic-syntax/) and be sure that your group has a `main` branch with this document and the entire [template repository codebase](https://github.com/david-gary/onlineStoreTemplate) either forked or downloaded and copied into your group's repository. If you have arranged to use a different codebase as a template, you do not need to have the original template included, but a `main` branch is still required.
+
+## Group Members
+
+* [Vishal Dasari](mailto:vdasari1@uncc.edu)
+
+## Revisions
+
+When a change is made to the document, a new revision should be created. The revision should be added to the table below with all information filled out.
+
+| Version | Date | Description | Author | Reviewed By |
+| --- | --- | --- | --- | --- |
+| 1.0 | 03/22/23 | Initial draft | [David Gary](mailto:dgary9@uncc.edu) | [David Gary](mailto:dgary@uncc.edu) |
+| 1.1 | 04/23/23 | Added Name | [Vishal Dasari](mailto:vdasari1@uncc.edu) | [Vishal Dasari](mailto:vdasari1@uncc.edu) |
+| 1.2 | 05/2/23 | Worked on Table of Contents (1-3) | [Vishal Dasari](mailto:vdasari1@uncc.edu) | [Vishal Dasari](mailto:vdasari1@uncc.edu) |
+| 1.3 | 05/5/23 | Worked on Table of Contents (4-6) | [Vishal Dasari](mailto:vdasari1@uncc.edu) | [Vishal Dasari](mailto:vdasari1@uncc.edu) |
+
+## Table of Contents
+
+1. [Introduction](#introduction)
+2. [Requirements](#requirements)
+3. [Constraints](#constraints)
+4. [Use Cases](#use-cases)
+5. [User Stories](#user-stories)
+6. [Glossary](#glossary)
+
+## Introduction
+In this section, you should give a brief overview of what your project will be. Describe the software system you are building and what problems it solves. You should also give a short description of the stakeholders (users of the system) and what their needs are. There is no set formatting requirement, but you should maintain a consistent structure across future sections. Not all members must contribute to this section.
+
+The software system that I will be building is an online gaming store. The program would display an image of the games a user could buy or rent. Stakeholders would be the users who would like to buy/rent the video games out. The stakeholder's needs would be the item that they would like to acquire.
+
+## Requirements
+
+Each group member must supply at least three functional requirements for the project. Each requirement should be written in the following format:
+
+**REQ-1:** Allow users to create an account and login.
+ * **Description:** To access an existing user information.
+ * **Type:** Functional
+ * **Priority:** 1
+ * **Rationale:** Users need an account to purchase/rent games and access their saved games.
+ * **Testing:** Ensure the username and the password matches with our server
+* **REQ-2:** Creating New Account
+ * **Description:** To have access to the respected user's page.
+ * **Type:** Functional
+ * **Priority:** 1
+ * **Rationale:** Needed to access user's account
+ * **Testing:** Create an account and verify that login works as expected.
+* **REQ-3: Display a list of available games for purchase/rental**
+ * **Description: User will be able to look at the latest updates games available**
+ * **Type:** Functional
+ * **Priority:** 1
+ * **Rationale:** This is the core functionality of the system.
+ * **Testing:** Ensure that the list of games displayed is accurate and up-to-date.
+* **REQ-4: Allow users to add game(s) to the shopping cart**
+ * **Description: To have access to adding games to your shopping cart.
+ * **Type:** Functional.
+ * **Priority:** 1
+ * **Rationale:** Users may want to save games for later or purchase multiple games at once.
+ * **Testing:** Add a game to the cart/wish list and verify that it is displayed in the appropriate section.
+* **REQ-5**: Allow users to filter games based on genre.
+ * **Description:** User will be able to filter thorugh different genres.
+ * **Type:** Functional
+ * **Priority:** 2
+ * **Rationale:** Users may want to browse games within a specific genre.
+ * **Testing:** Check if the filter displays only games that match the selected genre.
+* **REQ-6**: Allow users to search for games by title or keyword.
+ * **Description**: Displays current book info
+ * **Type:** Functional
+ * **Priority:** 2
+ * **Rationale:** Users may want to search for specific games they have in mind.
+ * **Testing:** Search for a known game title and verify that it is displayed in the search results.
+* **REQ-7** Display game details such as title, description, release date, and rating.
+ * **Description:** Allows users to learn more about the game, ratings, and price etc.
+ * **Type:** Functional
+ * **Priority:** 2
+ * **Rationale:** Users need to know more about a game before deciding to purchase/rent it.
+ * **Testing:** Verify that game details displayed are accurate and match the selected game.
+* **REQ-8** Allow users to view their order history.
+ * **Description:** Displays user's order history.
+ * **Type:** Fuctional
+ * **Priority:** 2
+ * **Rationale:** Users may want to view past purchases or rentals.
+ * **Testing:** Verify that the order history displays accurate information about past purchases/rentals.
+* **REQ-9** Rate/Review games.
+ * **Description:** Allow users to rate and review games.
+ * **Type:** Functional
+ * **Priority:** 3
+ * **Rationale:** User reviews and ratings can help other users make informed decisions.
+ * **Testing:** Verify that users can rate and review games, and that the ratings and reviews are displayed correctly.
+* **REQ-10** Provide customer support and contact information
+ * **Description:** Provides customer support and contact information to the user
+ * **Type:** Functional
+ * **Priority:** 4
+ * **Rationale:** Users may need help with purchasing or rental issues.
+ * **Testing:** Verify that the customer support and contact information is accurate and up-to-date.
+* **REQ-11** Shipping Information
+ * **Description:** Asks user to enter your shipping information.
+ * **Type:** Functional
+ * **Priority:** 4
+ * **Rationale:** Users will get this option at the time of the payment.
+ * **Testing:** Enter the shiping information and see that it shows in the system.
+* **REQ-12** Payment Method/Information
+ * **Description:** Asks the user for their payment information.
+ * **Type:** `Functional`
+ * **Priority:** 4
+ * **Rationale:** It is one of the last steps for buying a game.
+ * **Testing:** Verify the payment information in the system.
+
+## Constraints
+
+In this section, you should list any constraints that you have for the project. Each group member must supply at least two constraints. These can be constraints on the project itself, the software system, or the stakeholders. Constraints can be anything that limits the scope of the project. For example, that this project's template code is written using Flask and Python constitutes a constraint on the backend of the project. Constraints can also be things like the required timeline of the project. Be creative.
+
+* **Constraint 1:**
+I am able to use either python, html, javascript, or flask only.
+* **Constraint 2:**
+I am working alone in this project
+* **Constraint 3:**
+No discussion or guidance from my groupmates for any cross-reference.
+* **Constraint 4:**
+The website should not crash
+* **Constraint 5:**
+The entire project should be finished within last day of final project submission.
+
+## Use Cases
+
+In this section, you should list use cases for the project. Use cases are a thorough description of how the system will be used. Each group member must supply at least two use cases. Each use case should be written in the following format:
+
+* **UC-1:** User Account Creation
+ * **Description:** A new user creates an account to access the system.
+ * **Actors:** User
+ * **Preconditions:** None
+ * **Postconditions:** The user has successfully created an account and can log in to the system.
+* **UC-2:** User Login
+ * **Description:** An existing user logs into their account to access the system.
+ * **Actors:** User
+ * **Preconditions:** The user must have already created an account.
+ * **Postconditions:** The user has successfully logged in and can access their account page.
+* **UC-3:** Browse Games
+ * **Description:** A user browses through the available games on the system.
+ * **Actors:** User
+ * **Preconditions:** The user must be logged in.
+ * **Postconditions:** The user has browsed through the available games and can view more details about a specific game.
+* **UC-4:** Purchase/Rent Game
+ * **Description:** A user purchases or rents a game.
+ * **Actors:** User
+ * **Preconditions:** The user must be logged in and have selected a game to purchase or rent.
+ * **Postconditions:** The user has successfully purchased or rented a game and can access it in their account.
+* **UC-5:** View Order History
+ * **Description:** A user views their order history.
+ * **Actors:** User
+ * **Preconditions:** The user must be logged in and have made previous purchases/rentals.
+ * **Postconditions:** The user has successfully viewed their order history.
+* **UC-6:** Provide Customer Support
+ * **Description:** A user contacts customer support for assistance.
+ * **Actors:** User, Customer Support Representative
+ * **Preconditions:** The user must be logged in and have an issue that requires assistance.
+ * **Postconditions:** The user's issue is resolved or a solution is provided to the user.
+* **UC-7:** Enter Shipping Information
+ * **Description:** User enters shipping information during the checkout process.
+ * **Actors:** User
+ * **Preconditions:** User has selected the game they wish to purchase and has proceeded to the checkout process.
+ * **Postconditions:** User's shipping information is saved in the system and is displayed on the order confirmation page.
+ * **UC-8:** Enter Payment Information
+ * **Description:** User enters payment information during the checkout process.
+ * **Actors:** User
+ * **Preconditions:** User has selected the game they wish to purchase, has entered their shipping information, and has proceeded to the payment section of the checkout process.
+ * **Postconditions:** User's payment information is saved in the system, the payment is processed, and the user is redirected to the order confirmation page.
+
+## User Stories
+
+In this section, you should list user stories for the project. User stories are a short description of how a user will be interacting with the system. Each group member must supply at least two user stories. Each user story should be written in the following format:
+
+* **US-1:**
+ * **Type of User:** Customer
+ * **Description:** As a customer, I want to be able to filter games by genre so that I can find games that fit my interests easily. I expect to see a list of games that match my chosen genre.
+* **US-2:**
+ * **Type of User:** Customer
+ * **Description:** As a customer, I want to be able to search for games by title so that I can find a specific game I'm interested in. I expect to be able to see the game's details once I've found it.
+* **US-3:**
+ * **Type of User:** Customer
+ * **Description:** As a customer, I want to be able to see the system requirements for a game so that I can determine if my computer can run it. I expect to see a clear list of minimum and recommended requirements.
+* **US-4:**
+ * **Type of User:** Customer
+ * **Description:** As a customer, I want to be able to read reviews and ratings from other users before deciding to purchase or rent a game. I expect to see an overall rating and a selection of reviews.
+* **US-5:**
+ * **Type of User:** Customer
+ * **Description:** As a customer, I want to be able to see my cart's contents at all times and the total cost so that I can keep track of my purchases. I expect to be able to easily remove items from my cart if needed.
+
+## Glossary
+
+In this section, you should list any terms that are used in the document that may not be immediately obvious to a naive reader. Each group member must supply at least one term. Each term should be written in the following format:
+
+* **Term:** User
+ * **Definition:** A person who interacts with the system to browse and purchase games.
+* **Term:** Account
+ * **Definition:** A user's personal profile in the system that contains their personal information and order history.
+* **Term:** Checkout Process
+ * **Definition:** The series of steps that a user must follow to complete a purchase or rental of a game, including entering shipping and payment information.
+* **Term:** Customer Support Representative
+ * **Definition:** An individual who assists users in resolving issues and answering questions related to the system
diff --git a/app.py b/app.py
index adcee448..68e86d50 100644
--- a/app.py
+++ b/app.py
@@ -2,7 +2,7 @@
from authentication.authTools import login_pipeline, update_passwords, hash_password
from database.db import Database
-from flask import Flask, render_template, request
+from flask import Flask, flash, render_template, request
from core.session import Sessions
app = Flask(__name__)
diff --git a/authentication/authTools.py b/authentication/authTools.py
index e9b8f933..91061c50 100644
--- a/authentication/authTools.py
+++ b/authentication/authTools.py
@@ -107,6 +107,7 @@ def login_pipeline(username: str, password: str) -> bool:
if line.split(":")[0] == username:
salt = line.split(":")[1]
key = line.split(":")[2]
+
return check_password(password, salt, key)
return False
diff --git a/authentication/packages.png b/authentication/packages.png
new file mode 100644
index 00000000..f20677a0
Binary files /dev/null and b/authentication/packages.png differ
diff --git a/authentication/packages.puml b/authentication/packages.puml
new file mode 100644
index 00000000..80d19a41
--- /dev/null
+++ b/authentication/packages.puml
@@ -0,0 +1,7 @@
+@startuml packages
+set namespaceSeparator none
+package "authentication" as authentication #aliceblue {
+}
+package "authentication.authTools" as authentication.authTools #aliceblue {
+}
+@enduml
diff --git a/authentication/packages_initial.png b/authentication/packages_initial.png
new file mode 100644
index 00000000..f20677a0
Binary files /dev/null and b/authentication/packages_initial.png differ
diff --git a/authentication/packages_initial.puml b/authentication/packages_initial.puml
new file mode 100644
index 00000000..80d19a41
--- /dev/null
+++ b/authentication/packages_initial.puml
@@ -0,0 +1,7 @@
+@startuml packages
+set namespaceSeparator none
+package "authentication" as authentication #aliceblue {
+}
+package "authentication.authTools" as authentication.authTools #aliceblue {
+}
+@enduml
diff --git a/core/classes.png b/core/classes.png
new file mode 100644
index 00000000..aaf92c89
Binary files /dev/null and b/core/classes.png differ
diff --git a/core/classes.puml b/core/classes.puml
new file mode 100644
index 00000000..fd268d26
--- /dev/null
+++ b/core/classes.puml
@@ -0,0 +1,45 @@
+@startuml classes
+set namespaceSeparator none
+class "Sessions" as core.session.Sessions #aliceblue {
+ sessions : dict
+ add_new_session(username: str, db: Database) -> None
+ get_all_sessions() -> dict
+ get_session(username: str) -> UserSession
+ remove_session(username: str) -> None
+}
+class "UserSession" as core.session.UserSession #aliceblue {
+ cart : dict
+ date : datetime, NoneType
+ db : Database
+ total_cost : int
+ username : str
+ add_new_item(id: str, name: str, price: int, quantity: int, discount: float, tax_rate: float) -> None
+ empty_cart() -> dict
+ is_item_in_cart(id: str) -> bool
+ remove_item(id: str) -> None
+ submit_cart() -> None
+ update_item_quantity(id: str, change_to_quantity: int) -> None
+ update_total_cost() -> None
+ delete_cart(id:str) -> None
+}
+class "UserFilter" as core.session.UserFilter #aliceblue{
+ db : Database
+ result : array
+ filterByRatingHigh() -> array
+ filterByRatingLow() -> array
+ filterByGenre(genre:str) -> array
+ filterByDate(date:str) -> array
+ filterByStars(stars:int) ->array
+ filterByDateOld() -> array
+ filterByDateNew() -> array
+}
+class "Game" as core #aliceblue{
+ title: String
+ price : float
+ rating: int
+ genre: String
+ cover: String
+ date: datetime
+ getters&setters()
+}
+@enduml
diff --git a/core/classes_intial.puml b/core/classes_intial.puml
new file mode 100644
index 00000000..9c62d774
--- /dev/null
+++ b/core/classes_intial.puml
@@ -0,0 +1,24 @@
+@startuml classes
+set namespaceSeparator none
+class "Sessions" as core.session.Sessions #aliceblue {
+ sessions : dict
+ add_new_session(username: str, db: Database) -> None
+ get_all_sessions() -> dict
+ get_session(username: str) -> UserSession
+ remove_session(username: str) -> None
+}
+class "UserSession" as core.session.UserSession #aliceblue {
+ cart : dict
+ date : datetime, NoneType
+ db : Database
+ total_cost : int
+ username : str
+ add_new_item(id: str, name: str, price: int, quantity: int, discount: float, tax_rate: float) -> None
+ empty_cart() -> dict
+ is_item_in_cart(id: str) -> bool
+ remove_item(id: str) -> None
+ submit_cart() -> None
+ update_item_quantity(id: str, change_to_quantity: int) -> None
+ update_total_cost() -> None
+}
+@enduml
diff --git a/core/packages.png b/core/packages.png
new file mode 100644
index 00000000..d68ad8e7
Binary files /dev/null and b/core/packages.png differ
diff --git a/core/packages.puml b/core/packages.puml
new file mode 100644
index 00000000..9ffa5cec
--- /dev/null
+++ b/core/packages.puml
@@ -0,0 +1,10 @@
+@startuml packages
+set namespaceSeparator none
+package "core" as core #aliceblue {
+}
+package "core.session" as core.session #aliceblue {
+}
+package "core.utils" as core.utils #aliceblue {
+}
+core.session --> core.utils
+@enduml
diff --git a/core/packages_initial.png b/core/packages_initial.png
new file mode 100644
index 00000000..d68ad8e7
Binary files /dev/null and b/core/packages_initial.png differ
diff --git a/core/packages_initial.puml b/core/packages_initial.puml
new file mode 100644
index 00000000..9ffa5cec
--- /dev/null
+++ b/core/packages_initial.puml
@@ -0,0 +1,10 @@
+@startuml packages
+set namespaceSeparator none
+package "core" as core #aliceblue {
+}
+package "core.session" as core.session #aliceblue {
+}
+package "core.utils" as core.utils #aliceblue {
+}
+core.session --> core.utils
+@enduml
diff --git a/database/Contact.html b/database/Contact.html
new file mode 100644
index 00000000..b0571f87
--- /dev/null
+++ b/database/Contact.html
@@ -0,0 +1,47 @@
+
+
+
+ Customer Support and Contact Information
+
+
+
+
+
+
+
Customer Support and Contact Information
+
+
+
+
+
Contact Us
+
If you need any help with purchasing or rental issues, please feel free to contact us:
+
+
Email: support@mygamestore.com
+
Phone: 1-800-MY-GAMES (1-800-694-2637)
+
Live Chat: Click the chat icon in the bottom right corner
+
+
+
+
+
FAQs
+
Here are some frequently asked questions:
+
+
How can I cancel an order? You can cancel an order by logging into your account and going to the order history page. If the order hasn't shipped yet, you can cancel it from there.
+
How can I return a game? You can return a game within 30 days of purchase. Log into your account, go to the order history page, and click on the "return" button next to the game you want to return.
+
How can I check the status of my order? You can check the status of your order by logging into your account and going to the order history page. The status of each order will be displayed there.
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/database/Game-store.html b/database/Game-store.html
new file mode 100644
index 00000000..87360aae
--- /dev/null
+++ b/database/Game-store.html
@@ -0,0 +1,364 @@
+
+
+
+ My Game Store
+
+
+
+
+
+
+
+
+
+
+
+
Welcome to My Game Store
+
Discover and play the latest video games
+
+
+
+
+
+
+
+
Featured Games
+
+
+
+
Ghost of Tsushima
+
Price: $59.99
+
+
+
+
+
Assassin's Creed Valhalla
+
Price: $49.99
+
+
+
+
+
Cyberpunk 2077
+
Price: $39.99
+
+
+
+
+
+
+
+
+
Our Games
+
+
+
+
God of war
+
Price: $19.99
+
+
+
+
Rate and Review Game
+
+
+
+
+
FIFA 23
+
Price: $22.99
+
+
+
+
Rate and Review Game
+
+
+
+
+
+
+
+
+
+
+
About Us
+
We are a team of gamers who love to share our passion with others. Our goal is to provide a great selection of games at affordable prices, and to offer the best customer service possible.
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/database/Shipping.html b/database/Shipping.html
new file mode 100644
index 00000000..c78486a4
--- /dev/null
+++ b/database/Shipping.html
@@ -0,0 +1,82 @@
+
+
+
Enter Shipping Information
+
+
+
\ No newline at end of file
diff --git a/database/cart.html b/database/cart.html
new file mode 100644
index 00000000..245cc79c
--- /dev/null
+++ b/database/cart.html
@@ -0,0 +1,155 @@
+
+
+
+
+
diff --git a/database/packages.png b/database/packages.png
new file mode 100644
index 00000000..32788095
Binary files /dev/null and b/database/packages.png differ
diff --git a/database/packages.puml b/database/packages.puml
new file mode 100644
index 00000000..841a5b84
--- /dev/null
+++ b/database/packages.puml
@@ -0,0 +1,7 @@
+@startuml packages
+set namespaceSeparator none
+package "database" as database #aliceblue {
+}
+package "database.db" as database.db #aliceblue {
+}
+@enduml
diff --git a/database/packages_initial.png b/database/packages_initial.png
new file mode 100644
index 00000000..32788095
Binary files /dev/null and b/database/packages_initial.png differ
diff --git a/database/packages_initial.puml b/database/packages_initial.puml
new file mode 100644
index 00000000..841a5b84
--- /dev/null
+++ b/database/packages_initial.puml
@@ -0,0 +1,7 @@
+@startuml packages
+set namespaceSeparator none
+package "database" as database #aliceblue {
+}
+package "database.db" as database.db #aliceblue {
+}
+@enduml
diff --git a/database/schema.sql b/database/schema.sql
index 0f874ee8..94a744fd 100644
--- a/database/schema.sql
+++ b/database/schema.sql
@@ -1,5 +1,5 @@
CREATE TABLE inventory (
- id INTEGER PRIMARY KEY AUTOINCREMENT,
+ id INTEGER PRIMARY KEY,
item_name VARCHAR(255) NOT NULL,
info VARCHAR(255) NOT NULL,
price DECIMAL(10,2) NOT NULL,
@@ -9,6 +9,7 @@ CREATE TABLE inventory (
);
CREATE TABLE users (
+ user_id SERIAL PRIMARY KEY,
username VARCHAR(255) PRIMARY KEY NOT NULL,
password_hash VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
@@ -17,14 +18,25 @@ CREATE TABLE users (
);
CREATE TABLE sales (
- sale_id INTEGER PRIMARY KEY AUTOINCREMENT,
+ sale_id INTEGER PRIMARY KEY,
transaction_id VARCHAR(255) NOT NULL,
username VARCHAR(255) NOT NULL,
item_id INTEGER NOT NULL,
quantity INTEGER NOT NULL,
sale_date DATETIME NOT NULL,
cost DECIMAL(10,2) NOT NULL,
+ table_number INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY (username) REFERENCES users(username),
FOREIGN KEY (item_id) REFERENCES inventory(id)
);
+CREATE TABLE games (
+ game_id SERIAL PRIMARY KEY,
+ title VARCHAR(255) NOT NULL,
+ description TEXT,
+ release_date DATE,
+ rating DECIMAL(3,2),
+ price DECIMAL(6,2) NOT NULL,
+ genre VARCHAR(50) NOT NULL
+);
+
diff --git a/database/signup.html b/database/signup.html
new file mode 100644
index 00000000..385faa7c
--- /dev/null
+++ b/database/signup.html
@@ -0,0 +1,26 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/database/startingData.sql b/database/startingData.sql
index 19da65d3..0ea567e7 100644
--- a/database/startingData.sql
+++ b/database/startingData.sql
@@ -10,20 +10,11 @@ VALUES ('llamport', '9171d14954eeda4e70777c23d98e349818125cdaeb884ff97ebf8cc0a9c
INSERT into `users` (`username`, `password_hash`, `email`, `first_name`, `last_name`)
VALUES ('bliskov', '1e4b9ae956cad1385cfa6fffd8323dd16c3fe18c54e6447e49bddef2138d042e84e1505a541c6ef19a5026e684b2559efd366145870a0a8d4d4173c0877f6cd2', 'barbara@thor.com', 'Barbara', 'Liskov');
-INSERT into `inventory` (`item_name`, `info`, `price`, `stock`, `image_url`, `category`)
-VALUES ('Apples', 'An edible cultivation of the Malus genus.', 2.00, 100, 'static/images/apple.jpeg', 'Fruit');
+INSERT INTO games (title, description, release_date, rating, price, genre)
+VALUES ('Super Mario Odyssey', 'Join Mario on a massive, globe-trotting 3D adventure!', '2017-10-27', 4.7, 59.99, 'Action, Adventure'),
-INSERT into `inventory` (`item_name`, `info`, `price`, `stock`, `image_url`, `category`)
-VALUES ('Bananas', 'A long curved fruit which grows in clusters and has soft pulpy flesh and yellow skin when ripe.', 1.00, 100, 'static/images/banana.jpeg', 'Fruit');
+INSERT INTO games (title, description, release_date, rating, price, genre)
+VALUES ('The Legend of Zelda: Breath of the Wild', 'Climb cliffs to scope out a destination', '2017-03-03', 4.9, 59.99, 'Action, Adventure'),
-INSERT into `inventory` (`item_name`, `info`, `price`, `stock`, `image_url`, `category`)
-VALUES ('Mangos', 'The best fruit on the planet.', 4.00, 100, 'static/images/mango.jpeg', 'Fruit');
-
-INSERT into `sales` (`transaction_id`, `username`, `item_id`, `quantity`, `sale_date`, `cost`)
-VALUES ('1', 'aturing', '1', 10, '2022-12-21 7:30:30', 5.50);
-
-INSERT into `sales` (`transaction_id`, `username`, `item_id`, `quantity`, `sale_date`, `cost`)
-VALUES ('2', 'dritchie', '2', 10, '2022-12-21 7:30:30', 5.50);
-
-INSERT into `sales` (`transaction_id`, `username`, `item_id`, `quantity`, `sale_date`, `cost`)
-VALUES ('3', 'llamport', '3', 10, '2022-12-21 7:30:30', 5.50);
+INSERT INTO games (title, description, release_date, rating, price, genre)
+VALUES ('Animal Crossing: New Horizons', 'Build your community from scratch on a deserted island brimming with possibility', '2020-03-20', 4.8, 59.99, 'Simulation');
diff --git a/database/style.css b/database/style.css
new file mode 100644
index 00000000..db015d67
--- /dev/null
+++ b/database/style.css
@@ -0,0 +1,73 @@
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ font-family: 'Montserrat', sans-serif;
+ background-image: url('background-image.jpg');
+ background-repeat: no-repeat;
+ background-size: cover;
+}
+
+.container {
+ width: 400px;
+ margin: 50px auto;
+ background-color: #fff;
+ border-radius: 5px;
+ padding: 20px;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+}
+
+h1 {
+ text-align: center;
+ margin-bottom: 20px;
+ color: #333;
+}
+
+.form-group {
+ margin-bottom: 20px;
+}
+
+label {
+ display: block;
+ margin-bottom: 5px;
+ color: #333;
+}
+
+input[type="text"],
+input[type="password"] {
+ width: 100%;
+ padding: 10px;
+ border-radius: 5px;
+ border: none;
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
+ font-size: 16px;
+ color: #333;
+}
+
+.btn {
+ display: block;
+ width: 100%;
+ padding: 10px;
+ border-radius: 5px;
+ border: none;
+ background-color: #4CAF50;
+ color: #fff;
+ font-size: 16px;
+ cursor: pointer;
+ transition: background-color 0.3s ease;
+}
+
+.btn:hover {
+ background-color: #3e8e41;
+}
+
+.icon {
+ position: absolute;
+ top: 12px;
+ left: 10px;
+ color: #999;
+ font-size: 18px;
+}
diff --git a/diagrams.md b/diagrams.md
new file mode 100644
index 00000000..2b60590b
--- /dev/null
+++ b/diagrams.md
@@ -0,0 +1,138 @@
+# Project 2: Design
+
+## Introduction
+
+In this phase, you will be mapping out your project and creating easily understandable diagrams that will help you and your team know your codebase inside and out. This also makes it much easier to communicate the flow of your application to less technical audiences or anyone who is new to your project. We will be using `pyreverse` and `plantuml` to help us create, update, and visualize our diagrams.
+
+This activity will require you to generate Class, Package, Use Case, and Sequence diagrams for your project. If you are unfamiliar with these diagrams, you can find an in-depth explanation of each diagram type [here](https://www.uml-diagrams.org/) or reference [this article](https://nulab.com/learn/software-development/uml-diagrams-guide/).
+
+## Task 1: Installations
+
+- Use `pip` to install the following packages:
+ - `pylint==2.17.1`
+ - `plantuml==0.3.0`
+- Add both of these packages to your `requirements.txt` file, including the version numbers. Follow the format of the `flask` package in the file.
+- Install `Graphviz` on your machine. You can find download instructions for your operating system [here](https://graphviz.org/download/).
+
+## Task 2: Initial Structure Diagrams
+
+- Each group member will create diagrams for at least one of the following subdirectories/files of your project:
+ - `authentication`: requires a package diagram
+ - `core`: requires both a package diagram and a class diagram
+ - `database`: requires both a package diagram and a class diagram
+ - `testing`: requires a package diagram
+
+All of the above diagrams must be generated, so split this work evenly and push and pull code often. To generate a class diagram for a subdirectory or file, you must first generate the `plantuml` files using `pyreverse`. Then, you must use `plantuml` to generate the diagram from the `plantuml` file. Here's an example of how to do this for the package diagram in the `testing` subdirectory.
+
+```bash
+pyreverse --output puml --colorized -A --output-directory testing testing # generates testing/packages.puml
+python3.10 -m plantuml testing/packages.puml # generates testing/packages.png
+```
+
+Since `testing` has no classes, we do not need a class diagram, but if we did, we would change the `testing/packages.puml` to `testing/classes.puml` in the last command.
+
+- Delete the `.puml` files that do not have a corresponding `.png` file. For example, since `testing` has no classes, we would delete `testing/classes.puml`.
+- For each subdirectory, create copies of the `.puml` and `.png` files with naming schemes that include `_initial` in the name.
+ - For example, `testing/packages.puml` would have a copy called `testing/package_initial.puml` and `testing/packages.png` would have a copy called `testing/package_initial.png`.
+
+## Task 3: Update Structure Diagrams
+
+- Begin planning the implentations necessary to fulfill requirements listed in your `SRS.md` file.
+- Go to the corresponding subdirectory, and update the `.puml` file to reflect the changes you have planned.
+ - For example, by implementing a method called `delete_cart` in the `UserSession` class from `core`, my `core/classes.puml` file would look like the one shown below because I added a line to the `UserSession` class that says `delete_cart(id: str) -> None`.
+ - [PlantUML class diagram documentation](https://plantuml.com/class-diagram)
+- Be sure to regenerate the `.png` file for each subdirectory after you update the corresponding `.puml` file.
+
+```plantuml
+@startuml classes
+set namespaceSeparator none
+class "Sessions" as store.core.session.Sessions #aliceblue {
+ sessions : dict
+ add_new_session(username: str, db: Database) -> None
+ get_all_sessions() -> dict
+ get_session(username: str) -> UserSession
+ remove_session(username: str) -> None
+}
+class "UserSession" as store.core.session.UserSession #aliceblue {
+ cart : dict
+ date : datetime, NoneType
+ db
+ total_cost : int
+ username : str
+ add_new_item(id: str, name: str, price: int, quantity: int, discount: float, tax_rate: float) -> None
+ empty_cart() -> dict
+ is_item_in_cart(id: str) -> bool
+ remove_item(id: str) -> None
+ delete_cart(id: str) -> None
+ submit_cart() -> None
+ update_item_quantity(id: str, change_to_quantity: int) -> None
+ update_total_cost() -> None
+}
+@enduml
+```
+
+## Task 4: Use Case Diagrams
+
+- Create a `diagrams` subdirectory from the project root directory, and navigate to it.
+- Create a `cases` subdirectory from the `diagrams` subdirectory and navigate to it.
+- For each user type (actor) mentioned in your `SRS.md` file, create an appropriately named `.puml` file showcasing the use cases for that actor.
+ - For example, if I had an actor called `Customer`, I might create a file called `customer.puml` that looks like the template below.
+ - [PlantUML use case diagram documentation](https://plantuml.com/use-case-diagram)
+- Generate a `.png` file from the `.puml` file.
+ - Remember, this will look something like: `python3.10 -m plantuml customer.puml`
+
+```plantuml
+@startuml customer
+left to right direction
+actor Customer
+rectangle "System" as system {
+ (Login)
+ (Register)
+ (View Cart)
+ (View Items)
+ (View Orders)
+ (View Profile)
+ (Logout)
+}
+Customer --> (Login)
+Customer --> (Register)
+Customer --> (View Cart)
+Customer --> (View Items)
+Customer --> (View Orders)
+Customer --> (View Profile)
+Customer --> (Logout)
+@enduml
+```
+
+## Task 5: Sequence Diagrams
+
+- Create a `sequences` subdirectory from the `diagrams` subdirectory and navigate to it.
+- For each of the use cases shown in your use case diagrams, create an appropriately named `.puml` file showcasing the sequence of events for that use case and generate its corresponding `.png` file.
+ - For example, if I had a use case called `Login`, I might create a file called `login.puml` that looks like the template below.
+ - [PlantUML sequence diagram documentation](https://plantuml.com/sequence-diagram)
+
+```plantuml
+@startuml login
+actor Customer
+boundary "System" as system
+control "Sessions" as sessions
+control "Authentication" as auth
+Customer -> system: Login
+activate system
+system -> auth: login_pipeline(username, password)
+activate auth
+auth --> system: True
+deactivate auth
+system -> sessions: add_new_session(username, db)
+activate sessions
+sessions --> system: None
+deactivate sessions
+system -> system: redirect to home page
+deactivate system
+@enduml
+```
+
+## Submission Details
+
+- On Canvas, submit the following:
+ - the URL to your group's repository
diff --git a/diagrams/cases/admin.puml b/diagrams/cases/admin.puml
new file mode 100644
index 00000000..423b0652
--- /dev/null
+++ b/diagrams/cases/admin.puml
@@ -0,0 +1,16 @@
+@startuml rectangle
+left to right direction
+actor Admin
+rectangle "Management" as Management{
+ (Register User)
+ (Refund User)
+ (Purchase User)
+ (Add Movies User)
+}
+Admin --> (Register User)
+Admin --> (Refund User)
+Admin --> (Purchase User)
+Admin --> (Add Movies to Database)
+(Purchase User)---(Add Movies to Database)
+
+@enduml
diff --git a/diagrams/cases/management.puml b/diagrams/cases/management.puml
new file mode 100644
index 00000000..705de76f
--- /dev/null
+++ b/diagrams/cases/management.puml
@@ -0,0 +1,34 @@
+@startuml rectangle
+left to right direction
+actor Managament
+rectangle "Users" as User{
+(Login)
+ (Register)
+ (View Cart)
+ (View Items)
+ (View Orders)
+ (View Profile)
+ (Filter by Preference)
+ (Logout)
+}
+User -> (Login)
+User --> (Register)
+User --> (View Cart)
+User --> (View Online Games)
+User --> (View Genres)
+User --> (View Profile)
+User --> (Filter by Preference)
+User --> (Logout)
+User --> (Refund)
+User --> (Purchase)
+Admin -->(Register):Will add user to the database and save credentials
+Admin -->(Purchase):Will complete purchase and recieve the game data accordingly
+Admin -->(Refund):Will give money back to the user
+rectangle "Checkout" as checkout{
+User--(checkout)
+(checkout) .> (purchase) : include
+(paymentinfo) .> : allows purchase
+}
+
+@enduml
+@enduml
diff --git a/diagrams/cases/managment.png b/diagrams/cases/managment.png
new file mode 100644
index 00000000..5b161e72
Binary files /dev/null and b/diagrams/cases/managment.png differ
diff --git a/diagrams/cases/users.png b/diagrams/cases/users.png
new file mode 100644
index 00000000..054f9e68
Binary files /dev/null and b/diagrams/cases/users.png differ
diff --git a/diagrams/cases/users.puml b/diagrams/cases/users.puml
new file mode 100644
index 00000000..9acc0b04
--- /dev/null
+++ b/diagrams/cases/users.puml
@@ -0,0 +1,15 @@
+@startuml rectangle
+left to right direction
+actor User
+rectangle "Managament" as management{
+(Login)
+ (Register)
+ (View Cart)
+ (View Items)
+ (View Orders)
+ (View Profile)
+ (Filter by Preference)
+ (Logout)
+}
+User -> (Login)
+@enduml
diff --git a/diagrams/sequences/filterGames.png b/diagrams/sequences/filterGames.png
new file mode 100644
index 00000000..64f467e8
Binary files /dev/null and b/diagrams/sequences/filterGames.png differ
diff --git a/diagrams/sequences/filterGames.puml b/diagrams/sequences/filterGames.puml
new file mode 100644
index 00000000..69b7b6fd
--- /dev/null
+++ b/diagrams/sequences/filterGames.puml
@@ -0,0 +1,18 @@
+@startuml filterGames
+actor Customer
+boundary "Website" as system
+control "REST API" as API
+control "Database" as db
+Customer -> system: Filter by Condition
+activate system
+system -> API : HTTP get method to get a array of games
+activate API
+API-->db:Get information about a game with a certain condition
+activate db
+db--> API: retrive games by query
+deactivate db
+API-> system:Show results of the users condition
+deactivate API
+system -> system:showcase the video games that met the users condition
+deactivate system
+@enduml
diff --git a/diagrams/sequences/login.png b/diagrams/sequences/login.png
new file mode 100644
index 00000000..7d190dc8
Binary files /dev/null and b/diagrams/sequences/login.png differ
diff --git a/diagrams/sequences/login.puml b/diagrams/sequences/login.puml
new file mode 100644
index 00000000..25dce6d4
--- /dev/null
+++ b/diagrams/sequences/login.puml
@@ -0,0 +1,18 @@
+@startuml login
+actor Customer
+boundary "System" as system
+control "Sessions" as sessions
+control "Authentication" as auth
+Customer -> system: Login
+activate system
+system -> auth: login_pipeline(username, password)
+activate auth
+auth --> system: True
+deactivate auth
+system -> sessions: add_new_session(username, db)
+activate sessions
+sessions --> system: None
+deactivate sessions
+system -> system: redirect to home page
+deactivate system
+@enduml
diff --git a/diagrams/sequences/purchase.png b/diagrams/sequences/purchase.png
new file mode 100644
index 00000000..6ab29624
Binary files /dev/null and b/diagrams/sequences/purchase.png differ
diff --git a/diagrams/sequences/purchase.puml b/diagrams/sequences/purchase.puml
new file mode 100644
index 00000000..1bc75676
--- /dev/null
+++ b/diagrams/sequences/purchase.puml
@@ -0,0 +1,19 @@
+@startuml purchase
+actor Customer
+boundary "System" as system
+control "Authentication" as auth
+control "Database" as db
+Customer -> system: Add to cart
+activate system
+system -> auth: purchase_videogame
+activate auth
+system --> auth: Add payment info
+auth--> system: Verified credentials
+deactivate auth
+activate db
+system --> db : parse JSON into db
+db --> system : Added information
+deactivate db
+system -> system: redirect to home page
+deactivate system
+@enduml
diff --git a/diagrams/sequences/refund.png b/diagrams/sequences/refund.png
new file mode 100644
index 00000000..d4614068
Binary files /dev/null and b/diagrams/sequences/refund.png differ
diff --git a/diagrams/sequences/refund.puml b/diagrams/sequences/refund.puml
new file mode 100644
index 00000000..4a843964
--- /dev/null
+++ b/diagrams/sequences/refund.puml
@@ -0,0 +1,21 @@
+@startuml refund
+actor Customer
+boundary "System" as system
+control "User Profile" as profile
+control "Confirmation" as confirm
+control "Database" as db
+Customer -> system: Refund
+activate system
+activate confirm
+system -> confirm: Are you sure you want to refund
+confirm->system:Yes
+activate db
+system-->db: Add money to users amount
+db-->system:Added money to users amount
+activate profile
+db-->profile:add money to users account
+deactivate profile
+deactivate db
+system -> system: redirect to home page
+deactivate system
+@enduml
diff --git a/diagrams/sequences/register.png b/diagrams/sequences/register.png
new file mode 100644
index 00000000..ce2f6a7f
Binary files /dev/null and b/diagrams/sequences/register.png differ
diff --git a/diagrams/sequences/register.puml b/diagrams/sequences/register.puml
new file mode 100644
index 00000000..f11dd464
--- /dev/null
+++ b/diagrams/sequences/register.puml
@@ -0,0 +1,20 @@
+@startuml register
+actor Customer
+boundary "System" as system
+control "Sessions" as sessions
+control "Authentication" as auth
+control "Database" as db
+Customer -> system: Register
+activate system
+activate auth
+system -> db: register_user(id,username,password)
+activate db
+db --> system: Added User to Database
+deactivate db
+deactivate auth
+system -> sessions: add_new_session(username, db)
+activate sessions
+sessions --> system: Session Added
+system -> system: redirect to home page
+deactivate system
+@enduml
diff --git a/implementation.md b/implementation.md
new file mode 100644
index 00000000..2e615a8e
--- /dev/null
+++ b/implementation.md
@@ -0,0 +1,23 @@
+# Project 3: Implementation
+
+## Introduction
+
+The exciting part of the project has finally come. It is now time to implement the features you planned in the previous phase. In all likelihood, this will require a massive amount of work. That's why it is important to begin by planning the smaller changes you can make, divide these among your group, and work together to implement them. This process is repetitive, taking on larger and larger tasks as you go. The tasks listed below are not necessarily meant to be performed in sequence. They are, instead, a list of what we will be looking for when evaluating your implementation. Beyond just functionality, your project's code should be readable and well documented.
+
+## Task 1: Code Style Guides
+
+- Python files should be written in `lower_snake_case.py` format.
+- Global variables and constants should be written in `UPPER_SNAKE_CASE`.
+- Class names should be written in `UpperCamelCase`.
+- Method and local variable names should be written in `lower_snake_case`.
+
+## Task 2: Documentation Guides
+
+- All classes, methods, and functions should be documented using the docstring format shown throughout the template codebase.
+- After implementing a feature, be sure to update the relevant `plantuml` and `png` files in all respective subdirectories.
+- Commit messages should be written to be descriptive of the changes made and the feature implemented. When writing code for a specific requirement from the `SRS.md`, you should use the requirement's ID in your commit message.
+
+## Submission Details
+
+- On Canvas, submit the following:
+ - the URL to your group's repository
diff --git a/presentation.md b/presentation.md
new file mode 100644
index 00000000..5a4e53f6
--- /dev/null
+++ b/presentation.md
@@ -0,0 +1,7 @@
+# Group Project Presentation Rubric
+
+| | Excellent | Good | Poor |
+| --- | --- | --- | --- |
+| Project Goal (12 points) | Clear, well thought out, and well explained (7-12 points) | Somewhat clear, but needs more explanation (1-6 points) | Not clear at all (0 points) |
+| Changes Made (28 points) | Significant changes made (15-28 points) | Minor changes made (1-14 points) | No changes made (0 points) |
+| Challenges (10 points) | Lists challenges faced and how they were overcome (6-10 points) | Lists challenges faced, but does not explain how they were overcome (1-5 points) | Does not list challenges faced (0 points) |
diff --git a/requirements.txt b/requirements.txt
index c39f059d..b072d02c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1 +1,3 @@
-flask==2.2.2
\ No newline at end of file
+flask==2.2.2
+pylint==2.17.1
+plantuml==0.3.0
diff --git a/testing/classes.puml b/testing/classes.puml
new file mode 100644
index 00000000..43fdf4a9
--- /dev/null
+++ b/testing/classes.puml
@@ -0,0 +1,3 @@
+@startuml classes
+set namespaceSeparator none
+@enduml
diff --git a/testing/packages.png b/testing/packages.png
new file mode 100644
index 00000000..fa59ed07
Binary files /dev/null and b/testing/packages.png differ
diff --git a/testing/packages.puml b/testing/packages.puml
new file mode 100644
index 00000000..6e3f7ce9
--- /dev/null
+++ b/testing/packages.puml
@@ -0,0 +1,11 @@
+@startuml packages
+set namespaceSeparator none
+package "testing" as testing #aliceblue {
+}
+package "testing.authTests" as testing.authTests #aliceblue {
+}
+package "testing.coreTests" as testing.coreTests #aliceblue {
+}
+package "testing.dbTests" as testing.dbTests #aliceblue {
+}
+@enduml
diff --git a/testing/packages_initial.png b/testing/packages_initial.png
new file mode 100644
index 00000000..fa59ed07
Binary files /dev/null and b/testing/packages_initial.png differ
diff --git a/testing/packages_initial.puml b/testing/packages_initial.puml
new file mode 100644
index 00000000..6e3f7ce9
--- /dev/null
+++ b/testing/packages_initial.puml
@@ -0,0 +1,11 @@
+@startuml packages
+set namespaceSeparator none
+package "testing" as testing #aliceblue {
+}
+package "testing.authTests" as testing.authTests #aliceblue {
+}
+package "testing.coreTests" as testing.coreTests #aliceblue {
+}
+package "testing.dbTests" as testing.dbTests #aliceblue {
+}
+@enduml