1. Trang chủ
  2. » Luận Văn - Báo Cáo

Luận văn a cloud based approach to architecting and constructing an online portal for booking psychotherapy services

107 0 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề A Cloud-Based Approach to Architecting and Constructing an Online Portal for Booking Psychotherapy Services
Tác giả Phan Thien Phuc, Tuong Minh Hung
Người hướng dẫn Dr. Le Lam Son
Trường học Ho Chi Minh City University of Technology
Chuyên ngành Computer Science
Thể loại Graduation thesis
Năm xuất bản 2023
Thành phố Ho Chi Minh City
Định dạng
Số trang 107
Dung lượng 10,85 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

solu-Ho Chi Minh City University of TechnologyFaculty of Computer Science and Engineering 1.3 Thesis structure In this thesis, we focus on analyzing the technologies being applied in pra

Trang 1

GRADUATION THESIS

A CLOUD-BASED APPROACH TO

ARCHITECTING AND CONSTRUCTING AN

ONLINE PORTAL FOR BOOKING

PSYCHOTHERAPY SERVICES

MAJOR: COMPUTER SCIENCE

THESIS COMMITTEE: Computer Science 10 SUPERVISOR(s): Dr Le Lam Son

REVIEWER: M.Sc Truong Thi Thai Minh

——o0o——

HO CHI MINH CITY, JUNE 2023

Trang 6

Declaration Of Authenticity

We, Tuong Minh Hung and Phan Thien Phuc, hereby declare that this thesis, entitled "Acloud-based approach to architecting and constructing an online portal for booking psychother-apy services," is the result of our joint efforts and collaboration, and has not been submittedfor any degree, diploma, or other qualification at any other university or institution All sources

of information used in the research, including ideas, data, and conclusions, have been edged and cited in the text and listed in the references We confirm that:

• Any assistance received in the preparation of this thesis has been appropriately edged

acknowl-• The research presented in this thesis is original and, to the best of our knowledge, hasnot been previously published or submitted for publication, in whole or in part, except asspecifically mentioned in the text

• We understand that any violation of the above declarations may result in disciplinaryaction and affect the evaluation of our thesis

6

Trang 7

We would like to express our deepest gratitude to our thesis supervisor, Dr Le Lam Son,for his invaluable guidance, support, and encouragement throughout the course of this researchproject His expertise and insightful suggestions have been instrumental in shaping our workand enhancing the quality of our research.

We would like to convey my heartfelt gratitude to everyone who made it possible for me

to finish this report

Finally, we would like to extend our heartfelt appreciation to our families and friends fortheir unwavering support, understanding, and encouragement throughout this journey Withouttheir love and belief in us, this achievement would not have been possible

Trang 8

Our thesis focuses on developing and evaluating a cloud-based online portal to improveaccess to psychotherapy services in Vietnam The proposed online portal leverages cloud-basedtechnologies to enable a highly scalable, reliable, and cost-effective solution for booking psy-chotherapy services It features a user-friendly interface, allowing clients to search for and bookappointments with qualified therapists based on their preferences, such as location, specializa-tion, and availability The portal provides therapists with a high-performance platform to man-age their schedules, track appointments, and securely store client records in compliance withVietnamese data privacy regulations By developing the application, it highlights the poten-tial for future enhancements, such as teletherapy and AI-powered recommendations, to furtherimprove the portal’s capabilities and impact

8

Trang 9

Declaration Of Authenticity 6

1.1 Overview 15

1.2 Goals and scope of the topic 15

1.3 Thesis structure 16

2 Related Works 17 2.1 Overview architecture 17

2.1.1 Booking service in traditional computing 17

2.1.2 Booking psychotherapy service in Vietnam 17

2.2 Comparison and evaluation 17

2.2.1 Booking service in traditional computing 18

2.2.2 Booking psychotherapy service in Vietnam 19

3 System design 20 3.1 Overview design 20

3.2 Roles and functions of components in the system 21

3.2.1 NextJS 21

3.2.2 ExpressJS 22

3.2.3 MongoDB 23

3.2.4 Amazon S3 24

3.2.5 Kubernetes 25

3.2.6 Additional technology 26

3.2.6.1 Content Delivery Networks (CDN) 26

3.2.6.2 Load balancer 27

3.2.6.3 Firewalls 28

4 Application design 30 4.1 Requirements 30

4.1.1 Functional Requirement 30

4.1.2 Non-Functional Requirement 31

4.2 Use-case diagrams 32

4.2.1 System Overview 32

4.2.2 Login 33

4.2.3 Search 33

4.2.4 Booking 34

Trang 10

4.2.5 Admin 35

4.3 Use-case Detail 35

4.3.1 Login 35

4.3.2 Search 36

4.3.3 Booking 37

4.3.4 Admin 39

4.4 Database design 39

4.5 Sequence diagram 41

4.5.1 Login 41

4.5.2 Search 42

4.5.3 Booking 43

4.5.4 Admin 44

5 Application UI design 46 5.1 Landing Page 46

5.2 Login 48

5.3 Search 49

5.4 Doctor Info (Search Profile) 50

5.5 Profile 52

5.6 Booking 55

5.7 Admin management page 58

6 Application infrastructure & Deployment 59 6.1 Cloud computing 59

6.1.1 Overview 59

6.1.2 Advantages 59

6.2 Amazon Web Service 60

6.3 MongoDB Atlas 61

6.4 Application architecture on AWS 62

6.4.1 Problems statement 62

6.4.2 Overview 63

6.4.3 Decision for AWS services 68

6.4.4 Problems solving 70

6.4.4.1 Availability & Resiliency 70

6.4.4.2 Scalability 71

6.4.4.3 Performance 71

6.4.4.4 Security 72

6.4.4.5 Cost optimization 73

6.4.4.6 Maintenance and Management 74

6.4.5 AWS Elastic Kubernetes Service 76

6.4.5.1 Overview 76

6.4.5.2 Application 78

6.4.5.3 IAM Roles for Service Accounts (IRSA) 79

6.4.5.4 Add-ons 80

6.4.5.5 GitOps 80

10

Trang 11

6.5.3 AWS EKS 83

6.5.4 AWS Amplify 84

6.5.5 AWS Load Balancer 85

6.5.6 AWS S3 85

6.5.7 AWS EKS Add-ons 86

6.5.7.1 ArgoCD 86

6.5.7.2 Kubecost 86

6.5.7.3 Grafana 87

7 System evaluation & Future plan 89 7.1 System testing 89

7.1.1 Application 89

7.1.1.1 Google LightHouse 89

7.1.1.2 Results 90

7.1.2 Infrastructure 91

7.1.2.1 AWS WAF 91

7.1.2.2 Performance test 92

7.1.2.3 Scalability 96

7.1.2.4 GitOps 99

7.1.2.5 MongoDB Backups 100

7.2 System evaluation 100

7.2.1 Results 100

7.3 Limitations 101

7.4 Future Plan 101

7.4.1 Mobile platform integration 101

7.4.2 More features 102

7.4.3 Right-sizing resources to optimize cost 102

8 Conclusion 104 8.1 Thesis topic 104

8.2 Workload distribution 105

Trang 12

List of Tables

4.1 Use Case Detail: Login 36

4.2 Use Case Detail: Search for Psychiatrist 37

4.3 Use Case Detail: Book Appointment 38

4.4 Use Case Detail: Send post-meeting confirmation email 38

4.5 Use Case Detail: View/Edit appointment and user information 39

6.1 AWS services description 67

8.1 Thesis’s workload distribution for each member 105

12

Trang 13

3.1 Overview of our system design 21

3.2 Kubernetes ecosystem [6] 26

4.1 System Overview Use Case Diagram 32

4.2 Login Use Case Diagram 33

4.3 Search Use Case Diagram 33

4.4 Booking Use Case Diagram 34

4.5 Admin Use Case Diagram 35

4.6 Database design 40

4.7 Login Sequence Diagram 41

4.8 Search sequence diagram 42

4.9 Booking sequence diagram 43

4.11 View, edit data appointment data via admin feature 44

4.10 View, edit data user data via admin feature 45

5.1 Landing Page 1 46

5.2 Landing Page 2 47

5.3 Landing Page 3 47

5.4 Landing Page 4 48

5.5 Login page 48

5.6 Search 1 49

5.7 Search 2 50

5.8 Search Profile - overview 51

5.9 Search Profile - Location 51

5.10 Search Profile - Business Hours 52

5.11 Search Profile - Review 52

5.12 Profile - Dashboard 53

5.13 Profile - Requests 53

5.14 Profile - History 54

5.15 Profile - Business Hour 54

5.16 Profile - Edit 55

5.17 Booking 1 55

5.18 Booking 2 56

5.19 Booking 3 56

5.20 Booking 4 57

5.21 Booking 5 57

5.22 Management page 58

6.1 AWS Global Infrastructure [2] 61

6.2 Proposed AWS Architecture for booking psychotherapy portal 64

6.3 Shared responsibility model 72

Trang 14

6.4 Terraform architecture [13] 75

6.5 AWS Amplify CI/CD flow 76

6.6 AWS EKS Cluster overview 77

6.7 Kubernetes resources for back-end 78

6.8 AWS EKS IRSA workflow [3] 79

6.9 GitOps workflow 81

6.10 AWS VPC 82

6.11 AWS VPC Endpoints 82

6.12 MongoDB Endpoint 83

6.13 AWS EKS Cluster 83

6.14 AWS EKS Cluster node group 84

6.15 AWS Amplify 84

6.16 AWS Application Load balancer 85

6.17 AWS Application Load balancer target groups 85

6.18 AWS S3 buckets 86

6.19 ArgoCD 86

6.20 Kubecost 87

6.21 Grafana dashboard 1 88

6.22 Grafana dashboard 2 88

7.1 Google LightHouse desktop score for landing page 90

7.2 Google LightHouse mobile score for landing page 90

7.3 AWS WAF report dashboard 1 91

7.4 AWS WAF report dashboard 2 91

7.5 K6 virtual users graph test 93

7.6 Front-end load test information 93

7.7 Back-end API system load test information 94

7.8 AWS WAF dashboard after load test 95

7.9 Grafana dashboard during load test 95

7.10 MongoDB Atlas dashboard during load test 96

7.11 Kubernetes scale out pods 97

7.12 AWS EKS scale out nodes 1 98

7.13 AWS EKS scale out nodes 2 98

7.14 AWS EKS scaled nodes are ready 98

7.15 Kubernetes scale in pods 98

7.16 AWS EKS scale in nodes 99

7.17 GitHub actions successfully built back-end images 99

7.18 ArgoCD successfully synced our Back-end service with GitHub repository 99

7.19 MongoDB Atlas cluster automatically performs backup daily 100

7.20 Kubecost suggestion for EKS cluster 103

14

Trang 15

The pervasive influence of technology has brought about significant changes in variousaspects of our lives, making it essential to incorporate it into mental health care With the in-creasing demand for quality mental health care services, access remains a pressing societalissue, and technology can play a crucial role in addressing these challenges

In the context of mental health care, the main problem addressed in this thesis is theinefficiency and lack of accessibility in the booking process for therapy appointments This issueaffects both patients seeking treatment and therapists managing their schedules, hindering theoverall efficacy of mental health care provision Furthermore, the lack of a centralized platformfor management and resource sharing presents additional barriers to the successful delivery ofmental health care services

The thesis aims to develop and evaluate a technology-driven solution, specifically a ing management application, to alleviate these concerns By streamlining the booking process,facilitating communication between patients and therapists, and providing valuable informationand resources, this app is designed to tackle the identified problems and improve the availabilityand quality of mental health care in our society

book-1.2 Goals and scope of the topic

The proposed solution is a cloud-based booking management application, utilizing AWScloud computing technology and MongoDB Atlas serverless advance, designed to address chal-lenges in mental health care accessibility and efficiency This app offers patients an intuitiveinterface to find and schedule appointments with therapists while providing therapists with ahigh-performance and scalable platform for managing their schedules

AWS cloud infrastructure ensures seamless scaling, high availability, and reliability, evenduring peak usage periods Additionally, the app fosters interaction between patients and thera-pists and provides valuable resources to enhance treatment experiences While MongoDB AtlasServerless is a new fully-managed, auto-scaling and serverless variant of the MongoDB Atlasdatabase It provides a fully-managed database service with the added benefit of auto-scalingresources on demand without any need for manual intervention

In summary, the AWS cloud-based booking management app presents an innovative tion to improve mental health care availability and quality in our society

Trang 16

solu-Ho Chi Minh City University of Technology

Faculty of Computer Science and Engineering

1.3 Thesis structure

In this thesis, we focus on analyzing the technologies being applied in practice today andprovide solutions and specific analysis from technical design angles

Chapter 1: An introduction about the topic and our goals

Chapter 2: A survey on existing system

Chapter 3: Analyze the system architecture

Chapter 4: Analyze the proposed solution with technical design for application

Chapter 5: UI design of our booking service

Chapter 6: Analyze the proposed solution with technical design for infrastructure anddeployment

Chapter 7: System evaluation and future plans

Chapter 8: Thesis conclusion and our workload distribution

Trang 17

de-2.1.1 Booking service in traditional computing

One of the example for tradition computing booking service is Britishairways.com ways.com is the official website of British Airways, the flag carrier airline of the United King-dom The website is built using a variety of technologies, including Jquery, a popular JavaScriptlibrary that simplifies web development and enhances user experience The website before relies

Britishair-on Britishair-on-premise servers, which are physical servers that are owned and managed by the companyitself, rather than cloud-based services This allows the company to have more control and se-curity over its data and operations The website offers various features and functionalities to itscustomers, such as booking flights, checking in online, managing bookings, accessing loyaltyprograms, and more

2.1.2 Booking psychotherapy service in Vietnam

Bookingcare.vn is a healthcare booking system in Vietnam that connects users to ity, effective, and reliable healthcare services The platform allows users to book appointmentswith doctors, find information about hospitals and clinics, and read reviews from other users.Bookingcare.vn also offers a variety of other services, such as online consultations, prescriptiondelivery, and medical transportation

qual-The healthcare booking system in Vietnam is still in its early stages of development, but

it has the potential to revolutionize the way that people access healthcare BookingCare is one

of the leading players in this space, and it is helping to make healthcare more accessible andaffordable for people all over Vietnam

Next, we compare and evaluate different services available for booking We analyze thestrengths and weaknesses, taking into consideration factors such as user experience, scalability,

Trang 18

Ho Chi Minh City University of Technology

Faculty of Computer Science and Engineering

security, and reliability This analysis will help us identify the gaps in the existing solutions andshowcase the need for a cloud-based approach

2.2.1 Booking service in traditional computing

British Airways, like many large organizations, has historically relied on on-premise frastructure for their IT systems On-premise infrastructure refers to the physical servers, net-working equipment, and data centers that are owned, managed, and maintained by the organi-zation itself

in-There are several reasons why organizations opt for on-premise infrastructure:

1 Data control: With on-premise infrastructure, organizations have complete control over

their data and can ensure its security and privacy within their own facilities

2 Compliance requirements: Some industries, such as aviation, have strict regulations and

compliance requirements regarding data storage and handling On-premise infrastructureallows organizations to maintain compliance more easily, as they have direct oversight oftheir systems

3 Legacy systems: Organizations that have been operating for a long time may have legacy

systems and applications that are not easily migratable to the cloud In such cases, taining on-premise infrastructure may be a practical solution until the systems can bemodernized

main-However, there are drawbacks to relying solely on on-premise infrastructure, which haveled many organizations, including some within the airline industry, to adopt cloud services:

1 Scalability: On-premise infrastructure often has limitations in terms of scalability

Scal-ing up or down typically requires additional investment in hardware and infrastructure,which can be time-consuming and expensive

2 Cost: Maintaining on-premise infrastructure involves significant upfront costs for

pur-chasing and maintaining hardware, as well as ongoing expenses for power, cooling, andmaintenance Cloud services, on the other hand, offer a pay-as-you-go model, allowingorganizations to scale their resources and only pay for what they use

3 Agility and Flexibility: Cloud services provide organizations with greater agility and

flexibility They can quickly provision resources, scale applications, and adapt to changingdemands without the need for extensive hardware procurement and setup

4 Disaster recovery and Resilience: Cloud services typically offer built-in disaster

re-covery capabilities, including data backups, redundancy, and failover mechanisms Thisensures business continuity and minimizes downtime in the event of hardware failures ornatural disasters

Trang 19

It’s worth noting that many organizations, including British Airways, have adopted a brid approach, combining both on-premise and cloud infrastructure This hybrid model allowsthem to leverage the benefits of the cloud while maintaining control over critical systems andcomplying with industry regulations.

hy-It’s important to recognize that the specific choices made by British Airways or any nization regarding on-premise vs cloud infrastructure may evolve over time based on techno-logical advancements, business requirements, and cost considerations

orga-Based on the reasons outlined above, it is evident that adopting a cloud-based architecture

is a beneficial approach for addressing the challenges identified in our thesis The drawbacks

of relying on on-premise infrastructure, such as limited scalability, higher costs, and the lack ofagility and flexibility, can be mitigated by leveraging cloud services

2.2.2 Booking psychotherapy service in Vietnam

• The platform offers a variety of features that make it easy for users to find the right doctor

or clinic, book an appointment, and manage their healthcare needs

• One of the most popular features of BookingCare is its appointment booking system.Users can easily search for doctors and clinics by specialty, location, and insurance cov-erage Once they have found a provider, they can book an appointment online or over thephone BookingCare also offers a variety of reminders and notifications to help users stay

on top of their appointments

• In addition to appointment booking, BookingCare also offers a variety of other features,including:

– Doctor reviews and ratings

– Healthcare news and articles

– A forum for users to ask questions and share information

– A chat feature for users to connect with customer support

BookingCare is a valuable resource for anyone looking for quality healthcare services

in Vietnam The platform’s features make it easy for users to find the right provider, book anappointment, and manage their healthcare needs

• Focus on user experience: BookingCare has a very user-friendly interface that makes iteasy for users to find the information they need and book an appointment We can learnfrom BookingCare’s example and focus on creating a webapp that is both easy to use andvisually appealing

• Offer a variety of features: BookingCare offers a variety of features that make it a stop shop for healthcare needs We can learn from BookingCare’s example and offer avariety of features that are relevant to our target audience

one-• Collect feedback from users: BookingCare regularly collects feedback from users to prove the platform We can learn from BookingCare’s example and collect feedback fromour users to ensure that we are meeting their needs

Trang 20

The second component of the system will be the database This component will be sponsible for storing all the data required by the system It will be used to store user data, such

re-as personal information, appointment schedules, and payment details The databre-ase will alsostore the data required for the web application to function correctly, such as videos’ hyperlink,doctors’ availability, and booking options

This chapter will provide a an overview of the proposed architecture, highlighting theroles and responsibilities of each component The chapter will also deliver the background andhow they contribute to our system

20

Trang 21

Figure 3.1: Overview of our system design.

3.2 Roles and functions of components in the system 3.2.1 NextJS

Next.js is a powerful and popular framework for building modern web applications It is

a React-based framework that brings server-side rendering, static site generation, and other vanced features to the React ecosystem Next.js combines the simplicity and flexibility of Reactwith the benefits of server-side rendering, providing developers with a seamless and efficientway to create high-performance web applications

ad-The introduction of Next.js revolutionized the way developers approach web development

It simplifies the process of building complex applications by providing a structured and itive framework With Next.js, developers can easily handle routing, data fetching, and statemanagement, allowing them to focus on building the core functionality of their applications

Trang 22

intu-Ho Chi Minh City University of Technology

Faculty of Computer Science and Engineering

One of the key features of Next.js is its support for server-side rendering (SSR) and staticsite generation (SSG) SSR allows for faster initial page loads and better search engine optimiza-tion (SEO) by rendering the pages on the server and sending the HTML content to the client.SSG, on the other hand, generates static HTML files at build time, enabling faster subsequentpage loads and improved performance [4]

Next.js also provides a powerful and extensible API for data fetching, allowing developers

to fetch data from various sources, including APIs and databases, and integrate it seamlessly intotheir applications It supports both client-side and server-side data fetching, giving developersflexibility in choosing the most efficient approach based on their specific needs

In addition to its core features, Next.js offers a wide range of plugins and extensions thatenhance its functionality It has built-in support for CSS and Sass, enabling developers to styletheir applications with ease It also supports TypeScript, providing strong typing and enhancedcode quality

3.2.2 ExpressJS

Express.js is a popular, battle-tested web application framework for Node.js, designed tosimplify the development of server-side applications It provides a robust set of features and aminimalist approach, making it an excellent choice for modern backend development [7] In thissection, we will explore the advantages of using Express.js in the context of contemporary webdevelopment

• Ease of Use and Minimalistic Design: Express.js offers a lightweight framework that

al-lows developers to build web applications quickly and efficiently Its intuitive and forward API makes it easy to understand and work with, reducing the learning curve fordevelopers With Express.js, developers can focus on writing clean and concise code with-out being overwhelmed by unnecessary complexity

straight-• Flexibility and Modularity: Express.js provides a high degree of flexibility and

mod-ularity, allowing developers to customize their applications according to their specificrequirements It follows a middleware-based architecture, where developers can easilyplug in various middleware functions to handle different aspects of the application, such

as request processing, authentication, logging, and error handling This modular approachpromotes code reusability and makes it easier to maintain and extend the application overtime

• Rich Ecosystem and Community Support: Express.js benefits from a vibrant and active

community of developers, which has contributed to a rich ecosystem of third-party ules and extensions This vast ecosystem provides a wide range of ready-to-use middle-ware, plugins, and tools that can significantly accelerate the development process Fromdatabase integration and session management to API documentation and testing frame-works, developers can leverage the community-driven resources to enhance the function-ality and efficiency of their Express.js applications

mod-• Scalability and Performance: Express.js is known for its excellent performance and

scalability It is built on top of Node.js, which utilizes a non-blocking, event-driven tecture This allows Express.js to handle a large number of concurrent requests efficiently,

Trang 23

archi-making it suitable for applications with high traffic loads Additionally, Express.js vides features like clustering, which allows developers to scale their applications acrossmultiple CPU cores, further improving performance and ensuring the application canhandle increased user demand.

pro-• Integration and Compatibility: Express.js seamlessly integrates with various libraries

and frameworks, making it a versatile choice for backend development It can be combinedwith templating engines like EJS or Pug to generate dynamic HTML pages, or integratedwith front-end frameworks like React or Angular to build modern, single-page applica-tions Furthermore, Express.js can work with different databases, such as MongoDB orMySQL, providing flexibility in data storage options This compatibility and integrationcapability make Express.js a powerful tool for building complex web applications

In the world of modern web development, data storage is a crucial aspect of any tion MongoDB, a popular NoSQL database, offers a powerful and flexible solution for storingand managing data In this section, we will explore the advantages of using MongoDB andunderstand why we decided it as our data storage

applica-• Flexible Data Modeling: One of the key advantages of MongoDB is its flexible data

modeling capabilities Unlike traditional SQL databases, MongoDB stores data in a ible, document-based format, allowing for dynamic and agile schema design This makes

flex-it easy to add or modify fields as needed, wflex-ithout requiring complex migrations or time

down-• Scalability and Performance: MongoDB is designed to be highly scalable and

perfor-mant, making it suitable for applications with high traffic loads It utilizes a distributedarchitecture, where data is spread across multiple servers, allowing for horizontal scaling

as the application grows Additionally, MongoDB’s document-oriented data model vides fast and efficient data retrieval, making it an excellent choice for applications thatrequire rapid access to data

pro-• Agile Development: MongoDB’s flexible schema and document-oriented model make it

easier to map data objects directly to application code This alignment facilitates faster velopment cycles, as changes to the data model can be accommodated without significantadjustments to the application logic

de-• Rich Query Language and Indexing: MongoDB’s query language is rich and

power-ful, offering a wide range of operators and functions for filtering, sorting, and ing data Additionally, MongoDB supports indexing, which enables faster query execu-tion and improved performance With indexing, developers can create indexes on specificfields or combinations of fields, allowing for faster retrieval of frequently accessed data

aggregat-• High Availability and Fault Tolerance: MongoDB is designed to be highly available

and fault-tolerant, ensuring that data is always accessible even in the event of hardware

Trang 24

Ho Chi Minh City University of Technology

Faculty of Computer Science and Engineering

or network failures It achieves this through features like replica sets, which automaticallyreplicate data across multiple servers, and sharding, which distributes data across multipleshards for increased fault tolerance and availability

• Integration and Compatibility: MongoDB integrates with various programming

guages, making it a versatile choice for data storage It offers drivers for popular guages like Python, Java, and JavaScript, and provides a wide range of client libraries andframeworks for different development environments Additionally, MongoDB integrateswith other tools and platforms, such as Apache Spark and Hadoop, for data processingand analysis

lan-MongoDB offers numerous advantages for modern data storage Its flexible data eling, scalability, and performance make it an ideal choice for applications that require agileschema design and high availability[14] The rich query language and indexing capabilitiesprovide developers with powerful tools for managing and retrieving data efficiently With itscompatibility and integration capabilities, MongoDB is a versatile and valuable tool for modernweb development

One of the key advantages of Amazon S3 is its durability and high availability The service

is designed to provide 99.999999999% (11 nines) durability, ensuring that data is protectedagainst hardware failures, errors, and even natural disasters [10] S3 automatically replicatesdata across multiple availability zones within a region, providing redundancy and ensuring dataavailability even in the event of a localized outage

Another notable feature of Amazon S3 is its accessibility and versatility It provides a ple and intuitive web-based interface as well as a comprehensive set of APIs, enabling seamlessintegration with other AWS services and third-party applications Developers can easily inte-grate S3 into their applications to store and retrieve data, whether it’s static files, media assets,backups, log files, or any other type of content

sim-Amazon S3 offers robust security features to protect data at rest and in transit It supportsencryption at rest using industry-standard algorithms and provides options for server-side en-cryption and client-side encryption Additionally, S3 offers fine-grained access control throughbucket policies and Access Control Lists (ACLs), allowing organizations to control who canaccess their data and how it can be accessed

Trang 25

Overall, Amazon S3 is a powerful and reliable cloud storage service that provides nesses with secure, scalable, and cost-effective storage solutions Its durability, availability, ac-cessibility, and security features make it a suitable choice for our application when it’s storingstatic assets for our application such as images, and videos for users to customize their profile.

busi-3.2.5 Kubernetes

Kubernetes, often referred to as K8s, is an open-source container orchestration platformthat automates the deployment, scaling, and management of containerized applications It wasoriginally developed by Google and is now maintained by the Cloud Native Computing Foun-dation (CNCF) Kubernetes provides a robust and scalable framework for managing and coor-dinating containers across a cluster of servers [11]

The rise of containerization has revolutionized the way applications are developed anddeployed Containers allow for the efficient packaging of applications and their dependencies,ensuring consistency across different environments However, managing and scaling a largenumber of containers manually can be complex and time-consuming This is where Kubernetescomes in

Kubernetes comes with the concept of a cluster, which is a set of nodes that run ized applications Each node is a physical or virtual machine that hosts one or more containers.Kubernetes abstracts away the underlying infrastructure and provides a unified interface to man-age and orchestrate containers across the cluster Some key features of Kubernetes include:

container-• Automatic scaling:

Kubernetes can automatically scale applications based on predefined rules or metrics,ensuring that resources are allocated efficiently and applications can handle varying levels

of traffic

• Service discovery and load balancing:

Kubernetes provides a built-in service discovery mechanism, allowing applications toeasily discover and communicate with each other It also includes a load balancing feature

to distribute traffic across multiple instances of an application

• Self-healing:

Kubernetes monitors the health of applications and can automatically restart or replacecontainers that fail It ensures that the desired state of the application is maintained, even

in the presence of failures

• Rolling updates and rollback:

Kubernetes supports seamless updates of applications, allowing us to deploy new versionswithout any downtime If an issue arises, we can easily roll back to a previous version

• Configuration management:

Kubernetes allows us to manage application configurations separately from the tion code This enables us to easily update configurations without modifying the underly-ing containers

Trang 26

applica-Ho Chi Minh City University of Technology

Faculty of Computer Science and Engineering

Moreover, the Kubernetes ecosystem is diverse and extensive, offering a wide range ofadd-ons and extensions to enhance and complement the core functionality of the platform.These add-ons cover various aspects such as networking, monitoring, logging, security, stor-age, and more Some notable add-ons include ingress controllers for managing inbound traffic,service mesh technologies for advanced networking capabilities, logging and monitoring solu-tions for observability, authentication and authorization tools for security, CI/CD integration forstreamlined deployments, and security tools for runtime protection These add-ons extend thecapabilities of Kubernetes, enabling users to build scalable, resilient, and secure containerizedenvironments

Figure 3.2: Kubernetes ecosystem [6]

By leveraging the diverse ecosystem, our application can customize the Kubernetes ployments to meet our specific requirements such as integration with cloud provider, secretsmanagement and monitoring Therefore, it helps optimize our application development andmanagement processes

de-3.2.6 Additional technology

3.2.6.1 Content Delivery Networks (CDN)

In today’s digital world, where speed and performance are paramount, Content DeliveryNetworks (CDNs) have become an integral part of web infrastructure A CDN is a globallydistributed network of servers strategically placed at various locations around the world Itspurpose is to deliver web content, such as images, videos, CSS files, and JavaScript libraries, tousers with optimal speed and efficiency

Trang 27

The concept behind CDNs is simple yet powerful Instead of relying on a single originserver to handle all user requests, a CDN leverages its network of edge servers to cache and servecontent from locations closest to the end users This reduces latency and network congestion,resulting in faster page load times and a smoother user experience.

CDNs offer several benefits to website owners and content providers First and foremost,they improve website performance by reducing the time it takes to retrieve and deliver content.This is particularly important for websites with a global audience, as CDNs ensure that content

is delivered from servers geographically closer to the users, minimizing latency

Furthermore, CDNs enhance the scalability and reliability of web applications By tributing content across multiple edge servers, CDNs can handle high traffic volumes and mit-igate the impact of sudden traffic spikes They also provide redundancy and failover mecha-nisms, ensuring that content remains accessible even in the event of server failures or networkdisruptions

dis-Security is another key advantage of CDNs Many CDNs offer built-in security features,such as DDoS protection, SSL/TLS encryption, and web application firewalls, to safeguardagainst cyber threats and ensure data integrity [15]

In addition to these core benefits, CDNs often provide advanced features and tions These may include image and video optimization, dynamic content caching, mobile de-vice detection, and intelligent routing algorithms, all aimed at further improving performanceand user experience

optimiza-Leading CDN providers, such as Cloudflare, Akamai, and Amazon CloudFront, offercomprehensive solutions that integrate seamlessly with existing web infrastructure They pro-vide easy-to-use interfaces, robust APIs, and powerful analytics tools to help monitor and opti-mize content delivery

Overall, CDNs play a crucial role in enhancing the performance, scalability, reliability,and security of web applications Their global presence, caching capabilities, and network op-timizations ensure that content is delivered efficiently to users worldwide By leveraging thepower of CDNs, businesses can provide fast and reliable digital experiences, delighting theirusers and gaining a competitive edge in the online landscape

3.2.6.2 Load balancer

In the modern era of web applications and services, where scalability, availability, andperformance are paramount, Load balancers have become a vital component of the infrastruc-ture A Load balancer is a critical piece of technology that distributes incoming network trafficacross multiple servers or resources to ensure efficient utilization and optimized performance.The main purpose of a Load balancer is to evenly distribute traffic among multiple servers,also known as backend resources or nodes, to prevent any single server from being overwhelmedwith requests By intelligently distributing the workload, Load balancers help achieve high avail-ability and reliability by ensuring that no single server becomes a single point of failure [17].Load balancers operate at the network or application layer, and they can handle varioustypes of traffic, including HTTP, HTTPS, TCP, and UDP They can perform various load balanc-ing algorithms, such as round-robin, least connections, and IP hash, to distribute traffic based

on predefined rules or metrics

Trang 28

Ho Chi Minh City University of Technology

Faculty of Computer Science and Engineering

The benefits of using Load balancers are manifold Firstly, they improve the scalability

of applications by seamlessly scaling resources up or down based on demand Load balancerscan automatically add or remove backend resources as needed, enabling applications to handleincreased traffic without any disruption

Secondly, Load balancers enhance the availability and fault tolerance of applications Inthe event of a server failure, the Load balancer intelligently redirects traffic to the remaininghealthy servers, ensuring that the application remains accessible and responsive to users.Load balancers also contribute to improved performance by intelligently routing traffic

to the server with the optimal capacity and proximity to the user This helps reduce latency,increase response times, and deliver a seamless user experience even during peak traffic periods.Moreover, Load balancers offer advanced features such as session persistence, SSL ter-mination, and health monitoring Session persistence ensures that user sessions are maintainedwith the same backend server for the duration of the session, which is crucial for stateful ap-plications SSL termination offloads the SSL encryption and decryption process from the back-end servers, enhancing their performance Health monitoring continuously checks the health ofbackend resources and automatically removes any unhealthy servers from the load balancingpool

Leading cloud service providers, such as Amazon Web Services (AWS), Google CloudPlatform (GCP), and Microsoft Azure, offer Load balancer services with robust features andscalability options These services integrate seamlessly with other cloud services and providedetailed monitoring and management capabilities

In conclusion, Load balancers play a vital role in ensuring the availability, scalability,and optimal performance of web applications and services By distributing traffic across mul-tiple servers and intelligently managing workloads, Load balancers contribute to a reliable andefficient infrastructure, providing a seamless user experience even in high-demand scenarios

The significance of firewalls in maintaining a secure network environment cannot be stated They act as a first line of defense, preventing unauthorized access attempts and filtering

Trang 29

over-out potentially malicious traffic By allowing only legitimate and authorized communication,firewalls help mitigate the risk of data breaches, network intrusions, and other cyber threats.

Trang 30

Chapter 4

Application design

4.1.1 Functional Requirement

• User Registration and Authentication

– The system should provide a user registration process for both therapists and clients – Users should be able to authenticate themselves securely through login credentials.

• User Profiles

– Each user should have a profile to manage their personal information, including

name, contact details, and preferred communication channels

– Therapists’ profiles should include additional information such as qualifications,

areas of expertise, and availability

• Search and Filtering

– The portal should allow clients to search for therapists based on criteria such as

location, specialization, availability, and session format (in-person, video call, etc.)

– The search results should provide relevant information about therapists, including

their profiles, credentials, and user reviews

• Appointment Scheduling

– The system should enable clients to view therapists’ availability and book

appoint-ments based on their preferred time slots

– The portal should send confirmation notifications to both the client and the therapist

once an appointment is scheduled

– In case of any changes or cancellations, the system should provide an interface to

reschedule or cancel appointments, sending appropriate notifications to affected ties

Trang 31

– Clients should be able to provide feedback and ratings for therapists based on their

experience

– The system should display therapists’ average ratings and reviews to help clients

make informed decisions

• Admin Reporting and Analytics

– The portal should generate reports and analytics for therapists and administrators,

providing insights into key metrics such as client bookings, revenue, and user ity

activ-– Therapists should have access to their own performance metrics to track their

prac-tice’s growth and identify areas for improvement

4.1.2 Non-Functional Requirement

Performance: The system should provide a responsive and efficient user experience, with

under 1 second for response time in loading pages and all functionalities, even during peak usageperiods

Scalability: The system should be able to handle a growing number of users, therapists,

and appointments without compromising performance or functionality It should scale tally by adding more servers or cloud resources as needed

horizon-Reliability: The system should be highly reliable, enduring system interruptions and an

outage of a data center where the service is hosted It should have backup and disaster recoverymechanisms in place to protect against data loss or system failures

Security: The system should implement robust security measures to protect user data,

including encryption of sensitive information, secure transmission of data over networks, andaccess control mechanisms to prevent unauthorized access

Usability: The user interface should be intuitive, user-friendly, and accessible to users

with different levels of technical expertise It should adhere to web accessibility standards, lowing users with disabilities to access and navigate the portal effectively

al-Compatibility: The system should be compatible with a wide range of devices, browsers,

and operating systems to ensure that users can access the portal from various platforms withoutany compatibility issues

Maintainability: The system should be designed and developed using modular and

main-tainable code, allowing for easy enhancements, bug fixes, and system updates It should alsohave proper documentation to aid in system maintenance

Localization: The system should support multiple languages and locales to cater to users

from different regions and facilitate seamless communication between therapists and clientswith diverse language preferences

Integration: The system should be able to integrate with external systems or services,

such as calendar applications, electronic medical record (EMR) systems, or payment gateways,

to enhance functionality and streamline workflows

Trang 32

Ho Chi Minh City University of Technology

Faculty of Computer Science and Engineering

4.2.1 System Overview

Figure 4.1: System Overview Use Case Diagram

Trang 34

Ho Chi Minh City University of Technology

Faculty of Computer Science and Engineering

4.2.4 Booking

Figure 4.4: Booking Use Case Diagram

Trang 35

Use Case Name Login

Description This use case allows users to authenticate and log in to the system

Actors User

Preconditions The user must have a registered account in the system

Postconditions The user is successfully logged into the system

Main Flow 1 The user launches the application

2 The application presents the login screen

3 The user enters their credentials (username and password)

4 The system verifies the credentials

5 If the credentials are valid, the system logs in the user

6 The system redirects the user to the home page

7 The use case ends

Trang 36

Ho Chi Minh City University of Technology

Faculty of Computer Science and Engineering

2 The user is prompted to re-enter the credentials

3 The flow continues from step 3 in the main flow

4b Forgot Password 1 If the user forgets their password, they can click on the "Forgot

Password" link

2 The system presents a password recovery form

3 The user enters their registered email address

4 The system verifies the email address and sends a passwordreset link to the user’s email

5 The user receives the email and clicks on the password resetlink

6 The system redirects the user to a password reset page

7 The user enters a new password

8 The system updates the password and logs in the user

9 The system redirects the user to the home page

10 The use case ends

2a Google Login 1 Instead of entering credentials manually, the user can choose

the "Login with Google" option

2 The system redirects the user to the Google login page

3 The user enters their Google credentials and grants permission

to the application

4 The system verifies the Google credentials

5 If the credentials are valid, the system logs in the user

6 The system redirects the user to the home page

7 The use case ends

Table 4.1: Use Case Detail: Login

4.3.2 Search

Use Case ID 2

Use Case Name Search for Psychiatrist

Description This use case involves searching for a psychiatrist based on their

name, specialty, or location

Trang 37

Normal Flow 1 User initiates the search for a psychiatrist.

2 User provides the search criteria, such as name, specialty, orlocation

3 The system validates the search criteria

4 The system retrieves a list of psychiatrists matching the searchcriteria

5 The system displays the list of matching psychiatrists to theuser

6 User can view detailed information about a specific psychiatristfrom the list

7 User can choose to contact or make an appointment with aspecific psychiatrist

Alternative Flows

3a If the search criteria are invalid or incomplete, the systemdisplays an error message and prompts the user to provide validcriteria

6a If the user does not find a suitable psychiatrist, the systemprovides suggestions or alternative search criteria

Exceptions None

Special

Requirements

- The search can support partial matches for the name or specialty

to broaden the search results

- The system should have an up-to-date database of psychiatristswith their relevant information

Notes - The search functionality can be implemented using a database

query or search engine integration

- The system may provide additional filters or sorting options torefine the search results

Table 4.2: Use Case Detail: Search for Psychiatrist

4.3.3 Booking

Use Case ID 3

Use Case Book Appointment

Actors Patient, Psychiatrist

Precondition None

Postcondition Appointment is booked and notifications are sent

Main Flow 1 Patient displays available time slots

2 Patient chooses an available time

3 UI requests to book appointment

4 Backend creates an event with pending status

5 UI displays pending appointment notification

Trang 38

Ho Chi Minh City University of Technology

Faculty of Computer Science and Engineering

Alternative Flows a Psychiatrist accepts appointment

1 Psychiatrist accepts appointment

2 UI notifies the acceptance

3 Backend updates the status to accepted

4 Backend creates an event in Google Calendar

5 Backend generates a Google Meet link

6 Backend sends an email with the Meet link

7 Backend schedules a post-meeting email job

b Psychiatrist cancels appointment

1 Psychiatrist cancels appointment

2 UI notifies the cancellation

3 Backend updates the status to canceled

4 Backend deletes the event from Google Calendar

5 Backend cancels the confirmation email job

Exception Flows None

Other

Non-Functional

Requirements

- Google Calendar integration

- Email service integration

- Cron job schedulingTable 4.3: Use Case Detail: Book Appointment

Use Case ID 4

Use Case Send post-meeting confirmation email

Actors Backend, Email Service, Cron

Precondition Appointment is completed

Postcondition Confirmation email with review link is sent

Main Flow 1 Backend sends a post-meeting confirmation email

2 Backend sends an email with confirmation and review link

Alternative Flows None

Exception Flows None

Subflows None

Other

Non-Functional

Requirements

- Email service integration

- Cron job schedulingTable 4.4: Use Case Detail: Send post-meeting confirmation email

Trang 39

4.3.4 Admin

Use Case ID 5

Use Case Name View/Edit appointment and user information

Actors Admin

Precondition Admin is logged in and has appropriate permissions

Postcondition Appointment and user data are viewed/edited successfully

Main Flow 1 Admin selects the "Appointments" option in the admin panel

2 System displays a list of appointments

3 Admin selects a specific appointment

4 System displays detailed information about the appointment,including user details and scheduled time

5 Admin can edit the appointment details or update the userinformation if necessary

6 Admin saves the changes

Alternative Flows 1a.Admin selects the "Users" option in the admin panel

1b Admin selects a specific user

1c System displays detailed information about the user

1d Admin can edit the user information if necessary

1e Admin saves the changes

Exception Flows 4a If the appointment does not exist, the system displays an error

When it comes to NoSQL databases like MongoDB, one of the key features is the ability

to handle dynamic schemas Unlike traditional relational databases that enforce a fixed schema,MongoDB allows for flexible and dynamic schema designs, which can be advantageous in ourthesis Therefore, it provides the agility for us to develop and delivery our product Below is ourphysical design with each tables representing our entities

• Users: The "users" entity represents individuals who interact with the platform Users can

be both psychiatrists and patients

Trang 40

Ho Chi Minh City University of Technology

Faculty of Computer Science and Engineering

• Specialty: The "specialty" entity encompasses different areas of expertise offered by chiatrists on the platform This entity establishes a one-to-many relationship with theusers, as multiple psychiatrists can offer the same specialty

psy-• Working Hours: The "WorkingHour" entity represents the availability of service providers.Thisentity establishes a one-to-many relationship with the users (psychiatrists) since each doc-tor can have multiple working hours for different days

• Bookings: The "booking" entity captures the appointments made by patients with atrists This entity establishes a many-to-one relationship with both the users, as multiplebookings can be associated with a single user or provider Additional, this entity estab-lishes a one-to-one relationship with working hours and reviews, as each booking is madewith only one specific time and can have a feedback from the patient

psychi-• Reviews: The "review" entity allows users to provide feedback on their meetings with aspecific psychiatrist This entity also establishes a one-to-one relationship with the book-ing since a review can be associated with a booking made by a patient

Figure 4.6: Database design

Ngày đăng: 15/10/2025, 20:05

Nguồn tham khảo

Tài liệu tham khảo Loại Chi tiết
[1] AWS Global Infrastrcuture. Amazon Web Services, Inc. aws . amazon . com / about - aws/global-infrastructure/. Accessed 13 May 2023 Sách, tạp chí
Tiêu đề: AWS Global Infrastructure
Tác giả: Amazon Web Services, Inc
Nhà XB: Amazon Web Services, Inc.
[2] AWS global infrastructure. Amazon Web Services, Inc. https://www.amazonaws.cn/en/about-aws/. Accessed 04 June 2023 Sách, tạp chí
Tiêu đề: AWS global infrastructure
Tác giả: Amazon Web Services, Inc
Nhà XB: Amazon Web Services, Inc.
[3] Maciek’s blog. IAM roles for Kubernetes service accounts - deep dive. Maciek’s blog.https://mjarosie.github.io/dev/2021/09/15/iam-roles-for-kubernetes-service-accounts-deep-dive.html. Accessed 14 May 2023 Sách, tạp chí
Tiêu đề: IAM roles for Kubernetes service accounts - deep dive
Tác giả: Maciek
Nhà XB: Maciek’s blog
Năm: 2021
[4] Docs | Next.js. Next.js https://nextjs.org/docs. Accessed 13 May 2023 Sách, tạp chí
Tiêu đề: Docs | Next.js
Năm: 2023
[5] Economics: EC2. Amazon Web Services, Inc. Amazon,aws.amazon.com/ec2/spot/getting-started/. Accessed 13 May 2023 Sách, tạp chí
Tiêu đề: Economics: EC2
Nhà XB: Amazon Web Services, Inc.
[6] Seyi Ewegbemi. Kubernetes as a Container Orchestration Tool. Kubermatic. https : //www.kubermatic.com/blog/kubernetes- as- a- container- orchestration- tool/. Accessed 04 June 2023 Sách, tạp chí
Tiêu đề: Kubernetes as a Container Orchestration Tool
Tác giả: Seyi Ewegbemi
Nhà XB: Kubermatic
[7] Express - Node.js web application framework. https://expressjs.com/. Accessed 13 May 2023 Sách, tạp chí
Tiêu đề: Express - Node.js web application framework
[8] Gartner Forecasting. Gartner https : / / www . gartner . com / en / newsroom / press - releases/2022- 10- 31- gartner- forecasts- worldwide- public- cloud- end- user - spending - to - reach - nearly - 600 - billion - in - 2023. Accessed 13 May 2023 Sách, tạp chí
Tiêu đề: Gartner forecasts worldwide public cloud end-user spending to reach nearly $600 billion in 2023
Tác giả: Gartner
Nhà XB: Gartner
Năm: 2022
[9] Google Lighthouse. Google, Inc. https://developer.chrome.com/docs/lighthouse/overview/. Accessed 14 May 2023 Sách, tạp chí
Tiêu đề: Google Lighthouse
Tác giả: Google Lighthouse
Nhà XB: Google, Inc.
[10] Object Storage Classes - Amazon S3. Amazon Web Services, Inc. https : / / aws . amazon.com/s3/storage-classes/. Accessed 13 May 2023 Sách, tạp chí
Tiêu đề: Object Storage Classes - Amazon S3
Nhà XB: Amazon Web Services, Inc.
[11] Production-Grade Container Orchestration. Kubernetes. https://kubernetes.io/.Accessed 13 May 2023 Sách, tạp chí
Tiêu đề: Production-Grade Container Orchestration
Nhà XB: Kubernetes
[12] Shared responsibility model. Amazon Web Services, Inc. aws.amazon.com/compliance/shared-responsibility-model/. Accessed 13 May 2023 Sách, tạp chí
Tiêu đề: Shared responsibility model
Nhà XB: Amazon Web Services, Inc.
[13] Terraform architecture and workflow. Spacelift. https : / / spacelift . io / blog / terraform-architecture. Accessed 04 June 2023 Sách, tạp chí
Tiêu đề: Terraform architecture and workflow
Nhà XB: Spacelift
[14] Welcome to the MongoDB Documentation. MongoDB Documentation https://www.mongodb.com/docs/. Accessed 13 May 2023 Sách, tạp chí
Tiêu đề: Welcome to the MongoDB Documentation
Nhà XB: MongoDB Documentation
[15] What is a content delivery network (CDN)? | how do Cdns work? - cloudflare. CDN.https : / / www . cloudflare . com / learning / cdn / what - is - a - cdn/. Accessed 14 May 2023 Sách, tạp chí
Tiêu đề: What is a content delivery network (CDN)
Tác giả: Cloudflare
Nhà XB: Cloudflare
[16] What Is a Firewall? Palo Alto Networks https : / / www . paloaltonetworks . com / cyberpedia/what-is-a-firewall. Accessed 14 May 2023 Sách, tạp chí
Tiêu đề: What Is a Firewall
Nhà XB: Palo Alto Networks

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm