Skip to content

jamesljeffrey1995/surfBoardShop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Surfboard Shop

Trello Board:https://trello.com/b/gZdKcV5g/crud-app-surfing-shop

Contents

The brief

To create a CRUD application using the technologies and methodologies that were taught to us during training.

My application

My project is a surfshop. The web application allows for the user to add items, modify the quantity, delete selected products and also buy other products

Architecture

Entity Relationship Diagrams

Initial plan

new_erd

The initial ERD was to meet the requirments of the project brief. It consists of a many to many relationship between the stock and the order. A user is able to make multiple orders with different products.

Updated Model

erd

The updated model has an orderline which allows for the many to many relationship. This takes the product ID and order ID which is assigned to the user, and allows for a calculation of the total.

Deployed Model

erd_update

The deployed model is the same as the updated model, but the user has a relationship to the stock, therefore when a product is made by the user, the user is assigned to it

CI Pipeline

The picture is below is the continuous integration pipeline. This allows for rapid and efficient development to deployment. This allows for me to develop code on my local machine and push it using the github, then via a webhook it is automatically tested and they are stored in a file.

CI

Risk assessment

risk assessment

User Stories

To track the progress of the project and layout what was needed, Trello was used to do this.

User Stories

The board has several collumns, this allowed to keep tabs on the progress. The application of MoSCoW method allowed for easier project tracking

  • Product Backlog: This showed the user stories that still needed to be completed
  • Sprint: This showed what had to be completed to the timebox, which was 24 hours, with 4 sprints
  • In progress: This shows what is currently being worked on
  • Completed: This shows all the user stories that have been completed

Testing

Unit Testing

Using pytest to create a coverage test of the application, 15 tests were made allowing for a 76% coverage. I then set jenkins pipeline up so that when anything is push to git, it is tested and the index.html is stored in a tests folder. That then triggers another job, which deploys the application.

Coverage Report console Coverage Report jenkins

Surfboard Forum Shop

Front End Design

The design is made using HTML
When the user navigates via the url, they are directed to the homepage
Using the navigate bar, they are able to register an account. These details are stored in the Users table

app

The user is then redirected to the login page, where they can input their credentials

app1

The user is then redirected to the homepage, where a new navigation bar is presented

app2

The post page allows for the user to post a surfboard they wish to sell.

app3

The user is then redirected back to the homepage, where their item is then presented

app4

The user can click on the item, and they are directed to the products page of that item. They can then input an amout they want to buy

app5

They are then redirected back to the homepage, and is shown that the quantity of the item has reduced. If the user input a quantity that is over the amount of stock, then they are redirected to the homepage and the order doesnt go through

app6

If the user then navigates to 'your shop', then they can view the items they uploaded

app7

If the user clicks on the item name, they are directed to update page, where they can change the quantity of the product, they are then redirected back to the homepage

app8 app9

The user can also delete an item in the user shop, once they press delete, they are redirected to the home page

app10 app11

If the user is not logged in, then the Href is removed from the products and the user cannot navigate to the buy page

Known Issues

  • Dynamic url for products, if the product is deleted, the user can still go to the page but displays nothing apart from the layout.html
  • Gunicorn is deployed constantly
  • Email says it succesfully sent email, but no email is recieved

Future improvements

  • Allow for the user to filter styles of boards, length and price
  • Allow for the user to see their orders
  • Group the orders that were made in the same session and create a checkout for all items
  • Improve the front end, and make it more visually appealing

Authors

James Jeffrey

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published