-
Notifications
You must be signed in to change notification settings - Fork 0
docs: add architecture diagram document #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a816be2
docs: add architecture diagram document
ramraut-osm 0c9be89
Update apps/api/docs/block-diagram.md
xixas 62da452
Update apps/api/docs/block-diagram.md
xixas aba24fe
Update apps/api/docs/block-diagram.md
xixas bed53a9
Update apps/api/docs/block-diagram.md
xixas dc50d6f
Update apps/api/docs/block-diagram.md
xixas 46475e0
Update apps/api/docs/block-diagram.md
xixas a407805
Update apps/api/docs/block-diagram.md
xixas 4065f63
Update apps/api/docs/block-diagram.md
xixas 7b16ac6
Update apps/api/docs/block-diagram.md
xixas 5f7df10
Update apps/api/docs/block-diagram.md
xixas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# **Block Diagram** | ||
|
||
## **Introduction** | ||
|
||
This document provides a concise block diagram illustrating the architecture of our software application, Transcript Summarization. The diagram outlines the key components and their interactions to help you better understand how the application functions. | ||
|
||
**Block Diagram Overview:** | ||
|
||
The block diagram represents the software application's architecture in a visual format, making it easier to grasp its structure and functionality. | ||
|
||
**Block Diagram** | ||
|
||
 | ||
|
||
**Components and Functionalities** | ||
xixas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
1. **User/PWA** | ||
- This component is responsible for making the request to the transcript summarization API with a .vtt file uploaded by user. | ||
xixas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
### **2\. GraphQL API** | ||
|
||
- - The core component of a project created with NestJS, this is responsible for accepting the incoming requests made by the user/application for creating a transcript summary. | ||
- A status response is sent back to the user/PWA to signify if the file has been successfully summarized or if any errors were encountered. | ||
- Upon receiving the request, the API stores the received job ID and other necessary details in the database. | ||
xixas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
### **3\. Database TypeORM** | ||
|
||
- The MariaDB database is responsible for holding the records of uploaded transcripts along with all other required details about them such as the jobId, CreatedAt time, CreatedBy username etc. | ||
- The records in database are updated with the summarized file download link received from the server upon conversion success. | ||
xixas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
### **4\. Cron Job Scheduler** | ||
|
||
- A scheduled cron fetches all the uploaded transcripts in the pending status from the database and add their Job IDs to the queue for processing. | ||
xixas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
### **5\. Queue** | ||
|
||
- A queue is maintained to allow processing of transcript records one by one. | ||
- These queues are implemented using Bull Queue. | ||
- The queue receives the Job ID of the transcript to be summarized and fetches its File data from the database using this Job ID to pass it onto the service. | ||
|
||
### **6\. OpenAI Python Script** | ||
|
||
- The script holds the business logic for generating the summary of the uploaded transcript. | ||
- Upon success/failure, the response is sent back to update the status of the job ID | ||
|
||
**Data Flow** | ||
xixas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
- User interacts with the progressive web App to upload transcript files. | ||
- NestJS backend receives the file upload request and enqueues a job in the Bull queue for transcript summarization. | ||
- Cron job scheduler triggers a job every second | ||
- The queue processor picks up jobs from the Bull queue and executes transcript summarization of the uploaded file using the OpenAI Python script. | ||
- On success, summarized files are stored on a server, and a download link is generated using REST API Endpoint which is stored in MariaDB database | ||
xixas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- A download link through a REST API endpoint is made available for users to download the summarized file. | ||
|
||
## **Conclusion** | ||
|
||
This block diagram serves as a valuable resource for understanding the architecture of our software application. It highlights the core components, their interactions, and the flow of data within the application. | ||
xixas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.