tomik-z-cech / PP5-Ohm-Azing-Components

View massive selection of electronic components at our online store. Find high-quality resistors, capacitors, tools, kits and more. Shop now for all your electronic needs !
https://ohmazing-components-1a5a0fcb9e95.herokuapp.com/
1 stars 1 forks source link
arduino capacitor components electronic-components electronic-ideas electronic-kit electronic-newbie microcontrollers pcb-components raspberry-pi-4 resistors soldering-irons

Ohm-Azing Components - Portfolio Project 5


1. Key project information

Mockup


2. Table of Contents


3. User Experience (UX)

3.1. The Strategy Plane

3.1.1 The Idea

Back to top


3.1.2 The Ideal User

The target audience are individuals or groups such as rookies that are seeking inspiration in electronic components to build their own circuit or electronic kits that are programmable and versatile or electronic veterans that need tools or to top up their components stash.

Back to top


3.1.3 Site Goals

Back to top


3.1.4 Epics

As a thought process of the strategy plane, 14 epics were created and utilized. Please see below the detail list of epics with links, or a link to the project's Kanban Board (Appendix 1). Those Epics were further sliced into 69 USER STORIES.

Appendix 1 - Kanban Board

Kanban Board

Back to top


3.1.5 User stories

69 User stories were created based on the Epics. Each user story uses the MoSCoW prioritization technique. Each user story was also estimated for relative effort required to implement satisfactory result of acceptance criteria. My Story points are using a sequence inspired by the Fibonacci numbers (1, 2, 3, 5, 8, 13, etc.). This reflects the uncertainty and variability in estimating larger tasks. The idea was to easy distinguish the initial size of user story using this non-linear sequence. Each user story on the Kanban Board was given 2 labels (MoSCoW and Story Points).

MoSCoW prioritization technique stands for:

Must-Have: Critical requirements that must be implemented for the project to be considered successful.

Should-Have: Important requirements that are not critical but add significant value.

Could-Haves: Desirable features that would be nice to have but are not crucial.

Won't-Have: Features that are explicitly excluded from the project scope.

The TOTAL of Story Points for all User Stories in the project is 207.

View User Stories for EPIC 1 : Environment configuration | Issue | Title | User Story | | ------------------------------------------------------------------------ | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | | [# 2](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/2) | USER STORY : Set up GiHub repository | As a Developer, I need to set-up a repository on GitHub platform to be able to have control over versions of project. | | [# 3](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/3) | USER STORY : Set up dependencies | As a Developer, I need to register and obtain links for third party services. | | [# 4](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/4) | USER STORY : Create working Django app | As a Developer, I need to install all dependencies, correctly set settings.py and create working app in local environment. | | [# 5](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/5) | USER STORY : Deploy to Heroku | As a Developer I need to create a working Heroku deployment. |
View User Stories for EPIC 2 : Database Models | Issue | Title | User Story | | ------------------------------------------------------------------------ | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | [# 7](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/7) | USER STORY : Define Database Schema | As a Developer, I need to create database schema that fits the purpose of the project and also create all the modular apps that will be used in the project. | | [# 8](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/8) | USER STORY : Create database relationships | As a Developer, I need to define relationships between models and import the relationships into working apps models. | | [# 9](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/9) | USER STORY : Implement Data Validation in Models | As a Developer, I need implement data validation rules within Ohm-Azing Components database models. |
View User Stories for EPIC 3 : User Authentication and Authorization | Issue | Title | User Story | | -------------------------------------------------------------------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------ | | [# 11](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/11) | USER STORY : Implement user registration | As a Site User I am able to register to create new account and to select username and password. | | [# 12](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/12) | USER STORY : Log In | As a Site User I am able to Log In to see registered user section. | | [# 13](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/13) | USER-STORY : Reset my password if forgotten | As a Site User I am able to Reset My Password to change my password if forgotten. | | [# 14](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/14) | USER STORY : Log out | As a Site User, I am able to log out to leave the site functions for registered users. |
View User Stories for EPIC 4 : Custom Admin Interface | Issue | Title | User Story | | -------------------------------------------------------------------------- | --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | [# 16](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/16) | USER STORY : Categories section | As a Business Owner, I have option to do full CRUD with item categories in order to manage my shop. | | [# 17](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/17) | USER STORY : Items section | As a Business Owner, I have option to do full CRUD with items in order to manage products sold in my shop. | | [# 18](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/18) | USER STORY : Invoices section | As a Business Owner, I have option to view or download any invoice that was created by shoppers. | | [# 19](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/19) | USER STORY : Vouchers section | As a Business Owner, I have option to perform full CRUD on "Vouchers" that could be redeemed via checkout. | | [# 20](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/20) | USER STORY : Comments section | As a Business Owner, I have option to approve/delete comments to ensure no inappropriate content on the project page. | | [# 21](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/21) | USER STORY : Postage Settings section | As a Business Owner, I have option to adjust free postage threshold and postage fees for standard and express delivery options. | | [# 28](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/28) | USER STORY : Email interface for marketing purposes | As a Site admin, I need to implement Mailing interface to be able to send emails to all users signed up for email communication. | | [# 97](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/97) | USER STORY : Postage label printing | As a Site Admin, I need implement postage label printing page to be able to Effortlessly print postage labels. | | [# 98](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/98) | USER STORY : Order status emails | As a Site Admin, I can mark orders as accepted, pending, fulfilled to be able to keep customers informed of the status of their order. |
View User Stories for EPIC 5 : General Features | Issue | Title | User Story | | -------------------------------------------------------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [# 23](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/23) | USER STORY : FavIcon & Title | As a Site User I would like to be able to differentiate this site from other sites opened in my browser, in order of easy navigation. | | [# 24](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/24) | USER STORY : Header | As a Site User I want to be able to navigate easily through-out the site. | | [# 25](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/25) | USER STORY : Footer | As a Site User I want to be able to find useful info on the bottom of the site in order not to scroll and search too much around. | | [# 26](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/26) | USER STORY : Loader | As a Site User I want to be able to see if page is working in the form of loader that appears when complex task is performed. | | [# 27](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/27) | USER STORY : Toasts | As a Site User I want to be informed of results of requests performed in the form of toast that appears when complex task is done successfully / unsuccessfully. |
View User Stories for EPIC 6 : User Profile Management | Issue | Title | User Story | | -------------------------------------------------------------------------- | --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | [# 31](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/31) | USER STORY : Change Details (Phone Number, Email Address, etc.) | As a Site User I can Update My Details to be able to manage my account in case of changes. | | [# 32](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/32) | USER STORY : Delete my account | As a Site User I can Delete My Account to be able to opt out from all services. | | [# 33](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/33) | USER STORY : Profile Picture | As a Site User I can Change my profile picture to add the finishing touch to my profile. | | [# 34](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/34) | USER STORY : Opt In/Out for Newsletter | As a Site User I can Opt In/Out for Newsletter or other marketing communication to be able to change my preferences. |
View User Stories for EPIC 7 : The Shop | Issue | Title | User Story | | -------------------------------------------------------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [# 36](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/36) | USER STORY : Shop Highlights | As a Site User, I would like to See Newest and Favorites on the landing page so I can see easily what products are after arriving and what are most popular. | | [# 37](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/37) | USER STORY : Shop by Category | As a Site User, I would like to have the shop items sorted by category so I can browse the items faster. | | [# 38](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/38) | USER STORY : Product Details | As a Site User, I would like to see the details of each item in separate page so I won't get lost in too much info. | | [# 39](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/39) | USER STORY : Add to Vault | As a Site User, I need to be able to add items to vault in order to see the entire order before payment. | | [# 40](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/40) | USER STORY : Add to Wishlist | As a Site User, I need to be able to add items to my Wishlist in order to see keep the items I am interested in separately. | | [# 41](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/41) | USER STORY : Comment on Products | As a Site User I can Comment on Items to share my opinion. | | [# 42](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/42) | USER STORY : See Comments of Others | As a Site User I can see other comments on Items to read other Users opinions. | | [# 72](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/72) | USER STORY : Like / Dislike Items of Shop | As a Site User I can Like / Dislike particular Item in Shop in order to express my opinion. | | [# 99](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/99) | USER STORY : Frequently bought together | As a Site User, I can see what items are bought together to be able to what else can I buy for the same project. |
View User Stories for EPIC 8 : Wishlist | Issue | Title | User Story | | -------------------------------------------------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------ | | [# 44](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/44) | USER STORY : Display Wishlist Items | As a Site User, I can display items in My Wishlist in order to manage the items. | | [# 45](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/45) | USER STORY : Remove Items from Wishlist | As a Site User, I can remove items from My Wishlist one by one in order to manage the items in the Wishlist. | | [# 46](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/46) | USER STORY : Clear Wishlist | As a Site User, I can delete all items in My Wishlist in order to manage the items. |
View User Stories for EPIC 9 : Vault | Issue | Title | User Story | | -------------------------------------------------------------------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [# 48](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/48) | USER STORY : Display content of Vault | As a Site User, I can display items in Vault in order to manage the items. | | [# 49](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/49) | USER STORY : Adjust amounts of items in Vault | As a Site User, I can adjust amount of each item in Vault in order to manage the items before proceeding to Checkout. | | [# 50](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/50) |  USER STORY : Clear the Vault | As a Site User, I can display items in Vault in order to manage the items. | | [# 51](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/51) |  USER STORY : Proceed to Checkout | As a Site User, I can proceed to Checkout in order to pay for items in my Vault. | | [# 52](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/52) | USER STORY : Vault management toasts | As a Site User, I can see message that indicates Vault action along all items that are in Vault in order to be informed and have an idea what's in Vault without opening the Vault. |
View User Stories for EPIC 10 : Checkout | Issue | Title | User Story | | -------------------------------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | [# 61](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/61) | USER STORY : Checkout Page | As a Site User, I can see checkout page so I know exactly what am I being charged for. | | [# 54](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/54) | USER STORY : Shipping Details | As a Site User, I can provide shipping details in order to inform the shop where to send my purchase. | | [# 62](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/62) | USER STORY : Save info | As a Site User, I can save provided shipping info in order the form being prefilled with next order. | | [# 63](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/63) | USER STORY : Delivery Options | As a Site User, I can choose between standard and express delivery in order to control the speed of delivery. | | [# 57](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/57) | USER STORY : Payment | As a Site User, I have an option providing payment details in order to pay for my goods. | | [# 55](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/55) | USER STORY : Vouchers | As a Site User, I have an option to redeem discount codes in order to get discount on my purchase. | | [# 58](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/58) | USER STORY : Invoice Generator | As a Site Admin, I need to be able to generate invoice in \*.pdf format in order the invoice being attached to the confirmation email. | | [# 59](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/59) | USER STORY : Confirmation Email | As a Site User, I do get confirmation email in order to know the transaction was successful. | | [# 60](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/60) | USER STORY : Stock Update | As a Site Admin, I need to be able to update stock amounts after every purchase in order the manage the inventory. | | [# 56](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/56) | USER STORY : Stripe and Webhooks Setup | As a Site Admin, I need to be able to process the order functions even in event of failure in order to ensure no paying customer is left without goods. | | [# 64](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/64) | USER STORY : Success Page | As a Site User, I can clearly see success page in order to know my order went through without checking my emails. |
View User Stories for EPIC 11 : Order History | Issue | Title | User Story | | -------------------------------------------------------------------------- | ------------------------------------- | --------------------------------------------------------------------------------------------------- | | [# 66](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/66) | USER STORY : Accessing Order History | As a Site User, I can access my own past orders in case of needing them in future. | | [# 67](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/67) | USER STORY : Viewing past invoices | As a Site User, I can view detail of any of my own past orders in case of needing them in future. | | [# 68](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/68) | USER STORY : Downloading past invoices | As a Site User, I can download any of my own past order invoices in case of needing them in future. |
View User Stories for EPIC 12 : Search Bar | Issue | Title | User Story | | -------------------------------------------------------------------------- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | [# 70](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/70) | USER STORY : Search Bar in header of page | As a Site User I am able to use search function through Categories, Items and Item descriptions in order to quickly find what am I looking for. | | [# 71](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/71) | USER STORY : Search results | As a Site User I can see search result to easily navigate through them. |
View User Stories for EPIC 13 : Styling and design of UI | Issue | Title | User Story | | -------------------------------------------------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------- | | [# 74](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/74) | USER STORY : Intuitive Navigation | As a Site Developer, I need to insure easy navigation throughout the site | | [# 75](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/75) | USER STORY : Color Scheme | As a Site Developer, I need to insure easy navigation throughout the sit | | [# 76](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/76) | USER STORY : W3C + WAVE Compatibility | As a Site Developer, I need to insure easy navigation throughout the site for users in need of ease of access |
View User Stories for EPIC 14 : Testing and Validation | Issue | Title | User Story | | -------------------------------------------------------------------------- | ------------------- | --------------------------------------------------------------------------------- | | [# 78](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/78) | W3C HTML validation | As a Site Developer, I need to ensure \*.html files do pass the W3C validation. | | [# 79](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/79) | W3C CSS validation | As a Site Developer, I need to ensure style.css file do pass the W3C validation. | | [# 80](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/80) | JS validation | As a Site Developer, I need to ensure \*.js files do pass the JS Lint validation. | | [# 81](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/issues/81) | PEP8 validation | As a Site Developer, I need to ensure \*.py file do pass the PEP8 validation. |

Back to top


3.2. The Scope Plane

After decided on the strategy, the scope plane was carefully created.

3.2.1. Features to be implemented

Back to top


3.3. The Structure Plane

3.3.1. Site Maps

The following site-maps show how the site is structured to Logged in user ( Appendix 2 ) ,Not logged in user ( Appendix 3 ) and Site Admin ( Appendix 3 ).

Appendix 2 - Site Map - Logged In

Site Map - Logged In

Appendix 3 - Site Map - Not Logged In

Site Map - Not Logged In

Appendix 4 - Site Map - Site Admin

Site Map - Not Logged In

Back to top


3.3.2. Database Schemas

Following schemas show intended database structure ( Appendix 5 ) and the actual database structure generated by DBeaver ( Appendix 6 ).

Appendix 5 - Initial DB schema

Initial DB Schema

Appendix 6 - DBeaver DB schema and relationships

DBeaver DB Schema

Back to top


3.4. Wire-frames

Appendix 7 - Header and Footer Wire-frame

Header and Footer Wire-frame

Appendix 8 - Landing Page Wire-frame

Landing Page Wire-frame

Appendix 9 - Shop Page Wire-frame

Shop Page Wire-frame

Appendix 10 - Item Detail Page Wire-frame

Item Detail Page Wire-frame

Appendix 11 - Wishlist Page Wire-frame

Wishlist Page Wire-frame

Appendix 12 - Vault Page Wire-frame

Vault Page Wire-frame

Appendix 13 - Checkout Page Wire-frame

Checkout Page Wire-frame

Appendix 14 - Checkout Successful Page Wire-frame

Checkout Successful Page Wire-frame

Appendix 15 - My Profile Page

My Profile Page Wire-frame

Appendix 16 - Order History Page

Order History Page Wire-frame

Appendix 17 - Search Results Page

Search Results Page Wire-frame

Appendix 18 - Forms

Forms Wire-frame

Appendix 19 - Admin Tools Page

Admin Tools Page Wire-frame

Back to top


3.5. The Surface Plane

Once the Strategy, Scope, Structure and Skeleton Planes were in place, it was time to work on the Surface Plane (Design).

3.5.1. Logo

To create the logo, site called Looka was used. Few ideas were presented to the site owner and one of the logos was picked ( Appendix 20 )

Appendix 20 - Logo

Logo

Back to top


3.5.2. Color pallette

Based on the colors of the logo, rest of the colors were picked using the Adobe Color Wheel, following colors were picked into the color pallette ( Appendix 21 ). As some of the colors needed to be opaque, following CSS variables were established ( Appendix 22 ).

Appendix 21 - Color pallette

Color pallette

Appendix 22 - Color variables

Color variables

Back to top


3.5.3. Fonts

Google Fonts site was used to pick the best typography style. The most importance was given to balance between style and readability. As a developer I needed to ensure that all text is displayed clear.

One font was picked and saved in CSS vars ( Appendix 24) :

Appendix 23 - Electrolize Font

Electrloze Font

Appendix 24 - Font Variable

Font Variable

Back to top


3.5.4. Icons and pictures

Icons used throughout the projects are Bootstrap Icons. All of the icons are free to use under their T&C license. Icons were user for various parts of the project such as the Menu, Footer and Buttons as they do enhance user experience.

Site called Freepik was used to download images used in this project. The site offers massive amounts of imagery that is free to download and use under their T&C license. Images from Freepik were used as product images and background image.

Back to top


4. Features

4.1. Features used in every HTML template

4.1.1 Header

Appendix 25 - Logo

Logo

Appendix 26 - Header on HD devices

Header on HD devices

Appendix 27 - Header on devices less 1200px in width

Header on devices less 1200px

Back to top


4.1.2. Footer

Appendix 28 - Footer on HD devices

Footer on HD devices

Appendix 29 - Footer on devices less 1200px in width

Footer on devices less 1200px in width

Back to top


4.1.3. Favicon

Appendix 30 - Favicon

Favicon

Back to top


4.1.4. Error Pages

Appendix 31 - 403.html

403.html

Appendix 32 - 404.html

404.html

Appendix 33 - 500.html

500.html

Back to top


4.1.5. Scroll bar

Appendix 34 - Scroll bar

Scrollbar

Back to top


4.1.6. Loader

Appendix 35 - Loader

Loader

Back to top


4.1.7. Sorting criterion

Appendix 36 - Sorting criterion

Sorting criterion

Back to top


4.1.8. Pagination

Appendix 37 - Pagination option

Pagination option

Appendix 38 - Pagination Navbar

Pagination Navbar

Back to top


4.1.9. Toasts

Appendix 39 - Simple toast

Simple toast

Appendix 40 - Vault toast

Vault toast

Back to top


4.1.10. Easter Egg

Appendix 41 - Easter Egg

Easter Egg

Back to top


4.2. Main Content

4.2.1. Landing Page

Appendix 42 - Landing Page

Landing Page

Back to top


4.2.2. Shop Page

Appendix 43 - Shop Page

Shop Page

Back to top


4.2.3. Item Detail Page

Item detail page does also displays and changes the product rating. Product rating is the difference between likes and dislikes and can be any number between neg integer and pos integer including zero. Examples in ( Appendix 154 ), ( Appendix 155 ) and ( Appendix 156 ). Simplified formula rating = likes - dislikes, with actual code used.

.annotate(
  like=Count("item_likes"),
  dislike=Count("item_dislikes"),
  item_likes_num=ExpressionWrapper(
    F("like") - F("dislike"),
    output_field=fields.IntegerField(),
    ),
  )`

Appendix 44 - Item Detail Page

Item Detail Page

Appendix 154 - Positive rating

Positive rating

Appendix 155 - Negative rating

Negative rating

Appendix 156 - Neutral rating

Neutral rating

Back to top


4.2.4. Wishlist Page

Appendix 45 - Wishlist Page

Wishlist Page

Back to top


4.2.5. Vault Page

Appendix 46 - Vault Page

Vault Page

Back to top


4.2.6. Checkout Page

Appendix 47 - Checkout Page

Checkout Page

Appendix 48 - Shipping details

Shipping details

Appendix 49 - Save checkbox

Save checkbox

Appendix 50 - Delivery options

Delivery options

Appendix 51 - Unused voucher

Unused voucher

Appendix 52 - Used voucher

Used voucher

Appendix 53 - Payment

Payment

Appendix 54 - Incorrect field protection

Incorrect field protection

Back to top


4.2.7. Checkout Success Page

Appendix 55 - Checkout Success Page

Checkout Success Page

Back to top


4.2.8. Order History Page

Appendix 56 - Order History Page

Order History Page

Back to top


4.2.9. My Profile Page

Appendix 57 - My Details Page

My Details Page

Back to top


4.2.10. Search Results Page

Appendix 58 - Search Results Page

Search Results Page

Back to top


4.2.11. Forms

Appendix 59 - Forms

Forms

Back to top


4.2.12. Admin Tools

Appendix 60 - Admin Tools - Protection

Admin Tools - Protection

Appendix 61 - Admin Tools - Categories

Admin Tools - Categories

Appendix 62 - Admin Tools - Items

Admin Tools - Items

Appendix 63 - Admin Tools - Invoices

Admin Tools - Invoices

Appendix 64 - Admin Tools - Vouchers

Admin Tools - Vouchers

Appendix 65 - Admin Tools - Comments

Admin Tools - Comments

Appendix 66 - Admin Tools - Postage Settings

Admin Tools - Postage Settings

Appendix 67 - Admin Tools - Emails

Admin Tools - Email

Back to top


4.2.13. User Emails

Appendix 68 - Email Sample

Email Sample

Appendix 69 - Invoice Sample

Invoice Sample

Back to top


4.3. Future Features

This project could be significantly improved by adding more features this could include :

Back to top


5. Marketing

5.1. Social Media Presence

Ohm-Azing Components Facebook Page was created in order to capture more online presence. The page will be used for adding posts to inform customers of newly arrived products and also competitions will be held. This will generate greater site foot-fall and generate greater income. Facebook and other social platform do provide easy, cheap and effortless way of advertisement ( Appendix 151 ).

Appendix 151 - Facebook Page

Facebook Page

Back to top


5.2. Search Engine Optimization (SEO)

Key words within the Ohm-Azing Components business scope were researched same as description tags. Wordtracker was used to ensure that both short-tail and long-tail keywords are included. Keywords such as 'electronic components', 'electronic kits' and 'electronic tools' aim to reach most of the market search and are within the business scope. Accurate item names are present in the product names and descriptions to appear at the top of Google searches.

Files sitemap.xml and robots.txt were created to increase visibility of the site. These files are essential for SEO (Search Engine Optimization). The sitemap.xml file was generated using XML Sitemap and included in the root folder of the project. A robots.txt file was created in the root folder to instruct search engine crawlers on how to access and crawl the site's pages.

Page XML-Sitemaps.com was used to generate site map in *.xml format ( Appendix 152 ).

Appendix 152 - XML Site-map generator

XML Site-map generator

Once the file robots.txt was created, it was tested by Ryte and the result of the test was pass ( Appendix 153 ).

Appendix 153 - Testing of robots.txt

Testing of robots.txt

Back to top


6. Validation, Testing & Bugs

6.1. Validation

Validation is documented separately in validation.md file.

6.2. Testing

Testing is documented separately in testing.md file.

6.3. Bugs

Bugs are documented separately in bugs.md file.

Back to top


7. Deployment

7.1. Transfer of progress from IDE

Back to top


7.2. Offline cloning

Back to top


7.3. Deployment Prerequisites

7.3.1. Gmail

Back to top


7.3.2. Neon Tech DB

Back to top


7.3.3. AWS Cloud Service

Back to top


7.3.4. Django AWS Connection

class StaticStorage(S3Boto3Storage): """ Class sets static files location """ location = settings.STATICFILES_LOCATION

class MediaStorage(S3Boto3Storage): """ Class sets media files location """ location = settings.MEDIAFILES_LOCATION

- **Method continues :** 
  - If you had any media files created locally as I had using VS code on my local machine and those files are necessary for the project, don't forget to upload them to **S3 bucket** connected with the project

[Back to top](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/blob/main/README.md#ohm-azing-components---portfolio-project-5)

---

### **7.3.5. Stripe Configuration & Connection**

- **Task :** Obtain all relevant settings and keys for online payments on project site
- **Finding:** Stripe payment intend will only be created if the target amount is greater than 0.50 € (As I have cheaper items in my project, minimum orer and defensive programming was used) - *( Appendix 71 )* and data passed back from the webhook are always in string type.
As for customer satisfaction and complaints, I wanted to make sure that I know what orders (invoices) were created by `views.py` and which were created by `webhook_handler.py` - invoice created by webhook has "WH" in header of invoice. If order is created by webhook, the stock amount is also updated.
- **Testing :** - Dummy card details were used for testing purposes 4242 4242 4242 4242, expiry 04/24, cvc 242, zip 42424
- **Method :** 
  - Navigate to [Stripe](https://stripe.com/)
  - Create an account and login
  - Get your API keys (`STRIPE_PUBLIC_KEY` and `STRIPE_SECRET_KEY`)
  - Set those in your `env.py` for development and in Heroku vars for deployment
  - Install stripe by `pip install stripe` 
  - Create Webhook listeners
  - Add listener endpoint (URL for webhook listeners after deployment)
  - If webhooks need to be tested locally, install stripe CLI
  - Run three terminal windows where one serves as your server, second as webhook CLI and third as Stripe response server *( Appendix 70 )* 
  - Add al keys to `env.py` and to Heroku config vars

*Appendix 70 - Webhook testing*

![Webhook testing](/docs/stripe-testing.png)

*Appendix 71 - Minimum Order setting*

![Minimum Order setting](/docs/min-order.png)

[Back to top](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/blob/main/README.md#ohm-azing-components---portfolio-project-5)

---

### **7.3.6. Settings.py & file-tree**

- **Task :** Prepare `settings.py` adn file-tree for deployment 
- **Method :** 
  - Create file `env.py` to keep all sensitive information in
  - See example of `env.py` file *( Appendix 72 )*
  - Add `env.py` into `.gitignore` file to ensure this fill won't be uploaded to GitHub
  - update `settings.py` with `import os`
  - for every secured variable add code `VARIABLE = os.environ.get("VARIABLE")`
  - ensure this process for Gmail, Neon Tech DB, AWS, DEBUG and Django Secret Key
  - update default database settings in `settings.py` with 

if "DATABASE_URL" in os.environ: DATABASES = {"default": dj_database_url.parse(os.environ.get("DATABASE_URL"))} else: DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": os.path.join(BASE_DIR, "db.sqlite3"), } }

- **Method continues :**
  - update default static settings in `settings.py` with 

AWS Settings

if 'USE_AWS' in os.environ:

Bucket Config

AWS_STORAGE_BUCKET_NAME = 'ohmazing-components'
AWS_S3_REGION_NAME = 'eu-west-1'
AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID')
AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY')
AWS_S3_CUSTOM_DOMAIN = f'{AWS_STORAGE_BUCKET_NAME}.s3.amazonaws.com'

# Static and media files
STATICFILES_STORAGE = 'custom_storages.StaticStorage'
STATICFILES_LOCATION = 'static'
DEFAULT_FILE_STORAGE = 'custom_storages.MediaStorage'
MEDIAFILES_LOCATION = 'media'

# Override static and media URLs in production
STATIC_URL = f'https://{AWS_S3_CUSTOM_DOMAIN}/{STATICFILES_LOCATION}/'
MEDIA_URL = f'https://{AWS_S3_CUSTOM_DOMAIN}/{MEDIAFILES_LOCATION}/'
- **Method continues :**
  - update email settings in `settings.py` with `EMAIL_HOST = "smtp.gmail.com"

Gmail settings

ACCOUNT_EMAIL_SUBJECT_PREFIX = "Ohm-azning Components - " MAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" EMAIL_HOST = "smtp.gmail.com" EMAIL_PORT = 587 EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER") EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD") EMAIL_USE_TLS = True`


- **Method continues :**
  - Migrate - your database models to ElephantSQL using `python manage.py migrate` command
  - Create directories `.\static` and `.\templates`
  - commit and push changes to GitHub

*Appendix 72 - `env.py` file*

![env.py](/docs/envpy.png)

[Back to top](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/blob/main/README.md#ohm-azing-components---portfolio-project-5)

---

## **7.4. Deployment to Heroku**

- **Task :** To ensure users are able to view live version of **Ohm-Azing Components** project.
- **Method :** 
  - Register & Log In with heroku
  - Navigate to `New > Create New App`
  - Select Name of the app that is unique
  - Navigate to `Settings > Reveal Config Vars`
  - Add all variables from `env.py` to ConfigVars of Heroku App *( Appendix 73)*
  - Add variable pair `PORT:8000`
  - For the testing deployment add variable pair `COLLECT_STATIC:1`
  - Add the Heroku app URL into `ALLOWED HOSTS` in `settings.py`
  - In root create file name `Procfile` *( Appendix 74 )*
  - Navigate to `Deploy > GitHub > Connect`
  - Navigate to `Deploy > Deploy Branch`
  - Optionally, you can enable automatic deploys
  - See the deployment log - if the deployment was successful, you will be prompted with option to see live page  

*Appendix 73 - Heroku Config Vars*

![Heroku Config Vars](/docs/heroku-vars.png)

*Appendix 74 - Procfile*

![Procfile](/docs/procfile.png)

[Back to top](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/blob/main/README.md#ohm-azing-components---portfolio-project-5)

---

# **8. Technologies & Credits**

## **8.1. Technologies used to develop and deploy this project**

- [**Django/Jinja**](https://docs.djangoproject.com/en/5.0/) - main Framework of the project
- [**Python**](https://www.python.org/) - main BackEnd programming language of the project
- [**HTML**](https://developer.mozilla.org/en-US/docs/Web/HTML) - templates programming language of this project (FrontEnd)
- [**CSS**](https://developer.mozilla.org/en-US/docs/Web/CSS) - styling the project via external CSS file `./static/css/style.css`
- [**Java Script**](https://developer.mozilla.org/en-US/docs/Web/JavaScript) - dynamic templates programming language of this project (FrontEnd)
- [**jQuery**](https://api.jquery.com/) - API for JavaScript - dynamic templates programming language of this project (FrontEnd)
- [**Bootstrap v. 5.3**](https://getbootstrap.com/) - styling framework used in this project (FrontEnd)
- [**Heroku**](https://heroku.com) - to deploy this project
- [**Balsamiq**](https://balsamiq.com/support/) - to create wire-frames
- [**Git**](https://git-scm.com/doc) - to make commitments of progress and push the results back to GitHub
- [**GitHub**](https://github.com/) - to keep the track of version control
- [**VS Code**](https://code.visualstudio.com/) - local IDE

[Back to top](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/blob/main/README.md#ohm-azing-components---portfolio-project-5)

---

## **8.2. Requirements.txt**

Following modules were used in development of **Ohm-Azing Components** website :

- `asgiref==3.7.2` - ASGI framework, a library for building asynchronous Python web applications and servers
- `bleach==6.1.0` - HTML sanitization library
- `boto3==1.34.33` - Amazon Web Services (AWS) SDK for Python
- `botocore==1.34.33` - Low-level, core functionality of boto3, providing access to AWS services
- `certifi==2023.7.22` - Python package for providing Mozilla's CA bundle
- `cffi==1.16.0` - Foreign Function Interface for Python calling C code
- `chardet==5.2.0` - Universal character encoding detector
- `charset-normalizer==3.3.2` - Library for encoding and decoding characters
- `cryptography==41.0.5` - Provides cryptographic recipes and primitives to Python developers
- `defusedxml==0.7.1` - Library for preventing various XML vulnerabilities in Python applications
- `dj-database-url==0.5.0` - Utility for parsing database connection URLs in Django
- `Django==4.2.7` - High-level Python web framework for rapid development and clean, pragmatic design
- `django-allauth==0.58.2` - Authentication for Django applications, supporting social and email accounts
- `django-ckeditor==6.7.0` - Django integration for CKEditor, a WYSIWYG text editor
- `django-countries==7.5.1` - Provides a country field for Django models
- `django-crispy-forms==1.14.0` - Helps easily build crispy forms in Django
- `django-js-asset==2.2.0` - Django JavaScript asset management
- `django-mathfilters==1.0.0` - Math filters for Django templates
- `django-resized==1.0.2` - Resize images for Django models
- `django-richtextfield==1.6.1` - Rich text field for Django models
- `django-storages==1.14.2` - Collection of custom storage backends for Django
- `django-tinymce==3.7.1` - Django integration for TinyMCE, a WYSIWYG HTML editor
- `gunicorn==21.2.0` - Python WSGI HTTP server for UNIX
- `idna==3.4` - Python package for handling Internationalized Domain Names
- `jmespath==1.0.1` - JSON Matching Expressions
- `oauthlib==3.2.2` - Generic, spec-compliant, thorough implementation of the OAuth request-signing logic
- `packaging==23.2` - Core utilities for Python packages
- `pillow==10.2.0` - Python Imaging Library (PIL), forked and maintained
- `psycopg2==2.9.9` - PostgreSQL adapter for Python
- `pycparser==2.21` - Complete parser of the C language, written in pure Python
- `PyJWT==2.8.0` - Encode and decode JSON Web Tokens (JWT) in Python
- `python-dateutil==2.8.2` - Extensions to the standard Python datetime module
- `python3-openid==3.2.0` - Python OpenID library
- `pytz==2023.3.post1` - Library for dealing with time zones
- `reportlab==4.0.9` - Library for programmatic creation of PDF documents
- `requests==2.31.0` - Python HTTP library
- `requests-oauthlib==1.3.1` - OAuth library for Python Requests
- `s3transfer==0.10.0` - Python library for managing Amazon S3 transfers
- `setuptools==69.1.0` - Library to facilitate packaging Python projects
- `six==1.16.0` - Python 2 and 3 compatibility library
- `sqlparse==0.4.4` - Non-validating SQL parser for Python
- `stripe==8.5.0` - Python client library for the Stripe API
- `typing_extensions==4.9.0` - Back-ported and experimental type hints for Python 3.5 and 3.6
- `tzdata==2023.3` - Timezone database
- `urllib3==2.0.7` - Powerful HTTP client for Python
- `webencodings==0.5.1` - Python implementation of HTML entity encoding/decoding

[Back to top](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/blob/main/README.md#ohm-azing-components---portfolio-project-5)

---

## **8.3. Credits**

- [**Daisy McGirr**](https://www.linkedin.com/in/daisy-mcgirr/?originalSubdomain=uk) - massive shout-out for keeping me in the right direction as the best mentor I could ask for
- [**Alan Bushell**](https://www.linkedin.com/in/bushell23/) and [**Amy Richardson**](https://www.linkedin.com/in/amy-richardson-dev/)- thank you for all the support during weekly stand-ups
- [**Looka**](https://looka.com/) - used for creating logo
- [**Adobe Color Wheel**](https://color.adobe.com/create/color-wheel) - used for picking the best color schema
- [**Google Fonts**](https://fonts.google.com/) - used for picking the best typography
- [**Neon Tech**](https://neon.tech/) - used as a database storage
- [**AWS**](https://aws.amazon.com/) - used as a storage of static and media files
- [**FavIcon.io**](https://favicon.io/favicon-converter/) - used to compress favicon
- [**FreePik**](https://www.freepik.com/) - used as images database
- [**Bootstrap Icons**](https://icons.getbootstrap.com/) - used as icons database
- [**W3Schools**](https://www.w3schools.com/) - useful information and cheat sheets
- [**Markdown-Toc**](https://ecotrust-canada.github.io/markdown-toc/) - Table of contents generator
- [**XML-Sitemaps.com**](https://www.xml-sitemaps.com/) - XML Site-map generator
- [**Facebook**](https://www.facebook.com/profile.php?id=61556654592935) - Used as social media platform to promote the business goals
- [**Ryte**](https://en.ryte.com/free-tools/robots-txt/) - `robots.txt` testing tool

[Back to top](https://github.com/tomik-z-cech/PP5-Ohm-Azing-Components/blob/main/README.md#ohm-azing-components---portfolio-project-5)

---