Skip to content

System Requirement Specification V2

Ryan Trickett edited this page Jul 3, 2023 · 1 revision

User Stories Overview

For the system FridgeToPlate, the User stories would be from the perspective of the end-user.

The end-user in this regard would be the actor that will be using the application as per the business requirements. That is, for the purposes of generating a recipe from the food ingredients available within their inventory.

The end-user will use the application as such:

  1. The user authenticates their identity using the Authentication subsystem depending on if they have already registered their details on the system (Login functionality) or if they are creating a new account (Signup functionality)

  2. Upon successful authentication they will be granted access to the rest of the system. Wherein they would be able to edit their preferences and available ingredients using the Profile Management subsystem as well as the Recommendation management subsystem.

  3. The user would also be able to get generic recommendations not based on their available ingredients. As well as use the Recommendation Management subsystem to perform a step-by-step process to generate a recipe based on their preferences as well as the available ingredients.

  4. Upon the successful generation of a set of tailored recipes, the user can then click the recipe to start the process of preparing the recipe or save it to their profile to do so at a later time or share.

As per use case diagrams, the user stories would be as follows for each subsystem:

User Stories

Authentication

  1. As an end user, I would like to be able to sign up on the platform so that I can have my credentials and preferences stored on the system and access them when I use the system.
  2. As an end user, I would like to be able to login on the platform so that I can access my credentials and preferences stored on the system when I use it.
  3. As an end user, I would like to be able to logout from my profile on the platform so that I can have my credentials and preferences securely stored on the system and access them when I next use the system.

Profile Management

  1. As an end user, I would like to be able to view my favorite recipes so that I can access them whenever convenient for me.

  2. As an end user, I would like to be able to edit my personal preferences so that I can have a personalized experience using the application.

  3. As an end user, I would like to be able to edit my user details so that I can have my credentials up to date with my current details.

Recommendation Management

  1. As an end user, I would like to be able to add ingredients available in my inventory so that I can be able to get recipes that are tailored to my available ingredients.

  2. As an end user, I would like to be able to get suggested recipes based on my preferences and ingredients so that I can prepare the recipe or save it for later should I wish.

  3. As an end user, I would like to be able to filter suggested recipes so that I can better choose recipes based on other criteria.

Recipe Creation Management

  1. As an end user, I would like to be able to add a custom recipe to the platform so that I can share my recipe with other users and explore other users’ recipes.

  2. As an end user, I would like to be able to add and edit recipe steps so that I can instruct other users how to prepare the recipe.

  3. As an end user, I would like to be able to upload recipe images to accompany custom recipes so that I can show other user’s the intended outcome of the recipe.

Functional Requirements

Specific use cases completed for each demo can be found here.

  1. Authentication:

    1. Sign up
    2. Login
    3. Logout
    4. Forgot password
  2. Profile Management:

    1. View favourited recipes
    2. Edit user preferences
    3. Edit user details
  3. Recommendation Management:

    1. Add/edit search ingredients
    2. Display recipes that have specified ingredients
    3. Display recipes that have one more ingredient than specified
    4. Filter recommended recipes
  4. Creation Management:

    1. Add/edit recipe ingredients
    2. Add/edit recipe steps
    3. Add/edit recipe images
  5. Search Management:

    1. Search by recipe categories
    2. Search by name
    3. Show popular recipe searches
  6. Recipe Management:

    1. Add recipe review
    2. View recipe ingredients, images, and steps
    3. Favourite recipe

Use Case Diagrams

High Level

Authentication Subsystem

Profile Management Subsystem

Recommendation Management Subsystem

Recipe Creation Management Subsystem

Search Management Subsystem

Recipe Management Subsystem

Quality Requirements

  • Performance: Responsive for most user devices
  • Security: Data stored securely and encrypted where necessary
  • Privacy: The app must adhere to privacy regulations
  • Availability: Minimal downtown
  • Reliability: All actions performed by the user perform the results intended
  • Usability: Natural user experience, where new users easily understand the application
  • Maintainability: The app should be modular for easy updates and modifications
  • Scalability: Able to handle a high volume of concurrent users without slowdown
  • Compatibility: Usable across most user devices

Architectural Patterns

  • Three-tier: Enhance performance by distributing the workload across multiple tiers, allowing for efficient scaling and improved resource utilization. Additionally, it promotes modularization, enabling the optimization of each tier independently, leading to better overall system performance.
  • Service-oriented: Enhances reliability by enabling fault isolation and containment, ensuring that failures in one service do not impact the entire system. Furthermore, SOA supports the implementation of redundancy and failover mechanisms, allowing for seamless service continuity and improved overall system reliability.
  • MVC: Enhances usability by providing a clear separation of concerns, allowing for independent development and maintenance of the user interface (View) and the underlying data and business logic (Model). This separation simplifies the design process, making it easier to create intuitive and user-friendly interfaces.
  • Publish-subscribe: Improves usability by decoupling components and enabling asynchronous communication. This decoupling allows for flexible and modular design. Furthermore, PubSub facilitates real-time updates and event-driven interactions, enhancing usability by providing timely and responsive feedback to users.
  • Component-based Development: Enhances compatibility by promoting the reuse of modular components across different systems and platforms. This approach ensures that components can be easily integrated into various environments, reducing compatibility issues and enabling seamless interoperability. Also, allowing for the encapsulation of complex functionalities within self-contained units, making it easier to update or replace individual components without disrupting the overall system compatibility.
  • Database-centric: Prioritizes privacy by implementing privacy controls and encryption mechanisms directly at the data level, data-centric architectures can safeguard personal information, providing granular control over access and reducing the risk of unauthorized disclosure.

Design Patterns

  • Observer Pattern: This pattern is used to model the changing state of the Profile state, and to alert necessary parties affected by the Profile state.
  • Command Pattern: This pattern is used to model 2 sub-systems, namely: (1) Authentication and (2) Recipe Recommendation sub-systems
  • Strategy Pattern: This pattern is used to model the Search sub-syste; being able to search by different type of methods
  • Factory Method Pattern: Used to model the creation of recipes.
  • State Pattern: This pattern is used in conjuction with the Factory Pattern to know for which dietary plan to create a recipe; The states are then the various dietary plans
  • Decorator Pattern: This model the functionality of Review and favourites; these are the add-ons added as the recipes are viewed or displayed
  • Proxy Pattern: This pattern is used to model the manner of access to the database, which is through the APIs
  • Façade Pattern: This provides a gentle user interface and seamless user experience.
  • Singleton Pattern: This is used to model the Database; only a single instance of the database should be running when the system is operational
  • Memento Pattern: This pattern is used to model the data persistence in the database and how much is handled.

Constraints

  • Users Hardware Resources: Seeing as this application is a web app it should be light on users' system resources to allow different devices to access the application effectively.
  • AWS Client: As our client AWS ensures that we use their architecture for the deployment and execution of background resources.
  • Open Source: Our client specified that all code must be open source, meaning all libraries must be open source.
  • Cost: The system and all its infrastructure must have a total cost of less than $50 for the entirety of development and distribution.

Technology Choices

Frontend

Angular:

  • Overview: A feature-rich JS framework with TypeScript, enhancing productivity and code organization. Robust ecosystem and community support. Steep learning curve. Larger bundle sizes are suitable for complex apps and smaller projects.
  • Pros: Comprehensive set of tools and features, and active community support
  • Cons: Steep learning curve, and large bundle sizes

React:

  • Overview: A popular JavaScript library for building user interfaces, focusing on component-based development and virtual DOM rendering. React enables efficient UI updates, reusability, and scalability. It has a large community and ecosystem with extensive support and resources.
  • Pros: Component-based architecture promoting reusability and modular development, efficient virtual DOM rendering for optimized UI updates, and active community
  • Cons: Steeper learning curve for beginners, and React is a library and may require additional configuration and integration with other tools for a complete development stack.

Ionic:

  • Overview: Ionic is a popular open-source framework for building cross-platform mobile applications using web technologies such as HTML, CSS, and JavaScript. It provides a library of pre-designed UI components and tools for app development and deployment.
  • Pros: Rapid cross-platform mobile app development using web technologies, pre-designed UI components for native-like appearance, and simplified development with live-reload and easy deployment options.
  • Cons: Potentially slower performance than fully native apps, and limited access to device-specific features, requiring additional plugins or custom development.

Backend

NestJS:

  • Overview: TypeScript-based framework for scalable server-side applications. Utilizes decorators and dependency injection for modular development. Built-in support for GraphQL and WebSocket.
  • Pros: TypeScript-based, scalable and maintainable applications, modular development with decorators and dependency injection, and built-in support for GraphQL and WebSocket.
  • Cons: Requires familiarity with TypeScript and server-side concepts, has a smaller community compared to some frameworks.

Spring Boot:

  • Overview: Java-based framework for enterprise-grade applications. Extensive libraries and tools for rapid development. Dependency injection and robust security.
  • Pros: Java-based, extensive libraries for rapid development, and dependency injection with robust security features.
  • Cons: Complex configurations and boilerplate code, can have a large memory footprint.

Django:

  • Overview: Python-based web framework known for simplicity and productivity. Provides ORM, authentication, and admin interface.
  • Pros: Python-based, simplicity and productivity, and built-in ORM, authentication, and admin interface.
  • Cons: Limited scalability for high-traffic apps, may lack performance compared to lower-level frameworks, and relies heavily on Django's conventions, limiting flexibility.

Database

MySQL:

  • Overview: MySQL is a popular open-source relational database management system. It offers a robust and scalable solution for managing structured data. MySQL is widely used in various applications, providing reliability, ACID compliance, and comprehensive SQL support.
  • Pros: Open-source and widely adopted, reliable and ACID-compliant for data integrity, strong community support, and comprehensive SQL capabilities for complex querying and data manipulation.
  • Cons: Requires manual configuration and maintenance, limited scalability compared to some NoSQL databases, and may have performance limitations for highly concurrent workloads.

AWS RDS (Relational Database Service):

  • Overview: AWS RDS is a managed database service that simplifies the deployment and management of relational databases. It offers support for various database engines like MySQL, PostgreSQL, and Oracle. AWS RDS provides automated backups, scalability, and high availability.
  • Pros: Fully managed service, reducing administrative overhead, automated backups and patching, and scalability and high availability options.
  • Cons: Vendor lock-in with AWS, limited control over the underlying infrastructure, and additional costs for certain features and resources.

AWS DynamoDB:

  • Overview: AWS DynamoDB is a fully managed NoSQL database service. It provides high scalability, low latency, and automatic scaling to handle varying workloads. DynamoDB is designed for applications needing fast and flexible storage for unstructured or semi-structured data.
  • Pros: Fully managed, scalable, and highly available, with low latency for quick data retrieval, and flexible schema and easy scalability.
  • Cons: Query flexibility is limited compared to SQL databases, has a higher cost compared to self-managed databases, may require additional effort for complex data modeling, and the eventual consistency model may require careful design.

Final Tech Stack

Using Angular, Spring Boot, and DynamoDB as an application tech stack offers several benefits. Angular, with its robust framework, facilitates PubSub, MVC, and Component-based development. It provides a structured approach to building scalable and maintainable web applications, ensuring efficient data flow and component reusability. Spring Boot, on the other hand, supports Service-Oriented Architecture (SOA), enabling the development of loosely coupled and independently deployable services. It simplifies the creation of backend services, promotes modularity, and facilitates communication between different components of the application. DynamoDB, being a data-centric NoSQL database, ensures efficient storage and retrieval of data, aligning well with the data-centric approach. It offers high scalability, low latency, and flexible schema, making it suitable for applications that prioritize data-driven functionalities. Together, this tech stack allows the building of highly performant, scalable, and modular applications with a focus on efficient data handling and seamless communication between frontend and backend components.

  • Frontend: Angular
  • Backend: Spring Boot
  • Database: DynamoDB

Interface Diagram

Database Models

Proposed System Overview

System Architecture Diagram

Website Enterprise Architecture Diagram

Class Diagram

Class Diagram