From f66a8c5c6b711f5b872c7dd05ffa96e8782ff139 Mon Sep 17 00:00:00 2001 From: r00tmeister <117168764+r00tmeister@users.noreply.github.com> Date: Sun, 11 Aug 2024 15:00:38 +0200 Subject: [PATCH] Add new links on home page and add link to pdf in product requirements --- docs/index.md | 11 +-- docs/prd/project-information.md | 6 +- docs/public/{pdfs => }/techspec.pdf | Bin docs/trd/back-end-layer-component.md | 2 +- docs/trd/cloud-infrastructure.md | 2 +- docs/trd/container-level.md | 2 +- docs/trd/context-level.md | 2 +- docs/trd/data-layer-component.md | 2 +- docs/trd/entity-relationship-diagram.md | 2 +- docs/trd/front-end-layer-component.md | 2 +- docs/trd/pragmatic-quality-model.md | 2 +- docs/trd/proposed-solution-strategy.md | 92 ++++++++++++------------ docs/trd/quality-goals.md | 2 +- docs/trd/runtime-view.md | 2 +- docs/trd/use-case-diagram.md | 2 +- 15 files changed, 68 insertions(+), 63 deletions(-) rename docs/public/{pdfs => }/techspec.pdf (100%) diff --git a/docs/index.md b/docs/index.md index 9432815..a105e51 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,10 +6,13 @@ hero: name: "Share2Teach" text: "This document" tagline: Group 9 CMPG323 - #actions: - # - theme: brand - # text: Changelog - # link: /markdown-examples + actions: + - theme: brand + text: Arc 42 + link: https://arc42.org/overview + - theme: alt + text: C4 Modelling + link: https://c4model.com/ features: - title: Product Requirement Document diff --git a/docs/prd/project-information.md b/docs/prd/project-information.md index 19d47ab..d6a0d2e 100644 --- a/docs/prd/project-information.md +++ b/docs/prd/project-information.md @@ -1,7 +1,5 @@ # Project Information -Details or description of the product that will improve the customer experience. - -![Share2Teach](./public/pdfs/techspec.pdf) - +Project Specification: +[Share2Teach](/techspec.pdf) diff --git a/docs/public/pdfs/techspec.pdf b/docs/public/techspec.pdf similarity index 100% rename from docs/public/pdfs/techspec.pdf rename to docs/public/techspec.pdf diff --git a/docs/trd/back-end-layer-component.md b/docs/trd/back-end-layer-component.md index 810b126..d609306 100644 --- a/docs/trd/back-end-layer-component.md +++ b/docs/trd/back-end-layer-component.md @@ -4,7 +4,7 @@ The word "component" is a hugely overloaded term in the software development ind An important point to note here is that all components inside a container typically execute in the same process space. In the C4 model, components are not separately deployable units. -![Component Level](../public/component-be.png) +![Component Level](/component-be.png) ## Back-end Components diff --git a/docs/trd/cloud-infrastructure.md b/docs/trd/cloud-infrastructure.md index ccbdd20..ef4d89a 100644 --- a/docs/trd/cloud-infrastructure.md +++ b/docs/trd/cloud-infrastructure.md @@ -6,7 +6,7 @@ Always encryption in transit. Always encryption at rest in databases. -![Context Level](../public/deployment-view.png) +![Context Level](/deployment-view.png) ## Azure app service diff --git a/docs/trd/container-level.md b/docs/trd/container-level.md index 73acf55..d30abb3 100644 --- a/docs/trd/container-level.md +++ b/docs/trd/container-level.md @@ -2,7 +2,7 @@ In the C4 model, a container represents an application or a data store. A container is something that needs to be running in order for the overall software system to work. In real terms, a container is something like: -![Container Level](../public/container.png) +![Container Level](/container.png) ## Internal containers diff --git a/docs/trd/context-level.md b/docs/trd/context-level.md index cd69bc4..14d20ba 100644 --- a/docs/trd/context-level.md +++ b/docs/trd/context-level.md @@ -2,4 +2,4 @@ A software system is the highest level of abstraction and describes something that delivers value to its users, whether they are human or not. This includes the software system you are modelling, and the other software systems upon which your software system depends (or vice versa). -![Context Level](../public/context.png) +![Context Level](/context.png) diff --git a/docs/trd/data-layer-component.md b/docs/trd/data-layer-component.md index fd12a1e..6eecc3e 100644 --- a/docs/trd/data-layer-component.md +++ b/docs/trd/data-layer-component.md @@ -4,7 +4,7 @@ The word "component" is a hugely overloaded term in the software development ind An important point to note here is that all components inside a container typically execute in the same process space. In the C4 model, components are not separately deployable units. -![Component Level](../public/component-db.png) +![Component Level](/component-db.png) ## Data layer Components diff --git a/docs/trd/entity-relationship-diagram.md b/docs/trd/entity-relationship-diagram.md index 44ed2d5..41b42a4 100644 --- a/docs/trd/entity-relationship-diagram.md +++ b/docs/trd/entity-relationship-diagram.md @@ -1,3 +1,3 @@ # Entity Relationship Diagram -![ERD](../public/erd.png) \ No newline at end of file +![ERD](/erd.png) diff --git a/docs/trd/front-end-layer-component.md b/docs/trd/front-end-layer-component.md index 8c535ef..5236fbf 100644 --- a/docs/trd/front-end-layer-component.md +++ b/docs/trd/front-end-layer-component.md @@ -4,7 +4,7 @@ The word "component" is a hugely overloaded term in the software development ind An important point to note here is that all components inside a container typically execute in the same process space. In the C4 model, components are not separately deployable units. -![Component Level](../public/component-fe.png) +![Component Level](/component-fe.png) ## Front-end Components diff --git a/docs/trd/pragmatic-quality-model.md b/docs/trd/pragmatic-quality-model.md index 6c21b23..723917c 100644 --- a/docs/trd/pragmatic-quality-model.md +++ b/docs/trd/pragmatic-quality-model.md @@ -1,3 +1,3 @@ # Pragmatic Quality Model -![Context Level](../public/quality.png) +![Context Level](/quality.png) diff --git a/docs/trd/proposed-solution-strategy.md b/docs/trd/proposed-solution-strategy.md index d5007f2..c919b73 100644 --- a/docs/trd/proposed-solution-strategy.md +++ b/docs/trd/proposed-solution-strategy.md @@ -6,114 +6,118 @@ This document processing application utilizes a layered architecture approach to achieve modularity, maintainability, and separation of concerns. While other architectures offer advantages for complex applications, a layered architecture provides a simpler and potentially more efficient solution for this specific use case. -Here's a breakdown of the key layers within this chosen architecture: +Here's a breakdown of the key layers within this chosen architecture: 1. #### Presentation Layer -This layer handles user interaction and presentation logic. It utilizes the frontend framework (Nuxt.js with Tailwind CSS) to build the user interface for uploading documents, giving it metadata, grading the documents, viewing the documents, distributing the documents, and downloading documents. +This layer handles user interaction and presentation logic. It utilizes the frontend framework (Nuxt.js with Tailwind CSS) to build the user interface for uploading documents, giving it metadata, grading the documents, viewing the documents, distributing the documents, and downloading documents. -The frontend communicates with the backend API (FastAPI) through well-defined endpoints to initiate document upload, tagging, and authorization. +The frontend communicates with the backend API (FastAPI) through well-defined endpoints to initiate document upload, tagging, and authorization. -This layer focuses on providing a user-friendly experience for interacting with the application. +This layer focuses on providing a user-friendly experience for interacting with the application. 2. #### Business Logic Layer -This layer houses the core application logic for document uploads, storage, and retrieval. It resides within the FastAPI backend application. +This layer houses the core application logic for document uploads, storage, and retrieval. It resides within the FastAPI backend application. -Responsibilities include: +Responsibilities include: -- Receiving document uploads from the presentation layer. -- Validating uploaded documents (e.g., file type, size). +- Receiving document uploads from the presentation layer. +- Validating uploaded documents (e.g., file type, size). - Queue uploads with a message broker (RabbitMQ). - Handle distributed task queues (Celery). - Watermark, preview, and download of documents. -- Provide authentication, authorization, and access control to documents. +- Provide authentication, authorization, and access control to documents. - Caching (Redis). - Interacting with the data access layer to store and retrieve documents and their metadata in order to approve, preview, rate, download, or distribute data. -This layer encapsulates the business rules and logic for handling document uploads, storage, and retrieval. +This layer encapsulates the business rules and logic for handling document uploads, storage, and retrieval. 3. #### Data Access Layer This layer abstracts the interaction with the underlying database management system (PostgreSQL database). -It utilizes an ORM (Object-Relational Mapper, SQLAlchemy) or a database access library to interact with the PostgreSQL database securely. +It utilizes an ORM (Object-Relational Mapper, SQLAlchemy) or a database access library to interact with the PostgreSQL database securely. -Responsibilities include: -- Storing documents (in Azure Blob) and their associated metadata in the relevant tables (upload timestamps, processing status). -- Retrieving relevant data based on requests from the business logic layer. -- This layer shields the business logic from the specifics of the database implementation, promoting code reusability and maintainability. +Responsibilities include: -## Benefits of Layered Architecture: +- Storing documents (in Azure Blob) and their associated metadata in the relevant tables (upload timestamps, processing status). +- Retrieving relevant data based on requests from the business logic layer. +- This layer shields the business logic from the specifics of the database implementation, promoting code reusability and maintainability. -**Modular Design:** Clear separation of concerns between presentation, business logic, and data access layers promotes maintainability and easier testing. +## Benefits of Layered Architecture: -**Scalability:** The architecture can be scaled by adding resources to individual layers as needed (e.g., scaling the database server for increased data storage). +**Modular Design:** Clear separation of concerns between presentation, business logic, and data access layers promotes maintainability and easier testing. -**Simpler Implementation:** Compared to a most of the other architectures, a layered architecture can be easier to set up and manage, particularly for smaller or less complex applications. +**Scalability:** The architecture can be scaled by adding resources to individual layers as needed (e.g., scaling the database server for increased data storage). + +**Simpler Implementation:** Compared to a most of the other architectures, a layered architecture can be easier to set up and manage, particularly for smaller or less complex applications. ## Technology Stack -We'll leverage a Python and Javascript technology stack to achieve our goals: +We'll leverage a Python and Javascript technology stack to achieve our goals: -### Backend: +### Backend: -#### FastAPI: +#### FastAPI: -- This high-performance framework is ideal for building the application's RESTful API, enabling efficient handling of document uploading, storage, and retrieval. +- This high-performance framework is ideal for building the application's RESTful API, enabling efficient handling of document uploading, storage, and retrieval. -#### Celery: +#### Celery: -- Asynchronous task processing with Celery is crucial for handling document tasks efficiently. This ensures responsiveness by offloading tasks from the main thread. +- Asynchronous task processing with Celery is crucial for handling document tasks efficiently. This ensures responsiveness by offloading tasks from the main thread. -#### Redis: +#### Redis: -- A fast in-memory data store like Redis is well-suited for caching frequently used data (e.g., pre-processed entity recognition models) and storing temporary results during document operations improving overall performance. +- A fast in-memory data store like Redis is well-suited for caching frequently used data (e.g., pre-processed entity recognition models) and storing temporary results during document operations improving overall performance. -#### PostgreSQL: +#### PostgreSQL: -- This robust object-relational database (ORDB) provides a secure and reliable storage solution for: -- User information (if applicable for authentication and authorization). -- Document metadata (e.g., upload timestamps, processing status). +- This robust object-relational database (ORDB) provides a secure and reliable storage solution for: +- User information (if applicable for authentication and authorization). +- Document metadata (e.g., upload timestamps, processing status). -### Frontend: +### Frontend: -#### Nuxt.js: +#### Nuxt.js: -- Nuxt.js remains one of the foundational choices for building a user-friendly frontend application. +- Nuxt.js remains one of the foundational choices for building a user-friendly frontend application. - Nuxt.js is better suited than Vue.js due to it not being a single-page application, thus it allows us to add SEO (Google Analytics) tags on a more granular manner. - It provides a streamlined development experience with opinionated features like routing, server-side rendering, and automatic code-splitting. - This will help multiple team members adhere to a structure that is predetermined and opinionated. -#### Tailwind CSS: +#### Tailwind CSS: - This utility-first CSS framework allows for rapid development of responsive user interfaces. Tailwind's pre-built classes eliminate the need for extensive custom CSS, saving development time and promoting code maintainability. Features like themes, tree-shaking, and intellisense adds to a much better experience for developers. -#### Pinia: +#### Pinia: - This lightweight state management library for Vue.js is the defacto state library as per the official documentation of Vue.js. Pinia allows you to manage application state in a modular way, simplifying data management for tasks like API data and tracking user actions. -## Azure Cloud Services Configuration: +## Azure Cloud Services Configuration: -### Azure Database for PostgreSQL: +### Azure Database for PostgreSQL: -To ensure robust data storage and retrieval, Azure Database for PostgreSQL is selected, it is also Open-Source and free. This managed service provides scalability, security, and reliability for storing sensitive information such as user data and document metadata. It also has various extensions, created by the community, to extend functionality. +To ensure robust data storage and retrieval, Azure Database for PostgreSQL is selected, it is also Open-Source and free. This managed service provides scalability, security, and reliability for storing sensitive information such as user data and document metadata. It also has various extensions, created by the community, to extend functionality. ## Azure Container Apps: Azure Container Apps is a server-less platform that allows you to maintain less infrastructure and save costs while running containerized applications. Azure Container Apps allows us to create application multiple environments where components within the application environment can talk to each other via localhost and can communicate to other application environments via HTTP and GRPC all within the same network. ### Azure Containers: -![Azure Containers](../public/azure-container-apps-containers.png) + +![Azure Containers](/azure-container-apps-containers.png) ### Azure Container Apps Example: -![Azure Container Apps Example](../public/example-scenarios-for-azure-container-apps.png) + +![Azure Container Apps Example](/example-scenarios-for-azure-container-apps.png) ### Azure Container Apps using Dapr: -![Azure Container Apps with Dapr](../public/Azure-Container-Apps-Architecture-for-building-Microservices-using-dapr-1.jpg) + +![Azure Container Apps with Dapr](/Azure-Container-Apps-Architecture-for-building-Microservices-using-dapr-1.jpg) ## Future Considerations: -In the future, should the need arise for one of the layers of the layers architecture to be scaled individually, separate from the others, we will be able to do so. Also, Azure Container Apps allows us to scale down to zero and scale up to n-amount, should the need arise. Azure Container Apps abstracts away a lot of the complexities of orchestration tools like Kubeternetes, which might be necessary for more complex applications, but not for this specific application. +In the future, should the need arise for one of the layers of the layers architecture to be scaled individually, separate from the others, we will be able to do so. Also, Azure Container Apps allows us to scale down to zero and scale up to n-amount, should the need arise. Azure Container Apps abstracts away a lot of the complexities of orchestration tools like Kubeternetes, which might be necessary for more complex applications, but not for this specific application. -In the future, if we want to build out additional micro-services, we can modularly intergrate with it, or serve it as a stand-alone service. We can also use this to monitor our containers individually, or as a whole. Azure Container Apps provides intergrated security services at scale. \ No newline at end of file +In the future, if we want to build out additional micro-services, we can modularly intergrate with it, or serve it as a stand-alone service. We can also use this to monitor our containers individually, or as a whole. Azure Container Apps provides intergrated security services at scale. diff --git a/docs/trd/quality-goals.md b/docs/trd/quality-goals.md index a861a41..568fa49 100644 --- a/docs/trd/quality-goals.md +++ b/docs/trd/quality-goals.md @@ -1,3 +1,3 @@ # Quality Goals -![Context Level](../public/quality-goals.png) +![Context Level](/quality-goals.png) diff --git a/docs/trd/runtime-view.md b/docs/trd/runtime-view.md index 5bed04c..920dbca 100644 --- a/docs/trd/runtime-view.md +++ b/docs/trd/runtime-view.md @@ -1,3 +1,3 @@ # Runtime View - + diff --git a/docs/trd/use-case-diagram.md b/docs/trd/use-case-diagram.md index cae1546..12b2c51 100644 --- a/docs/trd/use-case-diagram.md +++ b/docs/trd/use-case-diagram.md @@ -1,3 +1,3 @@ # Use Case Diagram -![Context Level](../public/use-case-diagram.png) +![Context Level](/use-case-diagram.png)