Delivery 1 - Jhonnathan93/integrating-project-1 GitHub Wiki

Project definition and Software Requirements Specification

1. Introduction

1.1 Purpose

This project has its roots in the recognition of the transformative power of the act of reading. Far beyond being a mere habit, reading has been revealed as a catalyst for human development in various dimensions. Emerging studies have underscored its neurological implications, showing its potential to boost cognitive growth from an early age and fuel intellectual expansion along the journey.

However, the importance of this effort extends beyond the individual level. In essence, this project is a response to the changing landscape of reading in the modern era, where engagement with reading has experienced a decline. In a world flooded with information, it is imperative to foster a revival of the culture of reading. Beyond stimulating personal growth, this initiative aspires to promote a dynamic community of readers, intertwining diverse ideas, knowledge, and experiences.

A community of readers weaves together disparate perspectives, reinforcing empathy, broader horizons, and deeper understanding. A reading-immersed society has the potential to be more discerning, informed and cohesive, setting the stage for a more enlightened and interconnected world.

Through technological innovation and a steadfast commitment to encouraging the habit of reading, this project envisions an accessible and compelling platform that not only revives the joy of reading, but also inspires a new era of enlightenment and shared exploration.

1.2 Scope

Booknexus is an web-based platform designed to serve as a multifaceted hub for readers, offering a personalized experience. One of its key features is Personalized Book Recommendations, which utilizes users' reading habits, preferences, and history to generate book suggestions. This empowers users to discover new books that align with their individual interests. Furthermore, the platform functions as a comprehensive Book Information Hub, providing users with detailed and extensive information about a wide array of books. Users can access a wealth of details, including author biographies, synopses, genres, and prices. This wealth of information facilitates well-informed book selections. Another noteworthy aspect of the platform is the User-Generated Reading-list feature, allowing users to curate and share custom book Reading-list.

The scope aligns with the overarching goals and principles established in the Project Definition and Software Requirements Specifications. The functionalities and objectives detailed here reflect the comprehensive vision set forth in previous project documentation, ensuring a unified and cohesive approach to software development.

1.3 Product Overview

1.3.1 Product Perspective

1.3.1.1 System interfaces

  • ChatGPT API

ChatGPT is a powerful tool for process human language developed by OpenAI. It is based on GPT (Generative Pre-trained Transformer) model and as it was trained with a huge aomunt of information based on the internet it has a lot of knowledge in uncountable topics like books, history, libraries and more. BookNexus connects through an API (application programming interface) to integrate features of ChatGPT easily such as natural language undesrtanding, text understangins and chatbot captabilities.

Ref: https://levelup.gitconnected.com/exploring-the-capabilities-of-the-chatgpt-api-a-beginners-guide-e9089d49961f

ChatGPT API is present in the following requirements:

FR05: The system Must store books that have already been read by the user in order to prevent recommending them.

FR07: If the person is not logged in, then the system Should be able to recommend to guests, books based only on their input.

FR11: The application Could offer filter options or additional preferences that the user can choose to receive more tailored book recommendations.

FR13: The system Must analyze the user's reading history and preferences to generate personalized book recommendations.

FR14: The system Could implement a "Surprise Me" feature, suggesting books outside the user's usual preferences to encourage exploration.

  • Google Books API

Google Books is an effor to collect all the book’s information around the world. Their services gather data like book’s name, authors, ISBN, description, genre, buy link, etc. BookNexus connects to the Google Books API to request book information. Google Books acts as the BookNexus database and through the API the data is transferred.

Ref: https://developers.google.com/books/docs/overview

Google Books API is present in the following requirments:

FR06: The system Should prioritize the recommendation of books that have a good rating.

FR09: The system Must provide any user with the ability to view information about the books, such as the author or synopsis.

FR10: The system Could redirect the user to a page where they can purchase the books.

FR14: The system Could implement a "Surprise Me" feature, suggesting books outside the user's usual preferences to encourage exploration.

FR20: The system should enable users to search for books and add them to a reading list by selecting the desired books from the search results.

  • Cloud Vision API

Cloud Vision is a cloud-based service from Google that allows analyze images and extract information i.e. objects in the image (people, pets, buildings, etc.) and text. BookNexus connect to Cloud Vision throug its API to process the cover the user upload in the app as input.

Ref: https://www.cloudskillsboost.google/focuses/1841?parent=catalog

Cloud Vision API is present in the following requirements:

FR12: The system Could allow the user to enter the books that they already read, through photos.

  • SMTP and SSL

SMTP is the abbreviation of Simple Mail Transfer Protocol, a standart communication protocol used by mail servers to send and receive mails. On the other hand SSL is the abbreviation of Secure Socket Layer, and encryption internet security protocol that encrypts data sent between a two servers or a website and a browser.

BookNexus uses SMTP to send the newsletters to all its users and encrypt the data with SLL.

SMTP Ref: https://sendgrid.com/blog/what-is-an-smtp-server/

SSL Ref: https://www.cloudflare.com/learning/ssl/what-is-ssl/

SMTP and SSL are present in the following requirements:

FR14: The system Could implement a "Surprise Me" feature, suggesting books outside the user's usual preferences to encourage exploration.

  • ZeroBounce API

ZeroBounce is an AI powered email validation service. BookNexus uses its API to validate the email of a user enters while signing.

Ref: https://blog.apilayer.com/mailboxlayer-vs-zerobounce-all-you-need-to-know-to-make-up-your-mind/

ZeroBounce API is present in the following requirements:

UR01: If a user enters an invalid email during the login process, the application must display a warning indicating the email is incorrect and allow the user to re-enter their email.

1.3.1.2 User interfaces

Required Screen Format:

BookNexus is designed to perform optimally on different devices. For computers, we consider a minimum width of 1024 pixels, for tablets, the range is from 1024 to 768, and for cell phones, the range is between 320 to 480 pixels. The user interface format comprises the following elements: - A header with the application logo, a button to return to the home page, and sign-in/register buttons. - Specific main content for each page.

First Interface: Home Page

This interface is the user's initial view. It includes buttons for signing in and logging in, as well as three spaces to input book titles that the algorithm will use to provide recommendations. There's also a menu to select preferred genres, text formats, and desired number of pages.

  • To-DO:

    • Navigation bar containing:
      • Project name (BookNexus)
      • Home button (in this case, it reloads the page since it's the home)
      • Sign-in/register buttons
    • Three spaces to enter book titles and authors.
    • Multi-choice menu:
      • Select preferred literary genre (fantasy, romance, history)
      • Select text format (biography, novel, scientific)
      • Number of pages (less than 100p, between 100 and 500, more than 500)
  • Don't:

    • This panel doesn't display book recommendations.
Second Interface: Book Recommendations

Once the user enters all the required information on the Home page and presses the submit button, they are directed to the recommendations interface. Here, the user can view book cards, each containing the book's cover, title, author, description, and a purchase link.

  • To-DO:

    • Navigation bar containing:
      • Project name (BookNexus)
      • Home button leading to Home Page
      • Sign-in/register buttons or profile button if already registered.
    • Cards displaying book content:
      • Cover
      • Book title
      • Author
      • Description
      • Purchase link
  • Don't:

    • The author of the book is not explicitly displayed.
    • Reading lists are not visible from this view.
Third Interface: User's Profile

If the user presses the sign-in/login button, they are directed to the user's profile interface. Here, the user can view their username, profile picture, "read later" list, reading lists, and recently accessed books.

  • To-Do:

    • Navigation bar containing:
      • Project name (BookNexus)
      • Home button leading to Home Page
    • User information displayed:
      • Profile picture
      • Username
    • "Read later" list displayed
    • Reading lists displayed
    • Recent books displayed
  • Don't:

    • The displayed books are those the user has entered recently, not recommendations.

1.3.1.3 Hardware interfaces

Camera Integration

BookNexus supports the use of built-in cameras. Users can capture images of book covers using the camera's functionality directly within the web application. This feature simplifies the process of adding books to their reading history, enhancing the overall user experience.

  • Ports

    • No specific ports are required. The JavaScript MediaStream API allows access to the device's camera and microphone directly from the browser without the need for port usage.
  • Instructions

    • The browser will request permission to use the camera.
    • Once the camera is active, it will display a live image preview and provide a button to capture photos.
    • After taking the photo, the user will be given the option to either send the photo or retake it.
  • Supported Devices

    • BookNexus supports the use of built-in cameras on devices such as smartphones, tablets, and computers.
  • Device Support and Protocols

    • A request is sent to the browser to access the camera and obtain its multimedia content.
    • A window is displayed on the web page with camera dimensions, allowing the user to take a photo.

1.3.1.4 Software interfaces

In addition to the APIs presented in 1.3.1.1, BookNexus uses other software interfaces for its correct operation. Among these services we have:

  • The operating system is Windows 11 Home – Version 22H2.
  • To connect all the parts of the project we use the MVT (Model View Template) structure provide by Django.
  • The data management system is the ORM given by Django together with SQLite.
  • Some special packages like Thread Pool Executors from the Python library current.futures for parallelizing the sending of e-mails and MediaStream from JavaScript to recollect pictures when the user wants to send them as input for recommendations.

1.3.1.5 Communications interfaces

BookNexus works with multiple communications interfaces like:

  • Connection with the 8000 port to run the Django project.
  • Database management through SQLite.
  • GUIs.
  • APIs.
  • Built-in cameras on devices.
  • STMP 587 port connected to smtp.gmail.com port to send the newsletters.

1.3.1.6 Memory

  • Hard Drive The project is developed within a Python virtual environment. There are the libraries and necessary programs for the application's execution. However, it's important to consider the space occupied by the operating system, web browser, additional files, etc. This means that the minimum memory required for the project is 256 MB, but in total, approximately 8 GB of disk space is recommended to account for the combined usage.

  • RAM Based on our research, to ensure that port 8000 (where Django is deployed) remains stable, and the components responsible for communication and the operating system operate smoothly, a minimum of 4 GB of available RAM is recommended. This allocation helps prevent collapses or disruptions in the operation of Django and its related services.

1.3.1.7 operations

1.3.1.7.2 Modes of operations

The user can:

  • Clicking Buttons
  • Type text
  • Take or upload pictures
  • Select menu options
1.3.1.7.2 Periods of interactive and unattended operations
  • Interactive operations:

These are operations where the user inputs text, takes photos, fills out forms, edits profile settings, etc. Anything that involves an action initiated by the user.

  • Unattended operations:

These functions support data processing within the system. This could encompass tasks like data validation, report generation, calculations, and more.

1.3.1.7.3 Data processing functions
  • Data Validation
  • Analysus of Book’s information
  • User Profile Matching
  • Calculation of Recommendation based on special features
1.3.1.7.4 Backup and recovery operations

While a dedicated data recovery system may not be present, the team has some practices aim to protect user data, ensure project continuity, and offer a degree of data recovery preparedness through the utilization of Git and GitHub for version control and cloud-based storage.

1.3.2 Product functions

The following is a list that summarizes the behavior of the product and its outcomes. The product:

  • Analyzes the user's reading history and preferences, by asking for previously read books, preferred genres, subjects, and/or authors.
  • Generates personalized book recommendations based on that information.
  • Displays information about the recommended books such as their title, author and synopsis to capture the user’s interest.
  • Allows users to add their favorite books or books that share a theme inside Reading Lists.
  • Allows users to add recommended books to a “Read Later” list, in order to keep track of them.
  • Sends newsletters to every user’s email address for personalized recommendations.

1.3.3 User characteristics

This service is targeted to people interested in reading. They could be avid readers, or newcomers to the world of literature, though it may benefit the user to have had a long history or experience with reading, so they can easily determine and select the genres they like, and add previously read books for more suited recommendations. Still, this is not necessary since they will be able to enter the subjects they’re interested in or possibly preferred genres.

This service strives to use a website design that is simple and easy to navigate through. We aspire to be accesible to people with low vision, such as elders or people with up to 20/40 vision. We will accomplish this through an adequate design in the text and images presented. However, for now this service is not aimed to people with a vision lower than 20/40, such as people that require screen readers, since our design is a starting point towards a more accesible and inclusive content, with space for improvement.

Furthermore, people with other disabilities or low expertise with technology, might not be able to interact fully with the service. For example, people with motor skill disabilities, might encounter problems if they try to navigate only with their keyboard, even though there are some alternatives available for them like menus from where they can select certain options. Finally, elder people that are not tech-savvy could have a hard time since the process of submitting information about their preferences could be long and tedious.

1.3.4 Limitations

1.3.4.1 Regulatory policies

Policies regarding the collection of personal information, email communication, and image capture when user-permitted.

1.3.4.2 Hardware limitations

Stable internet connection, functional file explorer, and a properly working camera if using such input type.

1.3.4.3 Interfaces to other applications

The APIs we are utilizing operate on free trial basis with limited credits, hence connection to these services might be disrupted upon credit depletion.

1.3.4.4 Parallel operation

Email sending is facilitated using ThreadPoolExecutor; although asynchronous, operations are constrained by available RAM. An application can use hundreds to a few thousand threads, but we limit usage to a maximum of 100 threads due to system resource limitations.

1.3.4.8 Critically to the application

User's personal information is stored in the database; only passwords are encrypted. In case of a system breach, unauthorized access and data manipulation are possible due to limited security measures in place.

1.3.4.9 Phyisical/Mental considerations

The algorithm responds to the provided books without analyzing how the content might affect the user. If users input books on sensitive topics, they will receive recommendations on the same, thus we cannot be responsible for this aspect.

1.4 Definitions

  • Badge/Milestone: Reward earned by the user after registering a certain amount of books read. These will be displayed in the reader’s profile, in the way of visually appealing symbols that shows their reading achievements.
  • Book: Written material that is not an article, report, or scientific research paper. In the context of this project, the focus is on the type of material found in libraries, such as fictional stories, romantic stories, and other genres like action, historical, etc. We exclude from our scope materials like newspapers, scientific articles, and scientific reports.
  • Gamification: The act of applying incentives to encourage someone to finalize a task and reach an objective. In the context of this project, we aim to promote the habit of reading through symbols of achievement like badges. We also strive to motivate people to get into the world of literature, by offering them suitable book recommendations accompanied by interesting synopses to capture the user’s attention and lead them to get engaged with the website and thus, motivate them to read more.
  • Library: A collection of books that serves as a source of knowledge, information and entertainment. It can be a physical establishment, or a digital storage of the books.
  • Reader: Individual that engages with literature, specifically books, in order to obtain knowledge, or entertainment.
  • Reading List: List of books created by a reader, usually following a theme or genre that connects every book added in the list. These lists could contain books that all have similarities between them, e.g. romance books, books about WWII, books written in spanish, etc.
  • Recommendation: Personalized suggestion based on the reader’s preferences, reading history, interests and likes, with the purpose of guiding them toward books that align with their tastes and encourage reading engagement.
  • WCAG: Stands for Web Content Accessibility Guidelines. These are guidelines for making web content more accesible to people with disabilities and users in general.
  • Web Responsive: This refers to the application's design and layout dynamically adjusting to provide an optimal user experience on various screen sizes and formats, such as laptops, tablets, and smartphones.

2 References

2.1 Sample input/output formats

To receive a recommendation, the user will first have to provide 3 book titles and select the options that are most similar to their tastes, in this way the application will process the data and give recommendations.

image

After entering the information, click on the submit button. After this action the user is sent to the tab where the recommendations given by the algorithm are stored.

image

If the user wishes to continue using the tool, they can click on the upper left corner and go to the register window.

image

Once the login or registration procedure is completed, this tab will be displayed containing the user information on one side and the books and lists data on the other side.

2.2 Supporting or background information

Our service is a web application developed in Django and using powerful services like ChatGPT, Cloud Vision from Google, Google Books API, etc. It incorporates many useful tools for all public, because it can give recommendations based on user's previously read books, but also recommend books to people who have never read before, based only on their likes and interests.

It makes looking for books recommendations easier and faster. Compared to a human, it provides more accurate and trustworthy recommendations since it is based on actual similarities and not biased towards the reader's own feelings and experiences.

2.3 A description of the problems to be solved by the software

Over the years, the trend of reading has significantly declined. This has both social and economic repercussions. Per capita visits to bookstores are now being reported less frequently, impacting sales and revenues. Moreover, individuals who still maintain a reading habit often struggle to find material related to their interests. We are facing a lack of a comprehensive tool that encourages people to strengthen their reading habits and provides bookstores with a way to increase their profits by offering recommendations based on their catalog.

3. Specific requirements

3.1 External interfaces

3.1.1 GUIs

3.1.2 APIs

3.1.3 Hardware

Name Camera
Description of purpose Take pictures of the book’s covers.
Source of input or destination of output The source is the built-in device, and the destination a temporal folder
Valid range Valid range is an image of minimum 1024 x 768 px.
Units of measure NA
Timing As the user can retake the picture a lot of times, no time limit is set.
Relationships to other inputs/outputs Is the input of Cloud Vision API
Data formats JPG, JPEG, PNG.

3.2 Functions

  • FR01: If the user wants to create an account, then the system must provide users with the ability to create a new account by providing a registration form that includes name, email, password, date of birth, gender, username, real-time data validation (CAPTCHA), messages of error and success (depending on if the form registration was done correctly), collection of the user's reading preferences, and their history of books read.
  • FR02: If the user has already created an account, then the system must provide users with the ability to log in with an existing account through a login form that asks for their username and password, displaying an error message if the form has not been filled out with valid account credentials.
  • FR03: The system must provide logged-in users with the ability to edit their profile, including changing their name, password, gender, and book preferences. This functionality must be available through the "Edit Profile" option in the user account and must require confirmation from the user before saving changes.
  • FR04: The system could include gamification elements for logged-in users, such as the ability to earn badges or rewards for reaching significant reading milestones. These gamification elements will be used to motivate and reward users for their active participation in the reading platform.
  • FR05: The system must provide the logged user with the ability to register books that they have already read in the past to prevent the system from generating duplicate recommendations for those books in the future.
  • FR06: The system should recommend books that have positive ratings.
  • FR07: If a user is not logged into the system, then the system must be able to generate book recommendations based solely on the information provided by the user through a form. This form must include at least three books that will guide the recommendations, the desired number of pages for the recommended book, the genre, and the type of book.
  • FR08: If a logged-in user wants to share book recommendations, then the Book Management Subsystem could allow the user to create between 1 and 3 reading lists that will allow users to organize and manage their reading preferences by adding books they want.
  • FR09: The system must offer all users the ability to view detailed information about books after requesting a recommendation, including details such as book title, author, synopsis, genre, year of publication, number of pages, and ISBN.
  • FR10: If a user wants to buy a book presented in a recommendation generated by the system, then the system could display a button that, when clicked, will redirect the user to an external page where they can purchase the desired book.
  • FR11: The application should be able to provide users with the ability to use filter options that allow them to customize their search criteria and receive book recommendations more tailored to their interests.
  • FR12: If a user wishes to register a book as read using images or photographs of the book covers, then the system should display a button that allows the user to upload images of the book covers to register them as read.
  • FR13: The system should analyze the user's reading history and preferences to generate highly personalized book recommendations that are tailored to each user's reading habits and tastes.
  • FR14: If the user wishes to receive a book recommendation that is not based on their reading preferences, then the system could provide the user with the ability to select the "Surprise me" option. By clicking on this function, the system will suggest books that are outside the user's typical preferences to motivate the user to explore new genres and authors.
  • FR15: The system could provide logged-in users with the ability to mark books as "read later" by clicking on them while viewing them in a recommendation. These marked books will be considered in future suggestions to avoid including them again. In addition, from their profile, the user will have the ability to unmark books previously marked as "read later" in case they have never read them or mark them as already read.
  • FR16: The system must provide the user with the ability to access a complete help and support section, whose access link will be found in the footer of the page, which includes frequently asked questions (FAQ) and detailed user guides for the application.
  • FR17: If a registered user shares a reading list with another registered user, then the system should allow the user who received the reading list to view the page of the reading list shared by the user who shared it.
  • FR18: The system must automatically refresh the book catalog used for generating recommendations to integrate new book data into the catalog.
  • FR19: If a user who created a reading list wishes to edit the list details, then the system must provide the user with the ability to manage their reading lists through their profile section. This includes the ability to delete any reading lists they have created or the ability to edit the content of existing reading lists, including details such as the name, cover image, description, and the books within the reading list.
  • FR20: If a user wants to add a book to one of their reading lists, then the system will enable users to search for books and add them to a reading list by selecting the desired books from the search results.

3.3 Usability requirements

  • UR01: If a user enters an invalid email during the login process, then the application must display a warning indicating the email is incorrect and allow the user to re-enter their email.
  • UR02: The application must display a message inviting the reader to use the Recommendations tool in the webpage main dashboard.
  • UR03: The application must present relevant information about the books being recommended. That is, their cover, title, author, and synopsis in order to attract the reader’s interest.
  • UR04: The website must be responsive across different devices (laptop, desktop, smartphones, tablets).
  • UR05: The application must display a button with a hyperlink that redirects the user to the Google books website for each of the recommended books, according to the 2.4.4 criterion for Link Purpose of the WCAG 2.0.
  • UR06: The application’s design must follow the 1.4.3 criterion for Minimum contrast of the WCAG 2.0, with a contrast ratio of at least 4.5:1, as a means to be accesible to users with 20/40 vision, which are generally people with low vision and elders.
  • UR07: The application must have a group of only 4 different font sizes, and the smallest one should be at least 16 px.

3.4 Performance requirements

  • PR01: The system must support a maximum signals per execution of 100 simultaneous users in port 8000. (Django's port) Ref: https://www.elastic.co/guide/en/siem/guide/current/tcp-port-8000-activity-to-the-internet.html
  • PR02: The system must provide users with book recommendations within 3 seconds of submitting their reading history.
  • PR03: Users' reading history must remain accurate and unchanged over time.
  • PR04: The system should display an error message on screen when overloaded and APIs are unresponsive.
  • PR05: Up to 100 threads daily could be enabled for newsletter sending via SMTP.

3.5 Logical database requirements

  • LDR01: The system must be able to ensure unique email addresses for every user registered.
  • LDR02: The system must store the reader’s preferred genres, subjects, authors, and previously read books. (These will be in the format of string data type).
  • LDR03: The system must store the reader’s name, password, gender, and date of birth. (In the format of string, int, boolean, and date, respectively).
  • LDR04: The system must store the ID of each of the books associated with a reading list, given in a string format. This will allow to display information related to each book in the list, like title, author, and synopsis.
  • LDR05: The system must store the ID of each of the books associated with the “Read Later” list, given in a string format. This will allow to display information related to each book in the list, like title, and author.

3.6 Design constraints

  • The system must exclusively utilize Django's Object-Relational Mapping (ORM) capabilities for all database-related tasks. This deliberate choice ensures consistency, maintainability, and efficiency throughout the database management processes.
  • The system must adhere to the established Model-View-Template (MVT) structure imparted by Django. This entails clear separation between data models, user interfaces, and presentation logic, ensuring a coherent and modularized development approach.
  • The user interfaces must be designed to ensure responsiveness across various devices, including desktops, laptops, tablets, and smartphones, providing an optimal user experience on different screen sizes.
  • The system must implement industry-standard security measures, including encryption of user data, secure authentication processes, and protection against common web vulnerabilities
  • The system design must accommodate scalability requirements to handle increasing numbers of users and book catalog expansions without compromising performance.
  • The system design must be based on a specific technology stack (e.g., Python, HTML, CSS, JavaScript, SQL) that aligns with the development team's expertise and project goals. This choice should enable seamless integration, efficient development, and effective maintenance.
  • The system design must adhere to the budget and available resources (material and human), ensuring that the development, maintenance, and hosting costs are within the predefined limits.
  • The system design must comply with copyright and intellectual property regulations when displaying book covers, excerpts, and other copyrighted content.
  • The system must have the ability to execute its processes in less than 10 seconds, guaranteeing that users promptly receive precise and current information.
  • The user must be able to add up to 15 books per reading-list
  • The system must implement a consistent navigation menu or interface across all pages, this include maintaining a consistent design language, including color schemes, typography, and visual elements, to create a cohesive appearance.
  • The users must be able to easily return to the homepage from any page on the website, achieved through a prominent logo or a "Home" link in the navigation menu.
  • The system must provide a way for users to deliver feedback, report issues, or contact support.

4. Video

https://youtu.be/ya2JYCbXEq4

⚠️ **GitHub.com Fallback** ⚠️