CI_PP5_Happiness Junkie
Happiness Junkie is an ecommerce store for a business that sells handmade knits, stickers and foil prints. It has been developed as part of the code institute diploma in full stack software development and is the 5th project of the course.
2 user accounts have been set up:
- An admin user account has been set up with username = charlie and password = admin123
- A standard user account has been set up with username = johnsmith and password = User123!
- Making a payment as a user, a test credit card of 4242424242424242 has been set up for the card number
- The expiry date, cvc and postal code/state code can use any mix of numbers but must meet the minimum amount for it to work
Table of contents generated with markdown-toc
- To register for an account on the website and receive an email after successful registration
- To login or logout from the website
- To recover my password in case it is forgotten
- To have a personalised user profile with showing booked classes
- To post a comment on a blog post
- To view website news, and comment on a news item
- To add, edit and delete PT sessions
- To add, edit and delete website news and events information
This is a business to customer application based on a side business that my wife is setting up. The site offers handmade items giving that local feel whilst offering the items globally. The materials are bought from wholesale and assembled by staff to be shipped to customers.
The business has a facebook page, screenshot here if unavailable to view directly, which can be access via the link in the footer of the site.
The site has a sitemap.xml generated to be used in conjunction with the robots.txt file. Meta tags and semantic markup have been implemented in the site.
Epic 1 - Core Functionality:
- As a user I can experience the site on mobile or desktop so that I can have the same experience whether on the go or at home
- As a user I can navigate the site intuitively so that I can have an enjoyable experience and see all that is offered by the site
- As a user I can access all parts of the site through a navigation bar or footer links so that I can view all content of the site
- As a user I can receive feedback from the site when I interact with the site so that **I know if there are any issues or confirmations when using the **site functions
Epic 2 - Products:
- As a user I can view all products so that I can see all that the store has on offer to buy
- As a user I can filter products into categories so that I can only view products that I want to see
- As a user I can see if the products have any variations so that I can get the exact product I want
- As a user I can add a product to a wish list so that I can save products I like for a future purchase
Epic 3 - Orders/Cart:
- As a user I can view all items added to the cart so that make any amendments I wish to make
- As a user I can purchase the items in the cart using my payment card
- As a user I can get confirmation/error messages when interacting with the cart so that I am aware if there are any issues or payment has been taken successfully
Epic 4 - Admin Functionality:
- As an admin user I can add/update/delete products from the store so that the store is kept up to date
- As an admin user I can log in to the backend admin site so that I can manage any potential issues
- As an admin user I can log in on the frontend and make changes to products so that the store is kept up to date
Epic 5 - User Account:
- As a user I can register for an account so that I can save delivery information and order history
- As a returning user I can log in to my account and view order history and/or update saved delivery detail
- As a user I can clearly see if I am logged in or not
- As a user I can reset my password via if I forget it so that I can use my account without having to wait for an admin to do it manually
- As an admin user only I can see admin functions that a standard user shouldn't be able to access so that changes to the site can only be performed by the site staff
- As a user I can have my account information auto-populated when logged in so that I don't have to waste time typing out the information again
Epic 6 - Blog:
- As a user I can view blog posts on the site so that I am updated with what is happening with the business
- As a user I can comment on the blog posts so that I feel I am contributing to the sites community
- As an admin user I can add/update/delete blog posts so that the site can keep its community up to date with what it is doing
- As an admin user I can approve comments left by users so that checks are in place to keep in line with community guidelines, for example profanity
- As a user I can view blog posts without being logged in so that if I am viewing the site for the first time up-to-date information isn't hidden
Epic 7 - Marketing:
- As an admin user I have created a Facebook business page to give the business a social presence to create engagement and boost the marketing of the site
- As an admin user I have researched search terms and keywords that are used within the site to boost the site's visibility on search engine websites
- As a user I can sign up to a newsletter so that I am kept up to date with the latest offerings from the store directly to my email inbox without having to visit the site
The color scheme was taken from the colors found in the hero image
I have used Roboto as the body text and Abril Fatface for the headers. Both fonts are from google fonts and compliment well. Sans-serif is in place as a backup should the browser not be able to load the primary fonts.
The wireframes for the site were created in Figma and are linked below for Desktop, Tablet and Mobile devices.
The below diagram shows all of the fields stored in the database, with details of their data types, and how it is structured.
- Git Used for version control of the site and push code from VScode to Github
- Github Used as the remote repository to store the code. Github pages is also where the live site is hosted.
- Visual Studio Code Used as the IDE for writing the code and file management
- Adobe Photoshop Used to edit and crop all image sizes on the site as original filesize were too large and affected performance
- Google Fonts Used for Spectral font throughout the site
- Font Awesome Used for various icons throughout the site
- Bootstrap Used for creating a responsive navigation bar used in every header of each page. Also used for creting a modal for a booking form used on each page. Modals were used for services page in which an accordion was created using bootstrap for each service category. Bootstrap also used for creating a carousel for the review section
- Figma Used for creating the wireframes
W3c Markup Validation Service has been used to validate all of the HTML code within the site. All pages have passed with 0 errors and 0 warnings. Click on the below to see each screenshot:
W3c CSS Validation Service was used to validate the CSS of the site. The stylesheet.css file returned with 0 errors. When running on the whole page it returned with 15 errors all of which can be attributed to Bootstrap v5.0. See below link to screenshot:
WAVE WebAIM web accessibility evaluation tool has been used to validate the site to the recognised standards when it comes to accessibility. All pages have passed with 0 errors. Click on the below to see each screenshot:
PEP8 has been used to validate all of the python code within the site. All files have passed with 0 errors. Click on the below to see each screenshot:
JSHint has been used to validate all of the JavaScript code within the site. All files have passes with 0 errors. Click on the below to see each screenshot:
I started the project with completing test driven development and saw a real benefit to it however due to time constraints I was unable to continue. Below is the coverage report for the test that have been written:
1. As a user I can experience the site on mobile or desktop so that I can have the same experience whether on the go or at home
The application has been built with the thought of it being viewing on various devices. Below are screenshots of the different medias:
2. As a user I can navigate the site intuitively so that I can have an enjoyable experience and see all that is offered by the site
| Feature | Action | Expected Result | Actual Result |
|---|---|---|---|
| Open products page | Click on shop button on homepage | Products page loads with listed products available | Works as expected |
3. As a user I can access all parts of the site through a navigation bar or footer links so that I can view all content of the site
| Feature | Action | Expected Result | Actual Result |
|---|---|---|---|
| Use navbar to navigate pages | Open homepage and click on all products link in navbar | Products page loads with listed products available | Works as expected |
Covers user story 5 also.
4. As a user I can receive feedback from the site when I interact with the site so that I know if there are any issues or confirmations when using the site functions
| Feature | Action | Expected Result | Actual Result |
|---|---|---|---|
| Login success message | Open homepage and click on my account link in navbar. Then select login from the dropdown menu. Enter login information and press sign in. Success message will be displayed | Success message displayed when correct credentials are used | Works as expected |
6. As a user I can filter products into categories so that I can only view products that I want to see
| Feature | Action | Expected Result | Actual Result |
|---|---|---|---|
| Filter products based on category | Open homepage and click on categories link in navbar. Then select Foil Prints from the dropdown menu. | Only products in the foil prints category will be displayed | Works as expected |
7. As a user I can see if the products have any variations so that I can get the exact product I want
| Feature | Action | Expected Result | Actual Result |
|---|---|---|---|
| Select a variation for a product | Open homepage and click on categories link in navbar. Then select Foil Prints from the dropdown menu. Select the Ironman Quote Foil Print | Product deails page is displayed with the option to select a foil print color | Works as expected |
| Feature | Action | Expected Result | Actual Result |
|---|---|---|---|
| View cart once items have been added | Open homepage and click on categories link in navbar. Then select Foil Prints from the dropdown menu. Select the Ironman Quote Foil Print. Click on the add to cart button then on the cart button at the far right of the navigation bar | Cart page is displayed with the products that have been added | Works as expected |
| Feature | Action | Expected Result | Actual Result |
|---|---|---|---|
| Purchase items that have been added to the cart | Open homepage and click on categories link in navbar. Then select Foil Prints from the dropdown menu. Select the Ironman Quote Foil Print. Click on the add to cart button then on the cart button at the far right of the navigation bar. Now click the secure checkout button and fill in required details. Finally click complete ordered and purchase will be processed | Thank you page is displayed with the transaction details for the order | Works as expected |
- Bug: Issue when placing order in checkout view.
- Fix: Typing error in the env variables in heroku.
- Bug: Issue when signing up for an account.
- Fix: Incorrect variable names in environment.
- Bug: Delete function not working on products or blog for admin users.
- Fix: Modal delete link incorrectly wrapped in html file.
- Bug: Images not loading for blog posts.
- Fix: Missing {{MEDIA_URL}} tag from src path
- Bug: Adding a product with a variation causing an internal server error.
- Fix: Updated code in context.py and views.py - see commit
Code Institute tutorial and Django Blog cheatsheat were followed to complete deployment.
- Enter following command in the terminal so that the relevant files needed for Heroku to install your project dependencies are created -
pip3 freeze --local > requirements.txt. AProcfileis also required that specifies the commands that are executed by the app on startup.
- Go to Heroku.com and log in or create and account if you do not already have one.
- Click the
Newdropdown and selectCreate New App. - Enter a name for your new project, all Heroku apps need to have a unique name, you will be prompted if you need to change it.
- Select the region you are working in.
Environment Variables need to be set up - this is key to make sure your application is deployed properly.
- In the resources tab install 'Heroku Postgres'
- In the Settings tab, click on
Reveal Config Varsand set the following variables:- SECRET_KEY - your chosen key
In the Deploy tab:
- Connect your Heroku account to your Github Repository following these steps:
- Click the
Deploytab thenGithub-Connect to Github. - Enter GitHub repository name and click
Search. - Choose the correct repository and click
Connect.
- Click the
- Choose to deploy the project manually whilst getting deployment correct. Automatic deployment can be set after and will generate a new application every time you push a change to Github.
- Click
Deploy Branchyour application will be built and once complete clickopen appto view deployed application.
- Bootstrap for the following components: navbar, modals
- Colormind for creating the colour pallette
- YouTube for many tutorial videos on different javascript aspects.
- w3school and mdn web docs for a great resource when stuck with how to get a specific piece of javascript code to work.
- stackoverflow for various issues along the way
- unsplash for the blog post images
My family for supporting throughout this process



























































