Skip to content

Commit

Permalink
Add new links on home page and add link to pdf in product requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
r00tmeister committed Aug 11, 2024
1 parent 8c68998 commit f66a8c5
Show file tree
Hide file tree
Showing 15 changed files with 68 additions and 63 deletions.
11 changes: 7 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions docs/prd/project-information.md
Original file line number Diff line number Diff line change
@@ -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)
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/trd/back-end-layer-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/trd/cloud-infrastructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/trd/container-level.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/trd/context-level.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion docs/trd/data-layer-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/trd/entity-relationship-diagram.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Entity Relationship Diagram

![ERD](../public/erd.png)
![ERD](/erd.png)
2 changes: 1 addition & 1 deletion docs/trd/front-end-layer-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/trd/pragmatic-quality-model.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Pragmatic Quality Model

![Context Level](../public/quality.png)
![Context Level](/quality.png)
92 changes: 48 additions & 44 deletions docs/trd/proposed-solution-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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.
2 changes: 1 addition & 1 deletion docs/trd/quality-goals.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Quality Goals

![Context Level](../public/quality-goals.png)
![Context Level](/quality-goals.png)
2 changes: 1 addition & 1 deletion docs/trd/runtime-view.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Runtime View

<!-- ![Context Level](../public/runtime-view.png) -->
<!-- ![Context Level](/runtime-view.png) -->
2 changes: 1 addition & 1 deletion docs/trd/use-case-diagram.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Use Case Diagram

![Context Level](../public/use-case-diagram.png)
![Context Level](/use-case-diagram.png)

0 comments on commit f66a8c5

Please sign in to comment.