jambardev / County-Cricket-Tour-Blog

A project to create a blog for county cricket fans
0 stars 1 forks source link

County Cricket Tour Blog:

This blog site is a page that allows lovers of county cricket to come together and share their experiences of the 18 different county grounds.

The live application can be viewed here:

https://county-cricket-blog-a93042f7114f.herokuapp.com/

Purpose and Target Audience:

Problem Statement: County cricket is becoming an under appreciated form of the game with much of the online space taken up by international or franchise cricket. It can be hard for followers of the county game to find a space for a more reasoned, friendly discourse about county cricket specifically.

Purpose: This app will allow people who love and follow county cricket around the country to come together as a community. Share their thoughts on the game and the experience of attending matches. It will also allow for tips about making the most of the different host stadiums.

Target Audience: The target audience is quite simply anyone who loves county cricket.

User Stories

Wireframe & Initial Design:

Home Page

image image

Login/Register

image image

About

image image

Single Post

image image

Agile

To plan and create this project I used the Agile principles in conjuction with a projectboard on Github. This was the first time I had used Agile as an individual developer rather than as a part of a Hackathon team. However whilst I did not need to assign tasks I still found it useful to set out a plan to work through the project and work towards fulfilling the acceptance criteria of User Stories.

image

Design Choices

As the main purpose of this project was the functionality of the site I did not focus too much on the design of the site. However my main aim was for a easy to navigate site that enhanced the user experience and layed out the information of the blog posts in a clear way.

Colour Scheme

I selected the main colours of the site with cricket in mind. The dark read of the navigation options and page titles was based on a cricket ball. The green of the header and footer the pitch. The backgroudnd white the colours worn during county cricket.

8B0000 - Dark red for the navigation options and page titles

56ad56 - Green for the header and footer

Database Design

Below is a simple database design for the project, created on Excel. This was important to visualise how my models would relate to each other and shows the data needed for each model.

image

User Flow Chart

I used Lucidchart to create a simple user flow chart to demonstrate how a user would be able to move through the site.

image

Main Features:

Home Page

The home page of the site shows the latest posts from the community. These are viewable for anyone visiting the site and you can click on a post to view the content in detail. However to create a new post or comment on an existing one a user must be authorised. From the home page you can also access, the about, register and login pages.

image

About page

The about page of the site gives a brief introduction and some basic guidelines, i.e always be kind. It also has what is the stock photo for the site currently. A county game taking place at the Riverside ground in Durham, taken by myself.

image

Register/Sign Up pages

These were created using the Django templates and allow a user to first register for the site and subsequently to login. Once logged in they can create posts/comment.

image image

Footer

Viewable on all pages, the footer contains links to social media sites. At some point in the future these will be links to profiles for the blog, at the moment they simply link to the homepages of each company. The footer, along with the header and navbar help provide consistency accross the site.

image

A post

By clicking on the title of an individual post on the homepage a user can view the blog post in it's entirety. If it is the user's own post they can delete it from here. If it is a different users post comments can be left. Once submitted comments can be edited and deleted. There is also a small comment counter that shows how many comments have been left on each post.

image image

Creating a post

Users who are logged in can add a new post by clicking the "New Post" link on the nav bar and completing the form. The dropdowns give the option of selecting where you saw the game (all 18 county grounds are listed) and the visitors. Once submitted this post will appear on the homepage for other users to view it. The most recent post will appear at the top left of the page.

image

Future Features

The current iteration of this project has been designed to meet the MVP of the task. In the future there are several features I would like to implement.

Validation:

HTML

I have used W3C validation service for the HTML and taken it from the page source of the live site.

Page Screenshot Result
Home image Pass: No Errors
About image Pass: Validator suggests changing the height and width of the image to a digit, trialled this but it works better as 100% so have left it.
Individual Post image Pass: Same issue as the about page with the image
Register image Pass: Errors shown in the validator. These are from the Django account templates, not issues I can fix.
Login image Pass: No Errors
New Post image Pass: No Errors
Edit Comment image Pass: No Errors

CSS

I have used the W3C Jigsaw validator for my CSS file.

It showed no errors as per the screenshot.

image

Python

App File Screenshot Result
blog admin image Pass: No Errors
blog apps image Pass: No Errors
blog forms image Pass: No Errors
blog models image Pass: No Errors
blog tests image Pass: No Errors
blog urls image Pass: No Errors
blog views image Pass: No Errors
countychamp asgi image Pass: No Errors
countychamp settings image Pass: No Errors
countychamp urls image Pass: No Errors
countychamp wsgi image Pass: No Errors

Testing:

I have completed the following manual testing of my app on both a laptop and a mobile device.

Browsers

I completed the testing on both Chrome and Safari. The functionality worked as expected on both, however on Safari there were some minor issues with the CSS and the navbar, as per the below image.

image

Links

Link Expected Outcome Outcome
Home Navigates to the home page when clicked Pass
About Navigates to the about the site page when clicked Pass
Register (navbar) Navigates to the register page when clicked Pass
Login (navar) Navigates to the login page when clicked Pass
Login (within register page) Navigates to the login page when clicked Pass
Sign up (within login page) Navigates to the register page when clicked Pass
Post titles Navigates to the individual post page for that post Pass
Next (if more than 6 posts on page) Navigates to the next set of blog posts Pass
Previous (if not on first page of posts) Navigates to the previous page of blog posts Pass
Social media icons Open a new window and navigates to the homepage of the relevant social media site Pass

Functionality

Whilst testing the below functions I also tracked that the associated message would pop up, confirming the action that the user had taken.

Feature Expected Outcome Outcome Screenshot
Register A new user can create a user profile Pass image
Login An existing user can log in to the site and once logged in the message confirming this remains in the navbar Pass image
New post An authorised user can create a new post Pass image
Delete own post A logged in user can delete their own posts, a second screen asks if they are sure Pass image
Cannot delete other posts A user cannot delete another users post Pass image
Leave a comment A user that is logged in can leave a comment on any post Pass image
Edit or delete own comment A user that is logged in can edit or delete their own comment Pass image
Cannot edit or delete other comments A user that is logged in cannot edit or delete another users comments Pass image
Comment counter The comment counter shows how many comments have been made on a post (Page made need to be reloaded) Pass image
Next/previous Only 6 posts will be displayed on the home page. To see more a user must press the next button, which will then display the next 6 posts. Can go back a page by pressing previous. Pass image
Logout A user can log out, a second screen confirms this is what they want Pass image
Not logged in If not logged in a user cannot add a post, comment, or edit any of their existing posts or comments Pass image
Pop up messages All pop up messages show the users previous action Pass image

Lighthouse Audit Tool

I've tested my app using the Lighthouse tool to check for any major issues. Some of the scores could be better, but overall they are ok.

Home:

image

About:

image

Individual Post:

image

Register:

image

Login:

image

Responsive Design

I have tested my app on a MacBook Air with a 13" screen, an additional 16" monitor and on a Samsung Galaxy 7 mobile. I have used Chrome dev tools to look at a tablet sized screen. Overall the app looks as it should accross all screen sizes. The main areas of responsive design are the home page and the view for an individual post. The home page when viewed as a desktop will show 6 posts in 2 rows of 3. A tablet will show 3 rows of 2 and a mobile will show a single column of posts. When viewing an individual post the image is no longer visible on a mobile. Another slight change for mobile devices is the layout of the navbar and title banner.

Laptop Home Page:

image

Tablet Home Page:

image

Mobile Home Page:

image

Mobile Title and Navbar:

image

Tablet Title and Navbar:

image

Laptop Title and Navbar:

image

Laptop Individual Post:

image

Tablet Individual Post:

image

Mobile Individual Post:

image

Tools and Technologies:

The technologies implemented in this app included HTML5, CSS, Bootstrap, Python and Django.

Languages Used:

Deployment:

I have used Heroku to deploy the project following the below steps. The link for the deployed project is https://county-cricket-blog-a93042f7114f.herokuapp.com/

Deployment Steps:

Create the Heroku App

Set Up Environment Variables

Create a Procfile and Push Changes

Heroku Deployment

Forking the Repository

Forking the GitHub Repository allows you to create a copy of the original repository and then make changes without affecting the original.

Creating a Clone of the Repository

Creating a clone enables you to make a local copy of the repository.

Bugs:

As with all developers I encountered several bugs when developing my project. The main one was to do with my post model. Originally I had a status field with the option for a post to be saved as a draft. However when draft was selected there was nowhere for the draft post to go. After a bit of trial and error I decided to remove this as an option so in the current version there is no status field. I also encountered some issues that were out of my control to do with the database which made the final stages of the project quite challenging.

An issue was also identified with the authorisation of users being overrided by copying and pasting the URL. I was able to solve this issue using login decorators for each view where it was required.

Credits: