Skip to content

Repository files navigation

WEBI

WEBI Mock Up

Purpose

Welcome to WEBI - an e-commerce website where I offer my freelance marketing, design and web development services. I decided to create WEBI to help small businesses and startup companies, who often have a small budget, to avail of affordable website services.

WEBI is a multi-page e-commerce web application which not only offers services to its users, but also informative blog posts and case studies. Its initial vision was to offer website services which comprised of website 'Bundles' and 'Add-ons', but as the project evolved this led to simply an umbrella 'Services' offering. This evolution is mapped out further in the README document under the Structural Evolution section.

IMPORTANT: Please note, this project is for educational purposes only.

Visit WEBI at webi-t0p6.onrender.com/


Table of Contents


User Experience Design

User Stories

USER STORY IDAS AI WANT TO BE ABLE TOSO THAT I CAN
Viewing and Navigation
1ProspectView a list of services availableSelect a service to buy
2ProspectView specific types of servicesEasily find a service suited to my needs
3ProspectView individual service detailsIdentify the service price, description and suitability
4ProspectEasily view the total of my purchasesEnsure total cost falls within my budget
5ProspectRead blogsExpand my knowledge on digital
6ProspectReview case studiesTrust the quality of the freelancing services on offer
Registration and User Accounts
7ClientEasily register for an accountSetup my own personal area on the website to see my order history and profile
8ClientEasily login or logoutAccess my personal account information
9ClientEasily recover my password if I forget itRecover access to my account
10ClientReceive an email confirmation after registeringVerify that my account registration was successful
11ClientHave a personalised user profileView my personal order history and progress
Sorting and Searching
12ProspectSort the list of all available servicesQuickly find a service that meets my requirements
13ProspectSort services by a specific typeNarrow down services to those of interest
Purchasing and Checkout
14ProspectView items in my bag to be purchasedSee what the total cost of items in my basket are
15ProspectAdjust the quantity of individual items in my bagMake changes to items in my basket before checking out
16ProspectEasily enter my payment informationPurchase my desired services
17ProspectFeel my personal and payment information is safe and secureFeel comfortable in providing my payment information to make a purchase
18ProspectView my order confirmation after checkoutEnsure I have made the correct purchase
19ProspectView the progress of my orderI know when I can expect it to be ready
Admin and Store Owner
20Admin/ Store OwnerAdd a serviceAdd new items to my store
21Admin/ Store OwnerEdit/update a serviceAmmend service decriptions, price and images
22Admin/ Store OwnerDelete a serviceRemove any services which are no longer being sold
23Admin/ Store OwnerEdit/ update the status of an orderUpdate clients of their order progress

Design Inspiration

Before designing this website, I explored similar sites online to get an idea of the look and feel of websites in the industry. One company which really stood out to me was WebStudio. I drew great inpsiration from this website both strucutrally for my database and design-wise.

Colour Scheme

I researched colour schemes on Google and used Adobe's colour picker to choose the blue and pink shades for this website. I selected blue to represent professionalism and pink to show creativity and a nice contrast to the blue. Their Hexadecimal values are listed below:

ColourHex Value
Blue#093d60
Pink#feb5c5

Typography

The fonts chosen for this website are Lato for headings and Roboto for the paragraph text. These are both sans serif fonts and I imported them into the CSS file from Google Fonts.

Logo

I created the logo using Adobe Illustrator. I wanted a modern, clean and sans serif font for the logo and decided on Roboto Regular for this. The colours chosen were a combination of the blue and pink listed in the colour scheme above. The image below demonstrates how the logo should be used against dark and light backgrounds:

Back to top


Website Structure

Wireframes

I created wireframes for this web application using balsamiq:

Desktop WireframesMobile WireframesTablet Wireframes
HomepageHomepageHomepage
BundlesBundlesBundles
Add-onsAdd-onsAdd-ons
AboutAboutAbout
BlogBlogBlog

Strucutral Evolution

From the wireframes above, you can see that WEBI originally started out selling both 'Bundles' and 'Add-ons' to potential customers. Bundles offered a collection of Add-ons to purchase as a package.

These Bundles consisted of services such as an E-commerce store Bundle, a Static store Bundle and a Portolio Bundle. This meant that business owners who did not have a website, could purchase a package which delivered a website build, design, website pages etc. The Add-ons were additional services which could be included as part of a Bundle, or separately, if users required something more e.g. a logo design or a landing page etc.

The initial build of this website was setup to include the above and this can be demonstrated by the wireframes created and the models listed below under the 'Services App'. However, setting up the website bag, checkout and Stripe payments to house two separate Services models made for a complex build. Given the time constraints to launch the initial build of the web app, a decision was made to narrow the scope down into one Services model.

The result of this was a more straightforward website build and it ensured it was completed within the time constraints. Furthermore, the design of the new Services model closely matches that on the initial 'Add-ons' page and thus a new wireframe was not created for this.

Data Schema

Current Services App

Type Model

NameDatabase KeyField TypeType Validation
nameNameCharFieldmax_length=254

Category Model

NameDatabase KeyField TypeType Validation
NamenameCharFieldmax_length=254
Friendly Namefriendly_nameCharFieldmax_length=254, null=True, blank=True

Images Model

NameDatabase KeyField TypeType Validation
nameNameCharFieldmax_length=254
ImageimageImageFieldnull=True, blank=True
Image URLimage_urlURLFieldmax_length=1024, null=True, blank=True

Services Model

NameDatabase KeyField TypeType Validation
CategorycategoryForeignKey 'Category'null=True, blank=True, on_delete=models.SET_NULL
TypetypeForeignKey 'Type'null=True, blank=True, on_delete=models.SET_NULL
NamenameCharFieldmax_length=254
DescriptiondescriptionRichTextFieldn/a
PricepriceDecimalFieldmax_digits=6, decimal_places=2
ImageimageForeignKey 'Image'null=True, blank=True, on_delete=models.SET_NULL

OLD Services App's 'Bundles' and 'Add-ons' Models

Bundle Model

NameDatabase KeyField TypeType Validation
CategorycategoryForeignKey 'Category'null=True, blank=True, on_delete=models.SET_NULL
Service IDservice_idCharFieldmax_length=254, null=True, blank=True
NamenameCharFieldmax_length=254
DescriptiondescriptionRichTextFieldmax_length=350
PricepriceDecimalFieldmax_digits=6, decimal_places=2

Addon Model

NameDatabase KeyField TypeType Validation
CategorycategoryForeignKey 'Category'null=True, blank=True, on_delete=models.SET_NULL
Add-on IDaddon_idCharFieldmax_length=254, null=True, blank=True
NamenameCharFieldmax_length=254
DescriptiondescriptionRichTextFieldmax_length=350
PricepriceDecimalFieldmax_digits=6, decimal_places=2

Checkout App

Order Model

NameDatabase KeyField TypeType Validation
Order Numberorder_numberCharFieldmax_length=32, null=False, editable=False
User Profileuser_profileForeignKey 'UserProfile'on_delete=models.SET_NULL, null=True, blank=True, related_name='orders'
Full Namefull_nameCharFieldmax_length=50, null=False, blank=False
EmailemailEmailFieldmax_length=254, null=False, blank=False
Phone Numberphone_numberCharFieldmax_length=20, null=False, blank=False
CountrycountryCountryFieldblank_label='Country *', null=False, blank=False
PostcodepostcodeCharFieldmax_length=20, null=True, blank=True
Town or Citytown_or_cityCharFieldmax_length=40, null=False, blank=False
Street Address 1street_address1CharFieldmax_length=80, null=False, blank=False
Street Address 2street_address2CharFieldmax_length=80, null=True, blank=True
CountycountyCharFieldmax_length=80, null=True, blank=True
DatedateDateTimeFieldauto_now_add=True
Order Totalorder_totalDecimalFieldmax_digits=10, decimal_places=2, null=False, default=0
Grand Totalgrand_totalDecimalFieldmax_digits=10, decimal_places=2, null=False, default=0
Original Bagoriginal_bagTextFieldnull=False, blank=False, default=''
Stripe PIDstripe_pidCharFieldmax_length=254, null=False, blank=False, default=''

OrderLineItem Model

NameDatabase KeyField TypeType Validation
OrderorderForeignKey 'Order'null=False, blank=False, on_delete=models.CASCADE, related_name='lineitems'
ServiceservicesForeignKey 'Service'null=False, blank=False, on_delete=models.CASCADE
QuantityquantityIntegerFieldnull=False, blank=False, default=0
Line Item Totallineitem_totalDecimalFieldmax_digits=6, decimal_places=2, null=False, blank=False, editable=False

Case Study App

Case Study Model

NameDatabase KeyField TypeType Validation
TitletitleCharFieldmax_length=50
slugslugSlugFieldmax_length=200, unique=True
ImageimageImageFieldnull=True, blank=True
Image URLimage_urlURLFieldmax_length=1024, null=True, blank=True
FeaturedfeaturedBooleanFielddefault=False
Website URLwebite_urlURLFieldmax_length=1024
GitHub URLgithub_urlURLFieldmax_length=1024
HeadingheadingCharFieldmax_length=200, default='Heading'
Case Study Contentcase_study_contentRichTextFielddefault='Case study content'

Blog App

Blog Model

NameDatabase KeyField TypeType Validation
TitletitleCharFieldmax_length=50
slugslugSlugFieldmax_length=200, unique=True
Blog Imageblog_imageImageFieldnull=True, blank=True
Blog Image URLblog_image_urlURLFieldmax_length=1024, null=True, blank=True
HeadingheadingCharFieldmax_length=200
Published Datepublished_dateDateFieldmax_length=200
Blog Contentblog_contentRichTextFielddefault='Blog content'

Back to top


Features

In this section I will map out all of the existing features, and features left to be implemented, and match these with the User Stories previously outlined above.

Existing Features

Viewing and Navigation

[User Story ID's 1-6]

  • WEBI provides users a multi-page site with an intuitive design which allows users to navigate smoothly between pages
  • On the Services page, users are presented with a clear list of service types to choose from at the start so they can filter the results to match their needs or view all
  • Users can click to 'find out more' about a service of interest which brings them to a more detailed service description page
  • On the main navigation menu, users can go to the Blog or Case Studies page which display a list of available blogs and case studies to read
  • On the Blog and Case Studies pages, users can click to read more to get the full length version of the posts
  • Users can easily view the total of their purchases in their bag or on the navigation menu in the top right beside the basket icon

Registration and User Accounts

[User Story ID's 7-11]

  • Users can easily navigate to register for an account via the drop down 'My Account' menu
  • For users with an existing account, they can sign in via the drop down 'My Account' menu and once signed in, a Sign Out button will appear for them in the dropdown menu also
  • Users will receive notifications upon sucessfully signing in and signing out
  • Logged in users will have access to a personal profile which displays their order history

Due to time constraints, the 'progress' part of User ID 11 was not implemented. However, this has been moved to the upcoming features to be implemented below.

Sorting and Searching

[User Story ID's 12-13]

  • Users are able to filter the category 'Service' by Type on the Services page
  • Users are presented with a clear list of service types to choose from at the start so they can filter the results to match their needs or view all
  • Users can change between different filter options to see the available services for that specific filter

User story 12 no longer applies as the website is not devided into Bundles and Addons. Instead Services is the only category which can be narrowed down by type.

Purchasing and Checkout

[User Story ID's 14-19]

  • Users can easily access their bag by clicking on the basket icon in the top right corner on the navigation menu
  • Users are presented with a view of all of the services they've added to their basket on the bag page
  • Users can easily add or delete the services in their bag by clicking on the -/+ icons
  • When users have finished a purchase, they are presented with a clear overview of their order afterwards
  • The 'Secure Checkout' button ensures that users feel comfortable to provide payment information

Due to time constraints, User Story ID 19 was not implemented. This has been included in the upcoming features to be added below.

Admin and Store Owner

[User Story ID's 20-23]

  • The store owner or admin can easily edit, add or remove an existing service from the store by navigating to the 'Service Management' page in the 'My Account' drop down menu
  • Super Admins can edit the store via the Admin panel

Due to time constraints, User Story ID 23 was not implemented. This has been included in the upcoming features to be added below.

Features To Be Implemented

  • The website delivery cost functionality was set up with the plan of changing it to a discount should an order reach a certain value. However due to time constraints this was not implemented. Note is taken that 'Delivery Costs' doesn't apply to services and this is to be implemented with priority on the next update.
  • Allow users to see the progress of their order
  • Provide Admins/ Store Owners with the funcitonality to edit/update the status of an order
  • Implement website Bundles/ Packages to group related services for the user
  • Improve Services Management functionality to allow admins to upload a new service image and format the text (e.g. bold text & bullet points)

Styling Fixes Below I have outlined the styling fixes which are still to be implemented in a future udpate:

  • The 'Description' box on the Services Management page for Admin users is appearing lesser in width than the other form input fields. A fix couldn't be found for this issue prior to the app launch and will be addressed in a future release
  • Wrap text around blog post images
  • Implement JavaScript on the nav bar to update the text to bold when users click to change page
  • Implement JavaScript on the services filter menu so it changes colour when users change between service types

Back to top


Testing

The testing of this website can be found in the TESTING.md file.

Back to top


Technologies Used

Languages

  • HTML was the main language used to create this website
  • CSS was used to add bespoke design
  • JavaScript was used to create interactive elements on the website
  • Python was used for the backend of the website

Libraries and Frameworks

  • Django was used as the Python-based web framework
  • Bootstrap was used as the front-end framework
  • Google Fonts was used to find, sample and import fonts for the logo and website
  • Font Awesome was used for icons across the website
  • CKEditor was used to set up a Rich Text Editor in the Heroku admin panel

Tools

  • Git was used as the version control software to add, commit and push code to the GitHub repository
  • Gitpod was used as the development environment to write my code
  • GitHub is the hosting site used to store the source code for the Website
  • Heroku was used to run the application in the cloud
  • W3C Markup validator was used regularly to check for any errors in the HTML on the site
  • W3C CSS validator was used regularly to check for any errors in the CSS on the site
  • Web Accessibility was used to test the website's accessibility to people with disabilities
  • Adobe Illustrator was used to create the logo and high fidelity mock ups
  • TinyPNG was used to reduce the size of all the images on the website
  • balsamiq was used to create low-fidelity wireframes of the website
  • JSHint was used to test the JavaScript code for errors
  • PEP8 Online was used to check for PEP8 compliance
  • TableConvert was used to convert csv data to markdown tables
  • Temp mail was used to create a temporary email address to test the sign up page
  • AWS was used to host static files
  • STRIPE was used to setup the website payment functionality
  • Gmail was used to send emails with Django

Back to top


Deployment

Project Creation

This project was created on GitHub using the following steps:

  1. On Github, a new repository named ‘webi’ was created by navigating to ‘New’ on the Repositories page, selecting the CI full template, providing a ‘Repository name’, ‘Description’ and then clicking ‘Create repository’
  2. Once the repository was created, I clicked the ‘Gitpod’ button to create the workspace in Gitpod
  3. Version control was used throughout the project using the following commands: git commit -m "descriptive updates" - This command was used to commit changes to the local repository
  4. git push - This command was used to push all committed changes to the GitHub repository

A new Django project was created as follows:

  1. In the terminal, type ‘pip3 install django’ to install Django from the Python package index (version 3) and install in Gitpod
  2. To create the project in the current directory, type ‘django-admin startproject webi .’ in the terminal
  3. A .gitignore was created by typing ‘touch .gitignore’ in the terminal (included in CI template) which excluded our development database file (.sqlite3) and compiled Python code (.pyc and pycache) we don’t need in version control
  4. Test Django is installed correctly by typing ‘python3 manage.py runserver’ in the terminal
  5. Run the initial migrations by typing ‘python3 manage.py migrate’ in the terminal

A super user was created as follows:

  1. Type ‘python3 manage.py createsuperuser’ in the terminal
  2. Set a username, email address and password

In Django a SECRET_KEY is automatically included in the settings.py file. This was removed after the initial commit as follows:

  1. Find a Django Secret Key generator online and copy SECRET_KEY
  2. Set the secret key in the environment variable
  3. Check the server still runs
  4. Push to GitHub

Local Deployment

The following steps are required to run this locally:

  1. Go to the GitHub repository
  2. Click the 'Code' dropdown menu
  3. Copy Git URL from HTTPS box (https://github.com/JessicaJuliet/webi.git), or select to download the ZIP file
  4. If usings the Git URL, open a new terminal in your IDE and type the 'git clone' command in the CLI and paste the copied URL
  5. A clone of this project will be created locally on your machine
  6. Alternatively, if you download the ZIP, unpackage locally and open in your IDE

Heroku Deployment

  1. Create Heroku App

    • Go to Heroku.com
    • Click to create new app
    • Name the app and select region closest to you
    • Then on the Resources tab, provision a new 'Heroku Postgress' database
    • In Gitpod, install dj_database_url and psycopg_2 using the following commands:

    pip3 install dj_database_url

    pip3 install psycopg2-binary

    • Freeze requirements to ensure Heroku installs all our app requirements when deployed:

    pip3 freeze > requirements.txt

  2. Setup Database

    • Import dj_database_url in settings.py

    import dj_database_url

    • Comment out the default Database configuration in settings.py and replace with a call to dj_database_url with the database URL from Heroku (can retrieve from Heroku settings tab)

    DATABASES = { 'default': dj_database_url.parse('postgress_url') }

    • Run migrations:

    pythong3 manage.py migrate

    • Import service data

    python3 manage.py loaddata categories python3 manage.py loaddata types python3 manage.py loaddata images python3 manage.py loaddata services

    • Remove Heroku database config before committing
  3. Create a superuser

  • To create a super user to log in with use:

python3 manage.py createsuperuser

  1. Commit changes
  • Remove Heroku database config and uncomment original so the Database URL doesn't end up in version control
  • Commit changes"

git add . git commit -m "commit message" git push

Hosting Files Via AWS

In order to host static files and images with AWS, you will need to create an AWS account. After that, you are required to create the following in AWS:

  • AWS S3 Bucket
  • Bucket Policy
  • Group Access Policy
  • A User

Further information on this process can be found on Amazon AWS. After the above has been completed, you are required to connect Django to S3. More detailed information on connecting Django to S3 can be found here.

Sending Emails Through Gmail

Sending automatic emails with Django was carried out using the following steps:

  1. Setup a Gmail account (or use an existing one if you already have one)
  2. Login to your account and go to the account settings
  3. Click 'Accounts and Import' and then 'Other Google Account Settings'
  4. Navigate to the Security tab and turn on 2-step verification
  5. Select a verification method
  6. Go to 'App Passwords' under the 'Signing in to Google' heading
  7. Select 'Mail' for the app and select 'Other' for device type and type in Django
  8. Copy the 16 character password in Heroku
  9. Navigate to Heroku and put it under EMAIL_HOST_PASS config variable
  10. Then, put the Gmail e-mail under the EMAIL_HOST_USER config var

Back to top


Credits

Code

Acknowledgements

  • A huge thank you to my mentor Simen for his support, encouragement and motivation which he provided me with throughout this entire project
  • Thank you to the Code Institute's mentors for helping me to resolve some of the most complicated bugs
  • Thank you to all of the supportive members of the Code Institute's Slack channel who helped me when the bugs got tough!

Back to top

About

WEBI is an e-commerce store in which I offer my freelance website development, design and marketing services for small businesses and startups. This website was built using HTML, CSS, Python, JavaScript, Django and Bootstrap.

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages