saziosu / book-swap

Code Institute: Project 4. Grade: Distinction
https://book-swap-13f900a2d9c7.herokuapp.com/
0 stars 1 forks source link

BookSwap

BookSwap is a project to connect readers through swapping books.

Am I responsive image

Link for the finished deployed site: https://book-swap-13f900a2d9c7.herokuapp.com/

Table of Contents

Site Goals

The site's goals are to help connect readers and allow them to posts books they are willing to swap with each other. Readers are able to see available books, and see the book's information such as genre and the book's condition to help them decide if they want to contact the book's owner and organise a swap. This connects readers and is also a sustainable way of reading.

Each year consumers waste more than 16,000 truckloads of books which have not been read once. source

BookSwap has the potential to help make a positive impact on our environment by preventing wastage of unwanted books.

Agile Methodology

This project was developed using agile methodologies by utilising Epics and User stories. User storied were assigned to Epics. The Epics & User Stories were prioritised by labels. must have, should have, could have. A kanban board in GitHub was used to track these, with a not started, in progress, done, NINTH(not important, nice to have) and bug sections. When a user story is completed, it gets moved to the done section. The full kanban board can be viewed here: https://github.com/users/saziosu/projects/4/views/1

Labels

The labels are priorised as follows:

| must have | This feature/issue is required for the project to function | | should have | Important to implement but will not crash the project without but still key features | | could have | would like to have, but not essential to the project |

These result in the following stats:

label stats image This can be viewed directly here: https://github.com/users/saziosu/projects/4/insights/1

Epics

There are three Epics within this project:

EPIC: Account Management This epic focuses on the account management portion of the project. It involves creating accounts, signing in and logging out.

EPIC: Remote Book Swap This epic focuses on the features that allow the users to use the book swap functionality so that they can trade their books. The user must be logged in/authenticated to generate the post. The user should be logged in/authenticated to view the other user's contact details. If they are not logged in when they view the post, the contact details should be replaced with a request to log in to view them.

EPIC: Design & Experience This epic focuses on the overall styling of the website. The overall design and colour scheme of the website should be attractive and fitting with the theme of the project. Toast messages should give feedback to the user. Custom error pages should redirect the user back to the appropriate area of the site.

User Stories

Majority of User stories are linked to Epics. Labels are applied for prioritisation, such as must have, should have and could have.

Epic User Story Label
- As a Developer, I can deploy the website early so that I can avoid any technical issues or stress later in the project must have
Remote Book Swap As a User, I can create a book post so that I can other users can decide if they would like to swap must have
Remote Book Swap As a User, I can view other book posts so that I can decide which book I would like to swap with must have
Remote Book Swap As a User, I can edit my book post so that I can update my information must have
Remote Book Swap As a User, I can delete my book post so that I can manage my posts must have
Account Management As a User, I can create an account so that I can access features for authenticated users must have
Account Management As a User, I can reset my password so that I can access my account if I forget my password could have
Account Management As a User, I can update my contact details so that I can allow users to contact me for a swap could have
Design & Experience As a User, I can view a clean and attractive website so that I can have a positive experience should have
Design & Experience As a User, I can receive feedback messages so that I can gain feedback from the actions I have completed could have

Wireframes

The following wireframes were used to plan the look of the site: wireframes image

Design

Color Scheme

For the colorscheme, this palette from Canva was used for inspiriation: canva image

These were adjusted to ensure there was enough contrast on the site. The final colors used (made with coolers):

Coolers image

Typography

Fonts were chosen from GoogleFonts

Imagery

All images were chosen to match the theme of the site The hero image was sourced from Pexels The placeholder image was also sourced from Pexels The example Book images were sourced from Goodreads

Features

Current Features

Navbar

navbar image

The navbar was made with bootstrap. The user is shown the user they are logged in as on the right of the navbar. The navbar color was chosen based on the color palette selected for this project which is part of the user story Styling & Layout

Hero Section

hero image

The Hero image was chosen to match the theme of the website (books). The mission statement overlaying the image was also chosen in line with the selected color palette to give a positive experience to the user.

Info Section

info section

The info section on was added to give more context into what the website's function and aims are. Logged out users are encouraged to login and post their books. This information is not present for already logged in users so they are not seeing unnecessary information.

Sign Up

signup

The link for the signup page can only be seen in the navbar for users that are logged out. The signup page uses the base template from django-allauth. Users are required to sign up for an account if they want to post books, or see the contact details of the users that own the books. This is a part of the user story Account Creation

Login

login

The login page link is only viewable by users that are not logged in at the moment. Users must be logged in to view the contact details of the users that own the posted books. They must also be logged in to add their books that they would like to swap. This is also part of the user story Account Creation

Logout

logout

The logout page link in the navbar is only seen by users that are already logged in. The page asks the user to confirm that they are sure they want to log out of the account. If they log out, they are then unable to add books or view the contact details of the book owners' This feature is also a part of the user story Account Creation

Current Books

current books

The currently posted books are viewable on the homepage. There is a link to jump to this section of the page in the navbar. On larger devices, this shows 4 books per row. On smaller medium devices like tablets, this shows 3 books per row. On mobile, this gives 1 book per row to ensure its fully viewable. It includes the image of the book, the title, author and book's owner with the time posted. The user that made the post (if logged in), can see the edit button and edit straight from the homepage. This is part of the user story View Books

Read Book Posts

book detail

The detailed book post can be viewed by clicking on the card for the book post on the home page. This shows more details of the book like it's current condition. Condition was added because someone may not want a book that is only of poor condition, so this helps them make an informed decision. The genre is also included on this page, along with the book's blurb. The slug for this is generated from the title. If a book with the same name is added, the title is still used but a number is added to the end of the slug to ensure it is unique. This is also part of the user story View Books

Add Book

add book

The add-book can be accessed via the navbar for logged in users. There is also a button at the top of the current books section, if this button is clicked and the user is logged out, they are brought to the login page. This encourages the user to log in to continue with this action. The phone number field is set up to default to Irish numbers, but international dialling codes can also be used. This is part of the user story Create Book Post

Edit Book

edit book

The edit book page is only accessible by the user that made the book. They must be logged in to see this. If a user that is logged in, but did not post that book manually enters the url to edit that book in their browser, they will reach an error page and not be allowed to complete that action. The edit book page uses the same form as create book, so they are able to see all the previous information in that form so they can easily see what is currently there and edit it accordingly. This feature is part of the user story Edit Book Posts

Delete Book

delete book

The delete page is only accessible by the user that made the book, they must be logged in to see the delete button. If a user tried to reach the delete page for a book that they did not create they will get an error page and now be allowed to complete that action. This feature is part of the user story Delete Book Posts

Reserved Book

reserved book This is a boolean field in the database, it allows the user to confirm that the book has been reserved. A reserved book is pending a swap, so if the swap does not go ahead the user can edit it again and confirm that this book is available again. If the book has been marked as reserved, all users cannot see the book owner's contact details. This stops the owner from getting unnecessary contacts when their book is not available.

Messaging

messaging Messaging is added for actions like posting books, editing books, deleting books, logging in and logging out. This gives feedback to the user to give them feedback and show they have successfully completed their chosen action.T This feature is part of the user story Toast messages

Footer

footer The footer is at the bottom of the page, Bootstrap flex was used to keep the footer at the bottom of all pages. It includes links to Twitter, Facebook, Instagram and YouTube. These open in new tabs and include descriptive labels for accessibility.

Future Features

Accessibility

Technology Used

Languages

Frameworks, Libraries & Programs

Deployment & Development

Forking the Repository

  1. Log in or Sign up to GitHub
  2. Navigate to https://github.com/saziosu/book-swap.
  3. Click the 'fork' button in the top right corner.
  4. Feel free to customize your repo name, this is not required.
  5. Click the Create Fork button.

Deploy to Heroku

Heroku was used to deploy this site:

  1. Run pip3 freeze > requirements.txt in the console to set up the requirements.txt file. This command will create the file if it does not already exist.
  2. Commit any changes and push to GitHub.
  3. Navigate to Heroku's website and log in to the dashboard.
  4. Click on "Create new app" in the top right.
  5. Enter the "App name" and select your region, then click "Create App".
  6. Head to the Settings tab in the new app.
  7. Go to "Config Vars" under the Settings tab.
  8. Click on "Reveals Config Vars".
  9. Add the "CLOUDINARY_URL", "DATABASE_URL", and "SECRET_KEY" values generated for the project
  10. Add "PORT" key and "8000" value to the config vars.
  11. Move to the "deploy" tab on the app, and scroll down to the deployment method section.
  12. Select "GitHub" and connect to GitHub.
  13. Search for the appropriate GitHub repo and Connect.
  14. Select "Automatic deploys" or "Manual deploys" to deploy the application.

Testing

TESTING.md

Credits

Code

Media

Content

Acknowledgements

Top