Code Monkey home page Code Monkey logo

books-for-life's Introduction

Books for Life

Books for Life logo Am I Responsive Mockup

Table of Contents

Books4Life

Introduction

This website "Books for Life" is a fourth Portfolio Project of the Code Institute's Full Stack Web Development course. It is a Full Stack developed website. The website is built using Django 4.1 and Python 3.8. The database is hosted on ElephantSQL and the static files are hosted on Cloudinary. The website is deployed on Heroku. The website is a platform for book lovers to share their favourite books with other book lovers. It is a place where book lovers can find new books to read and share their own book recommendations. The idea for the website came to me in summer of 2023 when my dear friend Grace passed away. A decade ago she gave me a bookmark with the title "50 Books to Read Before You Die". She loved to read and share that love with others, generously and effortlessly. Therefore, this site is a tribute to her memory.

50 Books to Read Before You Die

User Stories

  1. As a new user, I want to be able to register for an account on the "Books for Life" website, so that I can log in with username or email, and password.

  2. As a registered user, I want to be able to edit my profile information, so I can easily change a password, and a profile picture.

  3. As a registered user, I want the option to delete my user profile so I can decide to leave the website.

  4. As a registered user, I want to add a new book to the website, so that its details would be added to the database.

  5. As a registered user, I want to be able to update the the books I've added, so I can correct the information of the record (title, author, image, descriptions).

  6. As a registered user, I want to be able to delete book details from my profile, so it will no longer be accessible.

  7. As a registered user, I want to be able to like a book review so that I can keep track of my favorite books.

  8. As a registered user, I want to see a list of all the books I've added to the website for easy reference.

  9. As a bibliophile and a registered user, I want to access a dedicated "Favourites" page, so I can see all the books I've liked in one place.

  10. As a bibliophile and a registered user, I want to search for books on the website, so that I can browse and discover new books added by all users on the website.

  11. As a registered user, I want to be able to use a contact form, so I can reach out to the website administrators with questions, feedback, or concerns.

Back to top ⇧

UX

Development Planes

Strategy

  • Objective: Create a user-centric site that encourages users to share and explore book recommendations, fostering a sense of community among book enthusiasts.
  • User Research: Conduct surveys and user interviews to understand the needs, preferences, and pain points of both new and experienced book lovers.
  • Competitor Analysis: Analyse similar platforms to identify gaps and opportunities in the market.
  • Persona Creation: Develop user personas representing various types of users, including new users, registered users, and bibliophiles.
  • Goals: Define measurable goals, such as increasing user engagement, time spent on the platform, and user-generated content.
Target Audience

Roles:

  • New Users (unregistered)
  • Registered Users
  • Bibliophiles (Book Lovers)
  • Administrators

Demographics:

  • Desire to learn
  • Desire to read more
  • Book Lovers (Bibliophiles)
  • Self-learning individuals
  • All ages

Psychographics:

  • Personality & Attitudes:
  • Curious
  • Eager to learn
  • Bibliophile

Values:

  • Knowledge
  • Self-improvement
  • Community

Lifestyles:

  • Interest in books
  • Creative
  • Knowledgeable
User and Client Needs
User Needs Client Needs
Register/Login to account Provide a Book Database
Search for books Log into administrator account for defensive design
View Book Details Use website themselves
View Favourite Books
Get in Contact with Admin
Importance/Viability Tables

User Management

Books Management

Other Features

Back to top ⇧

SCOPE

  • Features: user registration, profile management, book addition, editing and deletion, liking books, viewing user-added books, a favourites page, contact form, and book search.

  • Content: Book Review will contain book titles, authors, images, and descriptions (short and full).

  • User Flow: The user will be able to register for an account, log in, add books, edit books, delete books, like books, view their books, view their favourites, and contact the admin.

  • Technical Requirements: Front-End: HTML, CSS, Javascript, Bootstrap 5, Font Awesome; Back-End: Python, Django 4.1, PostgreSQL For deployment, the project will be hosted on Heroku, with static files stored on Cloudinary and the database hosted on ElephantSQL.The whole project will be version controlled using Git and GitHub. Milestones: The whole project is broken down into smaller milestones, which are then broken down into tasks. The project will be managed using Github Project.The three milestones are: MVP Release, User Profile Issues, Project Refinement.

Content Requirements
  • Content (text, images, videos) that user will need.
  • The User will be looking for:
    • Customisable Account
    • Custom username/password
    • Add/Modify/Delete Book Details
    • View list of Favourite Books
  • Easy and Intuitive Navigation
  • Pleasant Theme (typography, imagery, colour palette)
  • Book Detail Page:
    • Title
    • Author
    • Image URL
    • Description
    • Likes
  • Searchable Book Database
  • Contact Form
  • Favourite Books Page
  • User Added Books Page
  • User Profile Page
Functionality Requirements

The user will be able to:

  • Register for an account
  • Log in to their account
  • Log out of their account
  • Add a book to the database:
    • Title
    • Author
    • Image URL
    • Short Description
    • Full Description
  • Edit a book in the database
  • Delete a book from the database
  • Like a book
  • View list of their favourite books
  • View list of their added books
  • View all books
  • Search for books
  • View book details
  • Contact the admin
  • View their profile
  • Customise their profile
  • Delete their profile
  • View a custom 404 page

Back to top ⇧

STRUCTURE

  • Interaction Design: The user will be able to interact with the website using a mouse and keyboard.
  • Information Architecture: The information will be structured in a way that is easy to navigate and understand. The information will be organised into logical groups and categories, with the most important information being the most prominent.
  • Navigation: The navigation will be intuitive and easy to use. The navigation will be consistent across the website, with the navigation bar being the primary means of navigation. The navigation will be responsive and will adapt to different screen sizes.
  • Information Design: The information will be presented in a way that is easy to understand and digest. The information will be presented in a way that is visually appealing and engaging.
  • Interface Design: The interface will be clean and simple. The interface will be responsive and will adapt to different screen sizes. The interface will be consistent across the website.

Information Architecture and Navigation

Unfortunately, there wasn't time to make the diagram that would reflect the final structure of the website. The diagram would be similar to the one below, but with updated pages and functionalities. That one is, unfortunatelly, done by hand and even more unfortunatelly, it's done by my hand.

Information Architecture and Navigation 1

Information Architecture and Navigation 2

Back to top ⇧

SKELETON

help me

  • Wireframes: The wireframes were created using Balsamiq. The wireframes were created for desktop, tablet, and mobile devices. The wireframes were created for the following pages: Home, Register, Login, Profile, Add Book, Edit Book, Delete Book, Book Details, Favourites, User Added Books, Contact, and 404.

Link to Wireframes

N.B. The wireframes were created before the project was started. The final project will abundantly differ from the wireframes.

Back to top ⇧

SURFACE

Colour Scheme

Sunny Bay Bridge color combination

colour scheme

This colour scheme is used throughout the website. To it the standard Bootstrap colours are added. It is a nice and clean colour scheme that is easy on the eyes and doesn't disctract the user from the content.

Typography

Monserrat Alternates is used for the logo and headings. Roboto Serif is used for the body text. Mooli is used for the book titles. They are all Google Fonts.

Imagery

The images were created with DALL-E 2, a neural network that generates images from text descriptions. Other images were taken from unsplash. For details see Credits.

Branding

A logo is created that reflect the essence of "Books for Life." Nothing fancy, just a simple logo that is easy to remember and recognisable (B4L). The tool used is the online favicon.io generator.

Books for Life logo

Prototypes

Given the time constraints, the website was not prototyped. The website was built using the wireframes as a guide.

Feedback and Iteration

Generally, the developer relied on the feedback from the mentor and the peer-code review to improve the website. The developer also relied on the feedback from some other users to improve the website. The constant changing of the website functionalities and design was a result of the feedback received.

Back to top ⇧

Accessibility

Website complies with accessibility standards. The Lighthouse Validation was used to check the website for accessibility issues. The website is fully accessible.

Database Design

Database design was made with QuickDBD. The database is hosted on ElephantSQL and is a PostgreSQL database.

Database Design

  • UserProfile Model extends the AbstractUser Model. The UserProfile Model is used to store additional information about the user, in this case a profile picture. It's activated once the user takes an action that requires a profile picture, that is updating the profile data.
  • Book Model has fields title, author, slug, short_description, full_description, image_url, likes, and user. The user field is a foreign key to the UserProfile Model. The likes in fact is not, stricly saying, the field of the book. It's Many to Many connection that generates a linking model between Book record and User record. The slug field is used to create a unique URL for each book. The slug field is automatically generated from the title and there's a custom save method that checks if the slug is unique. If it's not unique, a number is added to the slug. The slug field is used in the URL to identify the book. The id is used to identify the book in the database. The id is used in the URL to identify the book and it's generate automatically.
  • Category model is a simple one. Other than id that is generated automatically, it has only a multiple choice field name. The name field is used to identify the category in the database. It is a One to Many relationship between Category and Book models. The original idea was to have Many to Many model, but there wasn't time for implementation.

Back to top ⇧

Features

Existing Features

Navbar

Navbar is based on a template from Bootstrap Documentation. On the left, there's a logo that is also a clickable link to the homepage. Find Book link to the page for searching books and the Contact Page link. THe Find Book link doesn't appear if the user is not logged in. On the right, there are links to the Register and Login pages. If the user is logged in, the links to the Register and Login pages are replaced with the links to the Profile with a small profile image icon and Logout pages. Similarly, left of them, there are links Add Book, My Books and My Favourites that lead to the corresponding pages, and they also appear only on successfull login. The links are responsive and collapse into a hamburger menu on smaller screens. For the profile image there's a default image that is used if the user doesn't upload their own image.

Footer

Footer is based on a template from MdBootstrap Documentation. It contains links to the social media accounts of the website. The links open in a new tab. At the bottom, there are copywrite information. There's a JS code that takes care of the fotter's possibility to stick to the bottom of the page.

Navbar and Footer are the common elements for all the pages of the website.

Messages

In-built Django messages system is used to inform the user about the actions they took. The messages are displayed on the top of the page. The messages are responsive and disappear after a few seconds.

Homepage

On the homepage there are animations, images and a short description of the website. The animations are made with CSS and Javascript. The animations and contents are responsive. There are also buttons to My Books and My Profile Page.

Login/Register Pages

Login and Register Pages are simple pages with forms for login and registration. The forms are made with html and are controlled by views in Django. The forms are responsive. The forms are validated on the client side and the server side. The forms are validated on the client side with HTML5 validation. The final result is a new user record in the database. After the user is registered, the user is redirected to the My Books Page. After the user is logged in, the user is redirected to the My Books Page.

Contact Page

Contact Page is a simple page with a contact form. The form is made with EmailJS. The form is responsive. The form is validated on the client side and the server side. The form is validated on the client side with HTML5 validation. The final result is an email that the developer receives on their email account.

Find a Book Page

Find a Book Page is a page with a search form. The form is made with html and is controlled by a view in Django. The form is responsive. The form is validated on the client side and the server side. The form is validated on the client side with HTML5 validation. The final result is a list of books that match the search criteria. There's a search field in which a user can write their queries. The button next to the search field triggers the search. The search works for the data that include titles, authors and categories of the books. If the input field is not empty, the clear search buttton appears. The clear search button clears the search field. If the input field is empty, the clear search button disappears. The search results are ordered by the date of creation of the book record. The nuber of found records appears above the table. Table has as columns number (sequential), Author, TItle, Category, and like. On smaller screens, numbers and categories columns dissapear. The book can be liked or unliked by clicking on the heart icon. Unliked book has a blue shallow animated heart, liked the red solid animated heart. The implementation isn't perfect, because every (un)liking refreshes the page, and if there are many books, the pages moves to the top. User can click on the title of the book to be redirected to the book details page.

Book Details Page

To this page the user is redirected when they click on the title of the book in the search results on Finda A Book Page, on My Books Page or on My Favourites Page. The page contains all the information about the book. The page is responsive. The page contains the title, author, image, full description, date of addition, category and the number of likes. There's a Back button to bring the user back to the page from which they came to the Book Details. It is not he perfect solution, but it's the best that could be done in the time given. There's also the possibility to like or unlike a book like on the Find a Book Page.

Add Book

Add Book Page is a page with a form for adding a book to the database. The form is made with html and is controlled by a view in Django. Only non required filed is the image. The form is validated on the client side and the server side. The final result is a new book record in the database. After the book is added, the user is redirected to the My Books Page.

My Books Page

My Books Page is a page with a table of books added by the user. The page is responsive. The table has as columns number (sequential), Author, Title, Category, and like. On smaller screens, numbers and categories columns dissapear. The book can be edited or deleted by clicking on the relative buttons on the right of the record. The user can click on the title of the book to be redirected to the book details page. At the bootom of the page is Add a Book button that brings the user to the Add Book Page. By clicking on the Edit button, the user is redirected to the Edit Book Page. By clicking on the Delete button, the user is redirected to the Delete Book Page.

Edit Book Page

Edit Book Page is a form for editing a book record. The form is made with html and is controlled by a view in Django. Only non required filed is the image. The form is validated on the client side and the server side. The form is prepopulated with the data from the book record. The user can edit the data and submit the form. The final result is an updated book record in the database. After the book is edited, the user is redirected to the My Books Page. If the user clicks on the Cancel button, they are redirected to the My Books Page without any changes in the record of the database.

Delete Book Page

Delete Book Page is a simple one. It contains the details of the book record: title, author, image, and short description. There are also a confirmation message and two buttons. If the user clicks on the Delete button, the book record is deleted from the database and the user is redirected to the My Books Page. If the user clicks on the Cancel button, they are redirected to the My Books Page without any changes in the record of the database. The original idea was to have a modal for the confirmation message on My Books Page, but there wasn't time for implementation.

My Favourites Page

Similarly to Find a Book and My Books Pages, this Page contains a table of books. The table has as columns number (sequential), Author, Title, Category, and UnFav. On smaller screens, numbers and categories columns dissapear. The book can be unliked by clicking on the red X icon. By UnFav(ouring) of the book, the same is removed from the list. At the bottom of the page is Add to Favourites button that brings the user to the Fidn a Book Page that allows users to like or unlike a book.

Profile Page

To arrive to Profile Page, user can click or on the button on the Homepage or on the link in the Navbar (that is, a round profile image with username on the right). The page contains the user's profile image, username and email. There are two buttons: Edit Profile and Delete Profile. By clicking on the Edit Profile button, the user is redirected to the Edit Profile Page. By clicking on the Delete Profile button, the Delete Profile modal is called for the confirmation. If confirmed, the user is redirected to the Homepage and their profile is deleted from the database. The same deletion causes the deletion of all the books added by the user. The user is logged out and the session is terminated. If the user clicks on the Cancel button, they are back to the Profile Page without any changes in the record of the database.

Edit Profile Page

Edit Profile Page is a simple form that gives the user the possibility to change their email, pasword and profile image. The form is made with Django, and is controlled by a view in Django. The form is validated on the client side and the server side. The form is prepopulated with the data from the user record. The user can edit the data and submit the form. The final result is an updated user record in the database. After the user is edited, the user is redirected back to the Profile Page. If password is left empty, the password is not changed. If the user clicks on the Cancel button, they are redirected to the Profile Page without any changes in the record of the database.

Custom Error Page

Custom 404 Error Page is made with Django. It is a simple page with a message and a large round image that changes from grayscale to colour on hoverm and by clicking on it, the user comes back to the Homepage.

Favicon

Favicons are made by the online favicon.io generator. The favicon is a simple B4L logo that is self explanatory and recognizable.

Future Features

In early stages, the idea was to have a rich text editor for the book descriptions. The idea was to use Summernote. The implementation wasn't successful, and the idea was partialy abandoned. The idea is to implement it in the future. The idea was to have a dedicated page for the categories in order to add a new category. The idea was to have a Many to Many relationship between the Book and Category models. The idea was to implement it in the future. Another idea was to have a details of the contributing user on the book detail page, and to be able to see all the users and their books on the dedicated page. The idea was to implement it in the future. Obviously, there was the idea of implementing the administrator's access and different functionalities. Especially the control of the deletions (books and users) and the control of the categories. In that way, the deletion couldn't be automatic, but controlled by requests to Administrator. Developer wanted to implement the pagination for all the tables, but there wasn't time for that. The idea is to implement it in the future.

Back to top ⇧

Issues and Bugs

  • Book Deletion Modal
    • Issue: The idea was to have a modal for the confirmation message on My Books Page, but there wasn't time for implementation. The attempt to add modal resulted in making automatic modal for the deletion for each record. That was not the desired result.
  • Book Liking
    • Issue: The implementation isn't perfect, because every (un)liking refreshes the page, and if there are many books, the pages moves to the top. The developer tried to implement it without using JS, but that didn't give the desired result.
  • Back Button
    • Issue: The idea was to have a Back button that would bring the user back to the page from which they came to the Book Details. It is not he perfect solution. It uses a navigation history to go one step back. If the book is (un)liked, and page refreshes, that back needs to be pressed a few times to get the user back to the desired page without refreshing the cache.
  • Book Short Description
    • Issue: In early stages, the idea was to have a modal showing on book title clicked with only a short description and the button read more that would bring to the Book detail page. But, there wasn't time for full implementation.
  • Directory Structure
    • Issue: The directory structure is not the best. The developer tried to make it as logical as possible, but there's a lot of room for improvement. The templates in the authors app are not following the ideal structure (/templates/app-name/...). Unfortunatelly, the developer realised that too late and didn't want to compromise the functionality of the website by changing the structure.

Back to top ⇧

Technologies Used

Main Languages Used

  • HTML5
    • The project uses HTML5 to create the content of the website.
  • CSS3
    • The project uses CSS3 to style the content of the website.
  • JavaScript
    • The project uses JavaScript to add interactivity to the website.
  • Python
    • The project uses Python to create the backend of the website.

Frameworks, Libraries & Programs Used

Front-End

  • Bootstrap 5
    • The project uses Bootstrap 5 to simplify the structure of the website and make the website responsive easily.
  • Google Fonts
    • The project uses Google Fonts to style the fonts of the website. The fonts used are "Montserrat Alternates", "Roboto Serif", and "Mooli".
  • Font Awesome
    • The project uses Font Awesome to add icons to the website.

Back-End

  • Django

  • The project uses Django to create the backend of the website.

  • pip3 (Python Package Installer)

    • The project uses pip3 to install the necessary tools and libraries.
  • PostgreSQL

    • PostgreSQL to create the database of the website.
  • ElephantSQL

    • ElephantSQL for hosting of the database of the website.
  • Heroku

    • Heroku for the website deployment.
  • Cloudinary

    • The project uses Cloudinary to store the images of the website.
  • Summernote

    • The project uses Summernote to create a rich text editor for the website. Although, this functionality wasn't entirely implemented in the final version of the website.
  • gunicorn

    • The project uses Python gunicorn library to run the website on Heroku.
  • dj_database_url

    • The project uses Python dj_database_url library to connect to the database on Heroku.
  • psycopg2

    • The project uses Python psycopg2 library to connect to the database on Heroku.
  • python-dotenv

    • The project uses python-dotenv library to hide sensitive information.
  • EmailJS

    • EmailJS JavaScript library was used to create a functional contact form.

Other

Back to top ⇧

Testing

For Testing details go to a separated file TESTING.md

Deployment

Local Deployment

In order to make a local copy of this project, you can clone it. In your IDE Terminal, type the following command to clone the repository:

  • git clone https://github.com/tomdu3/books-for-life.git

If done locally, the virtual environment needs to be created and activated. To do so, in your IDE Terminal, type the following commands:

python3 -m venv venv

If on Linux/MacOS, type the following command for activation:

source venv/bin/activate

On Windows type the following command for activation:

venv\Scripts\activate

Alternatively, if using Gitpod, you can click below to create your own workspace using this repository.

Open in Gitpod


After cloning or opening the repository in Gitpod, you will need to:

  1. Create your own .env file in the root level of the project:
SECRET_KEY=[your_secret_key]
DEBUG=True
DATABASE_URL=postgres://[username]:[password]@[host]:[port]/[database_name]
CLOUDINARY_URL=cloudinary://[api_key]:[api_secret]@[cloud_name]

**Ensure the .env file is added to your .gitignore file so it doesn't get pushed to a public repository.

If you don't have a Cloudinary account already, you will need to Sign Up for Free to host the static files in the project.

  1. Run pip3 install -r requirements.txt to install required Python packages.

  2. Migrate the database models using: python3 manage.py migrate

  3. Create a superuser with your own credentials: python3 manage.py migrate

  4. Run the Django sever: python manage.py runserver The address of the server will appear in the terminal window. Add /admin to the address to access the Django admin panel using your superuser credentials.

Heroku Deployment

Sign up to Heroku for free if you don't already have an account.

  1. Create a new app in Heroku.

  2. In the Resources tab of your app in the Heroku dashboard, click Add-Ons and select Heroku Postgres. Select Hobby Dev - Free as your plan.

  3. When Heroku Postgres is installed, click the Settings tab in the Heroku Dashboard. Click Reveal Config Vars, and add the same variables from your .env file here, except for DEBUG, as you don't want debug mode on the deployed project.

  4. Copy the value of DATABASE_URL from the Config Vars. In your settings.py file, comment out the default database configuration, and add a new one with the Postgres url.

DATABASES = {
    'default': dj_database_url.parse('your DATABASE_URL here'),
}
  1. Migrate the database models using: python3 manage.py migrate

  2. Create a superuser with your own credentials: python3 manage.py migrate

  3. Create a file called Procfile (no extension) containing the following:

web: gunicorn core.wsgi
  1. Run pip3 install -r requirements.txt to install required Python packages.

  2. Add the url of your Heroku app ('https://books-4-life-2d26bdf04dec.herokuapp.com/') to your settings.py file:

ALLOWED_HOSTS = [
    'books-4-life-2d26bdf04dec.herokuapp.com',...
]
  1. Disable collect static so that Heroku doesn't try to collect static files when you deploy by adding the following to your Heroku Config Vars in the Settings tab of Heroku dashboard:
DISABLE_COLLECTSTATIC=1

The same variable has to be removed from Heroku Config Vars when you want to collect static files (for the testing and final deployment).

  1. Stage and commit your files to GitHub
git add . 
git commit -m "Commit message"
git push
  1. In the Heroku dashboard for your App, select Deploy. Under Deployment Method, choose GitHub and search for your repository and click Connect.

  2. Select Enable Automatic Deployments, and then Deploy Branch. Heroku will build the App from the branch you selected.

  3. Now whenever you push your commits to GitHub, Heroku will rebuild the application.

Forking the GitHub Repository

The project can be forked in order to make a copy of the original repository and propose changes to the project owner using Pull Requests. That can be done by following these steps: First, log in to GitHub and locate the Project's Repository. At the top of the Repository, on the right side of the page, locate the "Fork" button. A copy of the Repository should now be in your GitHub account. You can now propose changes to the Repository by creating a Pull Request.

Live deployment

The web site is deployed on Heroku and can be found here.

Back to top ⇧

Credits

Code

For the rest of the code, the developer relied on Code Institute's course material, the stackoverflow, Django documentation, and John Elder's Codemy.

Content

  • The content of the website was written by the developer.

Media

  • The images used in the website were obtained from Unsplash.
  • The site logo was created using favicon.io.
  • The mockup image at the beginning of this file was created using Am I Responsive.
  • The Shakespeare image and the default book image of a monk were generated by DALL-E 2.

Acknowledgements

  • Seun Owonikoko, my mentor, for her guidance and support. Without her, this project wouldn't be possible or remotely as interesting.
  • Rebecca Tracey-Timoney, our cohort lead, for her wise guidance and all the material she shared with me. All similarities between this project and her material are not coincidental.
  • Code Institute's Slack community for their support and feedback.
  • Code Institute's Tutor Support for their support and feedback (I don't want to give names. I hope that's ok with you, Rebecca :-)).
  • My dear colleagues and friends from the Code Institute's Full Stack Web Development, especially Sirinya, Victoria, Richard, Lauren, Ho, for their support and testing services.
  • My friends: Boris, Zeljka and Dragan for helping me with the testing.

books-for-life's People

Contributors

tomdu3 avatar

Watchers

 avatar

books-for-life's Issues

Bug: Update Form

Update Form
Fix Tasks:

  • required fields validation (not empty)
  • upon update - success message

USER STORY: Favourites Page

EPIC: FAVOURITE BOOKS LIST


USER STORY

As a bibliophile and a registered user, I want to access a dedicated "Favourites" page, so I can see all the books I've liked in one place.


ACCEPTANCE CRITERIA

  • When I log in as a registered user, there should be a "Favourites" option visible in the navigation menu.
  • Clicking on the "Favourites" option should take me to a dedicated page that displays all the books I've marked as favorites.
  • On the "Favourites" page, I should see a clear and user-friendly list of the books I've liked, including their titles, authors, and cover images.
  • If I haven't marked any books as favorites yet, the page should display a friendly message indicating that my list is empty and encouraging me to explore and like books.
  • Each book displayed on the "Favourites" page should have a button or link that allows me to remove it from my favourites list.
  • When I remove a book from my favourites list, it should be immediately removed from the "Favourites" page without requiring a page refresh.
  • The "Favourites" page should have pagination or a scroll feature if there are a large number of books in my favorites list to ensure smooth navigation.???
  • The "Favourites" page should be responsive and work well on both desktop and mobile devices.
  • The URL of the "Favourites" page should be user-friendly and intuitive, such as "/favourites" or "/my-favourites."

TASKS

  • Frontend Development: Create a "Favourites" page with a responsive design.
  • Implement the navigation menu item for "Favourites."
  • Design a clear and attractive layout to display favourite books.
  • Implement book listing with titles, authors, and cover images.
  • Add the option to remove books from favourites.
  • Backend Development: Create database models and tables to store user favourites.
  • Implement logic for adding and removing books from a user's favourites list.
  • Ensure that the "Favourites" page fetches and displays user-specific data.
  • User Interface (UI): Design user-friendly buttons and interactions for adding/removing favourites.
  • Implement a user-friendly message for an empty favorites list.
  • User Communication: Notify registered users about the new "Favourites" feature through email or in-app notifications.
  • Performance Optimization: Optimize the page loading time for the "Favourites" page, especially if a user has a large number of favourite books.

Add Category Other

Siri suggested that would be a good thing to add a category Other, for other genres

USER STORY: Like a Book

EPIC: LIKING BOOKS


USER STORY

As a registered user, I want to be able to like a book presentation so that I can keep track of my favorite books.


ACCEPTANCE CRITERIA

  • The user must be logged in to their registered account.
  • In search results there should be a "Like" or "Favourite" button.
  • Clicking the "Like" button should add the book details to the user's list of liked/favourite books.
  • Clicking the "Like" button again should remove the book presentation from the user's liked/favorite books.
  • The user should see a visual indication (e.g., change in button color or icon) when a book presentation is liked.
  • The user should see a visual indication (e.g., change in button color or icon) when a book presentation is unliked.
  • The liked/favourite book presentations should be stored and associated with the user's account.
  • The user should be able to easily access their list of liked/favourite books from their user profile.
  • If the user unlikes a book presentation, it should be immediately removed from their liked/favourite list.

TASKS

  • Design the user interface for the "Like" or "Favourite" button on book search results page.
  • Create a database schema to store user-liked book presentations.
  • Develop the logic to add and remove book presentations from the user's liked/favourite list.
  • Implement the visual indication for liked and unliked book presentations.

USER STORY: Contact Form

EPIC: CONTACT FORM


USER STORY

As a registered user, I want to be able to use a contact form, so I can reach out to the website administrators with questions, feedback, or concerns.


ACCEPTANCE CRITERIA

  • The contact form should be accessible to registered users when they are logged in.
  • The contact form should have fields for the user to input their name, email address, subject, message, and an optional attachment field.
  • The name and email address fields should be pre-filled with the user's registered information. ???
  • The subject field should be a dropdown menu with predefined options such as "Question," "Feedback," and "Concern."
  • The message field should allow users to input a message with a minimum length of 10 characters and a maximum length of 1000 characters.
  • If the user chooses to attach a file, the attachment field should allow them to upload a file with a maximum size of 10MB. ??? Accepted file types should include common document formats (e.g., PDF, DOCX) and images (e.g., JPG, PNG).
  • There should be a "Submit" button to send the message to the website administrators.
  • Upon submitting the form, the user should receive a confirmation message indicating that their message has been sent successfully.
  • The system should log the date and time of each submission along with the user's information, subject, and message.
  • Website administrators should receive an email notification with the user's message, subject, and contact information when a user submits the form.
  • Users should not be able to submit the form if any required fields are left blank or if the attachment exceeds the maximum size.
    Users should receive an error message if there are any issues with their submission (e.g., invalid email address, attachment too large) and should be prompted to correct the errors.
  • The contact form should be responsive and visually appealing on different devices (e.g., desktop, tablet, mobile).
  • The contact form should be accessible to users with disabilities, following WCAG guidelines.

TASKS

  • Create a dedicated contact form page for registered users.
  • Integrate the user authentication system to ensure that only registered users can access the contact form.
  • Design and implement the contact form with HTML/CSS, including the required fields and dropdown for the subject.
  • Pre-fill the name and email address fields with the user's registered information.
  • Implement client-side validation for the message length and attachment size.
  • Implement server-side validation to ensure data integrity and security.
  • Create a file upload feature for the attachment field, including file type and size validation.
  • Implement the submission mechanism for the contact form, including error handling and success messages.
  • Log user submissions in a secure manner, including date and time, user information, subject, and message.
  • Set up email notifications to alert administrators when a user submits a message through the contact form.
  • Implement error handling for cases where users leave required fields blank or the attachment size exceeds the limit.
  • Ensure the contact form is responsive and compatible with various devices and browsers.
  • Implement accessibility features following WCAG guidelines to make the form usable by individuals with disabilities.

USER STORY: Registration

EPIC: REGISTRATION


USER STORY

As a new user, I want to be able to register for an account on the "Books for Life" website, so that I can log in with username and password.


ACCEPTANCE CRITERIA

Registration Form:

  • There is a registration form accessible from the website's homepage.
  • The registration form includes fields for username, email address, password, and password confirmation.
  • Passwords are required to meet minimum complexity requirements (8 characters minimum length, at least one uppercase and lowercase letter, numbers, and a special character).
    Validation:
  • Users are alerted with clear error messages if they submit incomplete or invalid data.
  • Users receive an error message if the chosen username is already in use.
  • Users receive an error message if the provided email address is already registered.
    Password Security:
  • Passwords are securely hashed and salted before being stored in the database.
  • The system enforces password complexity requirements.
    User Data Storage:
  • User data (username, hashed password, email, etc.) is stored securely in the database upon successful registration.
    User Feedback:
  • Upon successful registration, the user receives a confirmation message.
  • Optionally, an email confirmation link is sent to the user's provided email address.
    Login Functionality:
  • After registration, users can log in using their username and password.
  • Users receive an error message if they enter incorrect login credentials.
    Session Management:
  • User sessions are managed securely, allowing users to stay logged in until they choose to log out.

TASKS

Design and Frontend:

  • Create the registration form with appropriate fields and styling.
  • Implement client-side validation for the registration form.
  • Create a success message to display upon successful registration.
    Backend and Database:
  • Set up a database to store user information.
  • Create API endpoints for user registration.
  • Implement server-side validation and error handling for registration.
    Password Security:
  • Define and enforce password complexity requirements.
    User Data Handling:
  • Develop code to store user data in the database.
    User Authentication:
  • Implement the login system with username and password verification.
    Session Management:
  • Implement session management for user authentication.
    Email Confirmation (Optional):
  • If required, implement the email confirmation functionality.
    Testing:
  • Test the registration and login processes thoroughly.
    Privacy and Compliance:
  • Ensure compliance with privacy regulations and data security best practices.

USER STORY: Admin Register

EPIC: Admin Dashboard


USER STORY

An explanation of the feature or function, written from the perspective of the end user

As a admin, I want to register myself, so that I can be recognized as an administrator


ACCEPTANCE CRITERIA

  • When registered, user can designate themselves as administrator.
  • Administrator registration will ask for the approval......
  • Upon approval, administrator will receive an email.

TASKS

  • Add a checkbox for administrator account on registration form.
  • Make a view to inform the current administrators that an admin user want's to register.
  • Task 3

Docs: README.md

README.md contains the necessary Project Documentation

  • Project Title
  • Favicon and Am I Responsive image (links to live page)
  • Table of Contents
  • Introduction
  • User Stories
  • UX - Development Planes
  • Testing - separate file
  • [ ]

USER STORY: Book Search

EPIC: BOOK SEARCH


USER STORY

As a bibliophile and a registered user, I want to search for books on the website, so that I can ***browse and discover new books added by all users on the website.


ACCEPTANCE CRITERIA

  • The website should have a search bar prominently displayed on the homepage.
  • As a registered user, I should be able to access the search functionality without any issues.
  • When I type a search query into the search bar and press "Enter" or click the search button, the website should display a list of relevant books based on my query.
  • The search results should include book titles, authors, and category of each book.
  • Each search result should be clickable, allowing me to view more details about the book when I click on it.
  • The search functionality should be responsive and work well on both desktop and mobile devices.
  • The search should support basic search features such as partial matching (e.g., "macbeth" should return results for books with "Macbeth" in the title).
  • The search should make me able to like a certain book.

TASKS

A single unit of work broken down from the defined user story

  • Design and implement a search bar on the dedicated page of the website.
  • Create a user-friendly search interface that is accessible to registered users.
  • Develop a search algorithm that can retrieve relevant book information based on user queries.
  • Design and implement a way to display search results, including book titles, authors, and categories.
  • Create a clickable link for each search result to view more details about the book.
  • Implement pagination or infinite scrolling if necessary to handle multiple pages of search results.
  • Ensure that the search functionality is responsive and works seamlessly on various screen sizes.
  • Implement partial matching and other relevant search features to improve search accuracy.

USER STORY: Delete User Profile

EPIC: User Profile Management


USER STORY

As a registered user, I want the option to delete my user profile so I can decide to leave the website.


ACCEPTANCE CRITERIA

  • When logged in as a registered user, I should see an option to access my account settings.
  • Within the account settings, there should be a clear and easily accessible option to delete my user profile.
  • Clicking the "Delete Profile" option should prompt me to confirm my decision.
  • After confirming, my user profile and all associated data should be permanently deleted.
  • Upon deletion, I should be logged out, and I should receive a confirmation message indicating that my profile has been deleted.

TASKS

  • Design the user interface for the account settings page, including the option to delete the profile.
  • Implement the back-end logic to handle profile deletion, ensuring that all associated data is removed from the database.
  • Create a confirmation dialog or page to verify the user's intent to delete the profile.
  • Implement the logout functionality after profile deletion.
  • Test the profile deletion process thoroughly, including data removal from the database.

Docs: TESTING.md

The additional file TESTING.md made to document the testing of the project:

  • User Story Testing
  • Manual Testing
  • Automated Testing
    • Code Validation
    • Lighthouse Validation
    • Browser Validation
  • User Testing

USER STORY: UPDATE BOOK

EPIC: Updating Books


USER STORY

As a registered user, I want to be able to update the the books I've added, so I can correct the information of the record (title, author, image, descriptions).


ACCEPTANCE CRITERIA

  • The user must be logged in as a registered user to access the book update feature.
  • There should be a visible and accessible option or button to edit/update a book's information.
  • When the user clicks the edit/update option for a book, they should be directed to a book editing form.
  • The editing form should display the current information of the book (title, author, image, descriptions).
  • The user should be able to modify the title, author, image, and descriptions fields.
  • The form should have validation to ensure that required fields are not left empty.
  • The user should be able to preview the changes they made before saving.
  • The user should have the option to cancel the editing process and return to the book details page without saving any changes.
  • Upon saving the changes, the book's information (title, author, image, descriptions) should be updated in the database.
  • A confirmation message should be displayed to the user after successfully updating the book's information.

TASKS

  • User Authentication: Implement user authentication to ensure that only registered users can access the book update feature.

  • UI Design and Layout: Design and implement the user interface for updating books, including the placement of buttons and forms.

  • Edit Book Form: Create an edit book form that includes fields for title, author, image, and descriptions. Connect this form to the database to populate with the current book information.

  • Form Validation: Implement form validation to ensure that required fields are not left empty and that data entered is in the correct format.

  • Preview: Implement a preview feature that allows users to review their changes before saving.

  • Discard: Implement a cancel button that allows users to exit the edit mode without saving changes.

  • Update: Write the logic to update the book information in the database when the user saves their changes.

  • Confirmation Message: Create a confirmation message or notification to inform the user that their changes have been successfully saved.

  • Testing: Perform thorough testing of the update functionality, including positive and negative test cases.


USER STORY: View a list of my books

EPIC: View added Books


USER STORY

As a registered user, I want to see a list of all the books I've added to the website for easy reference.


ACCEPTANCE CRITERIA

  • User Authentication: The feature should only be accessible to registered users who are logged in.
  • Navigation: There should be a clear and easily accessible link or button in the user interface that takes the user to their list of added books.
  • Book List Display: When the user accesses their list, they should see a clear and organized list of all the books they have added to the website.
  • Each book entry should display at least the book title, author, and category.
  • Detail View: Users should be able to click on a book in the list to view more details about that book, including a description, and any other relevant information.
  • Edit and Delete Options: Users should be able to edit the information of a book in their list.
  • Users should also have the option to delete a book from their list.
  • Responsive Design: The feature should be accessible and user-friendly on various devices and screen sizes (e.g., desktop, tablet, mobile).
  • Performance: The page should load reasonably quickly, even if the user has a large number of books in their list.

TASKS

  • User Interface Design: Design the user interface for the "My Books" page, including the layout, list display, searching, editing, and deleting. ???
  • Authentication Integration: Implement user authentication to ensure only registered users can access the "My Books" page.
  • Detail View: Develop the functionality to display detailed information about a selected book.
  • Edit and Delete Functionality: Implement the ability to edit and delete books from the user's list.
  • Sorting and Filtering Functionality: Implement the ability to sort and filter the list of books based on user preferences.

USER STORY: ADD A BOOK

EPIC: ADDING BOOKS


USER STORY

As a registered user, I want to add a new book to the website, so that its details would be added to the database.


ACCEPTANCE CRITERIA

  • The user must be logged in as a registered user to access the "Add Book" feature.
  • There should be a clearly visible option or button for adding a new book on the website.
  • The user should be able to enter the following information for the book: Title (mandatory), Author (mandatory), Image (mandatory), Short Description (mandatory, limited character count), Full Description (mandatory), the image is optional..
  • The title and should provide a slug, but there should be a validation to generate different slug if there are books with the same title.
  • The image upload should support common image formats (e.g., JPG, PNG) and have a file size limit. Invalid image formats or oversized images should be rejected with a clear error message.
  • After submitting the book details, the book should be saved in the database with a unique identifier.
  • The newly added book should be displayed on the website immediately after submission.
  • The user should receive a confirmation message after successfully adding a book.
  • Users should not be able to add duplicate books with the same title and author.

TASKS

  • User Authentication: Implement user authentication to ensure that only registered users can access the "Add New Book" feature.
  • UI/UX Design: Design and implement a user-friendly interface with a clear button or option for adding a new book.
  • Input Form: Create an input form that includes fields for Title, Author, Image upload, Short Description, and Full Description.
  • Input Validation: Implement input validation to ensure that the title and author fields meet the required character limits and display appropriate validation messages.
  • Image Upload OR Add Image link: Develop a feature for users to upload book cover images, validate the format and size of uploaded images, and handle errors gracefully.
  • Database Integration: Set up the database schema to store book information, including title, author, image URL, short description, and full description.
  • Backend Logic: Create backend logic to process the submitted book details, generate a unique identifier, and save the book in the database.
  • Display Books: Implement a mechanism to display the newly added book on the website's book catalog or listing page.
  • Confirmation Messages: Display a confirmation message to the user after successfully adding a new book.
  • Duplicate Book Handling: Implement a check to prevent the addition of duplicate books with the same title and author.
  • Error Handling: Develop error-handling mechanisms to gracefully handle any failures during the book addition process and display informative error messages to the user.
  • Testing: Thoroughly test the entire workflow, including user authentication, form validation, image upload, database storage, and error handling.

USER STORY: PROFILE EDIT

EPIC: User Profile Management


USER STORY

As a registered user, I want to be able to edit my profile information, so I can easily change a password, and a profile picture.


ACCEPTANCE CRITERIA

  • When logged in as a registered user, I should see an option to access my profile settings.
  • Within the profile settings, I should see fields for editing my email, password, and uploading a new profile picture. If the profile picture field doesn't exist, I should see a placeholder image.
  • The password field should allow me to change my password with appropriate validation rules (e.g., minimum length, complexity requirements).
  • After making changes, I should be able to save my updated profile information.
  • Once saved, my profile information should reflect the changes on my user profile page.

TASKS

  • Design the user interface for the profile settings page, including the form fields for email, password, and profile picture upload.
  • Implement the back-end logic to handle profile information updates, including validation for name and password changes.
  • Create a profile picture upload mechanism that allows users to select and upload images.
  • By default, no profile image is given, so there should be a placeholder image.
  • Update the user profile page to display the user's updated information after changes are saved.
  • Implement appropriate error handling and validation messages for the form fields.

USER STORY: Delete User

EPIC:

Admin - USER PROFILE edit


USER STORY

An explanation of the feature or function, written from the perspective of the end user

As a administrato, I want to be able to delete a user registered to the webiste, so that I can remove the users who didn't behave according to the required rules.


ACCEPTANCE CRITERIA

A set of predefined requirements that must be met to meet the user story needs (and mark it as complete).

  • Admin can click on delete button on User's profile
  • After he clicks, the modal appears to ask him to confirm.
  • Upon confirmation, the user is deleted from the database.

TASKS

A single unit of work broken down from the defined user story

  • make user profile view accessible to admin for every registered user....
  • Task 2
  • Task 3

DEPENDENCIES

EPIC:

USER STORY: Delete a Book

EPIC: DELETING BOOKS


USER STORY

As a registered user, I want to be able to delete book details from my profile, so it will no longer be accessible.


ACCEPTANCE CRITERIA

  • When I am logged in as a registered user and I navigate to my profile, I should see a list of books associated with my profile.
  • Next to each book entry in my profile, there should be a "Delete" button or action that I can click on to initiate the book deletion process.
  • When I click the "Delete" button for a specific book, a confirmation dialog or prompt should appear to ensure that I want to delete the book.
  • If I confirm the deletion, the book details should be permanently removed from my profile and should no longer be visible.
  • After successfully deleting a book, I should receive a confirmation message or notification indicating that the deletion was successful.
  • If I cancel the deletion from the confirmation dialog, the book should remain on my profile, unchanged.
  • The deletion process should be quick and responsive, ensuring a smooth user experience.
  • The system should handle any errors gracefully and provide appropriate error messages if the deletion process fails for any reason.

TASKS

  • Frontend Development: Create a UI component that displays the list of books in the user's profile.
  • Add a "Delete" button or action next to each book entry in the UI.
  • Implement a confirmation dialog or modal for book deletion.
  • Backend Development: Implement the logic to remove the book from the user's profile in the database.
  • Database Modification: Modify the database schema to support the deletion of book records associated with a user's profile.
  • User Interface (UI/UX): Ensure that the user interface is intuitive and provides clear feedback on the deletion process.
  • Confirmation Dialog: Implement the logic for the confirmation dialog when the user clicks the "Delete" button.
  • Design the confirmation dialog to provide a clear choice for deletion or cancellation.
  • Error Handling: Implement error handling mechanisms in both the frontend and backend to handle potential issues during the deletion process.
  • Create error messages and notifications for different scenarios.
    Testing: Write unit tests to verify the functionality of the delete book feature.
  • Perform integration testing to ensure that the frontend and backend components work together seamlessly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.