The local farm shop site that promotes their products online with the ability to reserve goods in advance.
Live site location:
Purple Rooster Farm Shop Website
The typical website user is interested in sourcing local farm products.
The site owners goal is to promote products that is for sale in the local farm shop and administrator reservations from website users.
- As an admin user, I would like to CRUD my products to the website so my customers can see what the farm shop currently sells.
- As a user, I would like to click and collect items for later pickup in the farm shop, so I know items are available when I visit the shop on site.
- As an admin, I would like to CRUD all click and collect so I can see all reservations and remove reservations.
- As a user, I would like to login to the site and see my click and collect, so I can follow up on what I have for pickups.
- As an admin, I would like to login to the site, so I can administer products, click and collects & users.
- As an admin, I would like to comment on the click and collect, so I can let other admins know if there is anything to mention.
Site screenshots are found in the project folder /wireframes.
Site wireframes:
- Front page search meal page, showing search results. Also acts as site index page
- Product detail page displays product details.
- basket page displays selected items prepared for reservation.
- admin page displays user details including clicks and collects.
The website contains a clear navigation on every page. The site is based on a navigational hierarchical tree structure. Navigation bar is responsive and will fold down to a burger menu when it wont fit the size.
Navigation items: Home Category navigation Click and collect basket Sign in (only anonymous users) My page (only signed in users) Admin (only signed in admins)
Each page includes a footer element containing copyright information about the site.
- Sign in/out - allows users to sign in to see reservations made and sign out when the user would like to leave.
- Sign up - allows users to sign up for an account so users don't have to fill out the information again.
- Find products by category - allows users to find products based on category.
- Add to click and collect basket - allows users to add product to a basket while navigating on the site.
- Create click and collect reservation - send current click and collect basket to the farm shop.
- Set requested pickup date
- Administrate users - CRUD
- Administrate products - CRUD
- Administrate categories - CRUD
- Administrate reservations - CRUD
- Upload product images to external CDN for use on this website.
- Front page shows random products
MongoDB is used to store all data. Within one cluster ("Cluster0") the database "roosterDB'' contain the following collections:
Users collection holds client contact and access information.
field | type | description |
---|---|---|
_id | ObjectId | unique record id |
name | string | Holds client Full name |
string | Holds client email address | |
password | string | user hashed password |
isAdmin | Boolean | Gives user admin access |
Categories collection holds a list of the different product categories.
field | type | description |
---|---|---|
_id | ObjectId | unique record id |
name | string | Holds Category name |
Products collection holds information about each product.
field | type | description |
---|---|---|
_id | ObjectId | unique record id |
name | string | Holds product name |
description | string | Holds product description |
price | Decimal128 | product item price |
image-url | string | Holds url to product image |
categories | Array | Array of categories id's |
Reservation collection holds each reservation in separate records.
field | type | description |
---|---|---|
_id | ObjectId | unique record id |
client_id | ObjectId | Client id |
client-name | string | Holds client Full name |
client-email | string | Holds client email address |
products | Array | Holds an array of product objects |
order-comment | string | Client order comment |
order-date-pickup | Date | Date when client pickups order |
order_placed | Boolean | True when customer placed the order |
Each product client would like to reserve.
field | type | description |
---|---|---|
id | string | products id reference |
name | string | Holds product name |
amount | Int32 | Number of items client would like to reserve |
price | Decimal128 | product item price |
sum | Decimal128 | the product of the amount and prices |
The sample products, information and images is provided from Product daylesford.com
About text is used from Tapnell farm
Site uses sans-serif to stay clean on all supported platforms.
The site color scheme is wooden and high contrast, with user information text and navigation bar in light color
- Restore password flow
- Send click and collects as email
In this section, all of the languages, frameworks, libraries, and any other tools that are used to construct this project are listed with its name, a link to its official site and a short sentence of why it was used.
- HTML5
- Used to render the DOM
- CSS
- Used to layout the site.
- Javascript
- Used to handle site code logic and API integrations
- Python+Flask
- used to render site and connect to database
- MongoDB
- Used to store all data.
- Bootstrap
- used to make site responsive
- Fontawesome
- Used to display icons on website
- JQuery
- The project uses JQuery to simplify DOM manipulation.
- boto3
- Used to create, configure, and manage AWS services.
Site is tested on the following platforms and browsers
- Mac
- Google Chrome (93.0.4577.82)
- Safari (14.1.2)
- Firefox (92.0)
- Windows 10
- Google Chrome (93.0.4577.82)
- Edge (93.0.961.52)
- Firefox (92.0)
- Iphone 12
- Safari (latest)
- Google Chrome (latest)
- Samsung Galaxy S10
- Google Chrome
All tests pass on all platforms.
- feature test:
- Goto
https://purple-rooster.herokuapp.com/
- click items in navbar
- confirm navbar active state and general look.
- Goto
Feature passed this test
- feature test:
- Go to a https://purple-rooster.herokuapp.com/signin
- use username
[email protected]
and passwordbad
- Confirm incorrect Username and/or Password.
- use username
[email protected]
and password123456
- Confirm successful sign in.
- change your user name and press
Save name
Feature passed this test
- feature test:
- When signed out, Go to https://purple-rooster.herokuapp.com/register
- register with name
My name
and email[email protected]
use any password - confirm username already exists message
- register with name
Your Name
and email[email protected]
use password123456
- Confirm Registration Successful!
- sign in with new username
- confirm successful login
Feature passed this test
- feature test:
- When signed in, Go to https://purple-rooster.herokuapp.com/me/overview
- click
sign out
next to username in header - confirm you are signed out and redirected to sign in page
Feature passed this test
The site has a click and collect feature by adding items to a basket and from basket click click and collect. The user can select a pickup date and place the order.
The feature handles errors & success in the UI.
The feature handles errors & success in the UI.
- feature test:
- Go to front page
- Click
Add to basket
on any product - Click
Add to basket
on another product - Confirm by click on cart in top menu
- step up a couple of steps on product row and press update
- press the trash icon on one of the rows and confirm the item is removed.
Feature passed this test
- feature test:
- with items in basket
- go to https://purple-rooster.herokuapp.com/basket
- click
Click and Collect
button in the bottom of the form - select Select your prefered pickup date in the date time field and press
set pickup date button
- modify your items and confirm functions update and remove
- click the
Place Click and collect
- confirm your order is placed
Feature passed this test
The site has an administrator section where the site can be controlled.
The feature handles errors & success in the UI.
The feature handles errors & success in the UI.
- feature test:
- When signed out, Sign in as
[email protected]
and password123456
- In the navbar click the toolbox (https://purple-rooster.herokuapp.com/admin/collect)
- Click on any sample Click & Collect made to open up details
- confirm pickup date, comment and items row can update on request using
Save changes
- confirm a sample click and collect can be deleted by clicking
delete
- When signed out, Sign in as
Feature passed this test
The feature handles errors & success in the UI.
- feature test:
- in the admin section click
Categories
in the horizontal toolbar. - Press
create new
- Give the new category the name
Test
and pressSave
- Confirm toolbar get the new category
Test
- Go back to Category
Test
and clickDelete category
- Confirm
Test
is removed from toolbar
- in the admin section click
Feature passed this test
The feature handles errors & success in the UI.
-
feature test:
- in the admin section click
Products
in the horizontal toolbar. - Press
create new
at the bottom of the page. - Give the new product the name
Test product
- Give the new product the description
A test description
- Give the new product the price
10
- Select category
Meat
- Press
Save
- Download sample image to your local desktop from https://purple-rooster.herokuapp.com/static/assets/testproduct.jpg
- click choose file and select the sample image from your local desktop or image library on mobile device.
- Press upload and confirm
file uploaded
message - In the top navbar click
Meat section
and confirmTest product
is there. - Go back to https://purple-rooster.herokuapp.com/admin/products and click on test product
- Press
Delete product
and confirm the product is deleted in the list.
- in the admin section click
Feature passed this test
The feature handles errors & success in the UI.
-
feature test:
- sign out and register a test user.
- Sign in as
[email protected]
and password123456
- In the admin section click
Users
in the horizontal toolbar. - Click on the user created in step 1
- confirm name change, email change and set as admin change when
Save
is clicked - Confirm the user is removed when
delete
is clicked.
Feature passed this test
- Goto https://purple-rooster.herokuapp.com/nothing
- Confirm you get a "Page not found" Page
Feature passed this test
Each page should return no errors & warnings using validator.w3.org
Pages are validated without errors or warnings.
Site CSS should return no errors or warnings.
CSS files passed the test. Note that there are Bootstrap warnings.
- When clicking the navbar and a new route is made, style is flickering before landing on the correct style.
- Some tables uses table-responsive where user would have to scroll sideways where table columns won't fit.
- The template shop-homepage used has CSS warnings when running CSS validator.
- datetime fields in Firefox is not popups and date and time must be specified manually
Site is deployed to https://purple-rooster.herokuapp.com/ using Heroku.
Heroku is connected to the Github repository with automatic deployment from the branch main
.
Every push or merge to main will trigger a new deployment.
make sure you run pip3 freeze > requirements.txt
for all dependencies used.
Versioning of this project uses Github
- Fork the rooster repo
- In the terminal run
git clone https://github.com/{your-own-gituser-here}/rooster.git
- to fetch code - In the terminal run
cd rooster
- to place yourself in the root of the project. - In the terminal run
python3 app.py
- to start a dev environment.
A python3
should start using the file app.py
serving the Flask app and the site is now available on http://localhost:3000
.
The template shop-homepage used on this site is from Start Bootstrap
The photos used in this site were obtained from:
- daylesford.com
- background
- Modified with Adobe Photoshop
- rooster in logo
- Modified with Adobe Photoshop
- testproduct.jpeg
- Produced with Adobe Photoshop
- Live site screenshot is created by responsive design
- I received inspiration from code institute using sign in and register feature (and general knowledge)
- I received inspiration from create-amazing-password-forms
- I received inspiration from farmorslycka
- I received inspiration from beckettsfarm
- I received inspiration from stackoverflow for fixing background image on ios.