Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 37

SOFTWARE ARCHITECTURE & DESIGN

CMU-SE 403 SAIS


Craft Village Pollution Monitor
Architecture Design
Version 1.2
Date: Jul 17th, 2022

MENTOR: Duc, Nguyen Manh MSc.


TEAM: Envir Team
TEAM MEMBERS: Ca, Van Cong Le
Huy, Bui Duc
Phuc, Hua Hoang
Trung, Nguyen Thanh
[Craft Village Pollution Monitor] – Architecture Design

PROJECT INFORMATION

Project Title Craft Village Pollution Monitor

Project Acronym CVPM

Start Date Jul 09, 2022 End Date Jul 31, 2022

Lead Institution International School, Duy Tan University


Duc, Nguyen Manh MSc.
Project Mentor &
Email: ducnm@duytan.edu.vn
contact details
Tel: 0905159359

Name Email Tel

Ca, Van Cong Le cascabusiness@gmail.com 0352707895

Team members Huy, Bui Duc duchuyltt122@gmail.com 0818648090

Phuc, Hua Hoang

Trung, Nguyen Thanh

Envir Team | 2
[Craft Village Pollution Monitor] – Architecture Design

DOCUMENT NAME

Document Title Architecture Design

Author(s) Envir Team

Date Jul 09, 2022 File name: CraftVillagePollutionMonitor_Architec


tureDesign_ver1.1.docx

REVISION HISTORY
Version Person(s) Date Description

1.0 Huy, Bui Duc 09-Jul-2022


Ca, Van Cong Le Create Architecture design
Phuc, Hua Hoang document
Trung, Nguyen Thanh

1.1 Huy, Bui Duc 17-Jul-2022


Ca, Van Cong Le Update Architecture design
Phuc, Hua Hoang document
Trung, Nguyen Thanh

1.2 Huy, Bui Duc 24-Jul-2022


Ca, Van Cong Le Update Architecture design
Phuc, Hua Hoang document
Trung, Nguyen Thanh

Envir Team | 3
[Craft Village Pollution Monitor] – Architecture Design

DOCUMENT APPROVAL
The following signatures are required for approval of this document

Signature:
Mentor Duc, Nguyen Manh MSc.
Date:

Signature:
Scrum Master Ca, Van Cong Le
Date:

Signature:
Product Owner Huy, Bui Duc
Date:

Signature:
Phuc, Hua Hoang
Date:
Team Member
Signature:
Trung, Nguyen Thanh
Date:

Envir Team | 4
[Craft Village Pollution Monitor] – Architecture Design

Table of Contents
1 Introduction.................................................................................................................7
1.1 Purpose.............................................................................................................................7
1.2 Documents Referenced...................................................................................................7

2 Project Statement........................................................................................................7
2.1 Project Overview.............................................................................................................7
2.2 Business Driver................................................................................................................7
2.2.1 Business Problems 7
2.2.2 Business Need 8
2.3 Project Goals....................................................................................................................8

3 Architecture Drivers...................................................................................................8
3.1 High-Level Requirements...............................................................................................8
3.2 System Context................................................................................................................9
3.3 Architecture Driver Specification................................................................................13
3.4 Use Case Diagram.........................................................................................................33
3.5 Quality Attributes.........................................................................................................33

4 Constraints................................................................................................................35
4.1 Business Constraint.......................................................................................................35
4.2 Technical Constraint.....................................................................................................36

5 High level architecture.............................................................................................37


5.1 Component and Connector view (C&C view)............................................................37
5.2 Module view.....................................................................................................................1
5.3 Allocation view................................................................................................................2

Envir Team | 5
[Craft Village Pollution Monitor] – Architecture Design

Table of Tables
Table 1 Document Reference..............................................................................................7
Table 2 Development team.................................................................................................7

Table of Figures
Figure 1 System Context Diagram Overview.....................................................................9
Figure 2 Personal System Context Diagram.....................................................................10
Figure 3 Household System Context Diagram.................................................................11
Figure 4 Authority System Context Diagram...................................................................12
Figure 5 Use Case Diagram..............................................................................................33
Figure 6 Component & connector view (Personal)..........................................................37
Figure 7 Component & connector view (Household).......................................................38
Figure 8 Component & connector view (Authority)........................................................39
Figure 9 Module view.........................................................................................................1
Figure 10 Allocation view..................................................................................................2

Envir Team | 6
[Craft Village Pollution Monitor] – Architecture Design

1 Introduction
1.1 Purpose
This specification covers following:
 Brief specification of the project, high level requirement, system context for
the system.
 Use case diagram, detail quality attribution.
 Architecture presented by various architecture view types: C4 Model,
Component and Connector view, Module view, Allocation view.
1.2 Documents Referenced

No Reference

1 [CVPM]_Product_Backlog_ver1.2

2 [CVPM]_Project_Plan_ver1.2

Table 1 Document Reference


2 Project Statement
2.1 Project Overview
Project name: Craft Village Pollution Monitor
Development team:

Full name Position

Ca, Van Cong Le Scrum Master

Huy, Bui Duc Product Owner

Phuc, Hua Hoang Scrum Member

Trung, Nguyen Thanh Scrum Member

Table 2 Development team


2.2 Business Driver
2.2.1 Business Problems
Vietnam has more than five thousand craft villages around the country, the
pollution from these villages is becoming a huge problem throughout the years. In 2017-

Envir Team | 7
[Craft Village Pollution Monitor] – Architecture Design

2020, Hanoi, a city with 1350 craft villages had conducted research on 292 craft villages,
139 out of 292 have serious water pollution (accounting for 47.6%), 95 polluted craft
villages (accounting for 32.5%), and only 58 unpolluted craft villages (accounting for
19.9%); the rate of wastewater from craft villages collected and treated only accounts for
about 5.2%.
In addition, solid waste in some craft villages has not been classified for reuse but
is transported to landfills. In particular, there is still the phenomenon of people in craft
villages dumping or arbitrarily burning waste that polluting the environment.
2.2.2 Business Need
 Desiring to help people have more awareness of pollution from craft villages, a
system that will allow people to submit data of craft village and keep track its
pollution status.
 A system that will provide the user the abilities such as take a survey, include the
image of the pollution, view survey history, etc.
 An AI system will also provide the application to analyze the pollution based on
the user's provided image.
 The system should also give the administrator the ability to manage their user and
data.
2.3 Project Goals
The goal of the project is to build a craft village pollution monitoring (CVPM)
within the budget of $5000 and deliver on time by the end of July of 2022.
3 Architecture Drivers
3.1 High-Level Requirements
Refer to [CVPM]_Product_Backlog_Ver1.2

Envir Team | 8
[Craft Village Pollution Monitor] – Architecture Design

3.2 System Context

Figure 1 System Context Diagram Overview

Envir Team | 9
[Craft Village Pollution Monitor] – Architecture Design

Figure 2 Personal System Context Diagram

Envir Team | 10
[Craft Village Pollution Monitor] – Architecture Design

Figure 3 Household System Context Diagram

Envir Team | 11
[Craft Village Pollution Monitor] – Architecture Design

Figure 4 Authority System Context Diagram


System context description:
 The personal user, they can:

Envir Team | 12
[Craft Village Pollution Monitor] – Architecture Design

- Create a new survey;


- View pervious survey;
- Continue unfinished survey;
- Create a new account using their personal phone number;
 The household, they can:
- Submit their production information;
- View pervious submission
- Update their production information
- Create a new account using their personal email;
 The authority, they can:
- View craft village’s data (village production information, pollution status, etc);
- Give an approval for new household account.
3.3 Architecture Driver Specification
Use Case Entities
ID E01
Title Personal
Personal user is the person who use the system to conduct the
Description survey by using the mobile application to take the photo of the
pollution.
Provides
Provide the abilities to conduct the pollution survey.
Assumptions
Requires
Connect the internet
Assumptions
Identified Use
UC01, UC02, UC03, UC04, UC05, UC06, UC07, UC08
Cases

ID E02
Title Household
User is a person who using the system to submit their production
Description
information.

Envir Team | 13
[Craft Village Pollution Monitor] – Architecture Design

Provides
Provide the abilities to submit their production information.
Assumptions
Requires
Connect the internet
Assumptions
Identified Use
UC03, UC04, UC05, UC09
Cases

ID E03
Title Authority
Authority is the person who use the system to monitor craft village
Description
data (production information, pollution status, etc)
Provides
Provide craft village’s information
Assumptions
Requires
Connect the internet
Assumptions
Identified Use
UC10, UC11
Cases

Envir Team | 14
[Craft Village Pollution Monitor] – Architecture Design

Operational Use Cases

Use case ID UC01

Use case name Create New Pollution Survey

Create by Van Cong Le Ca Last updated by Nguyen Thanh Trung

Date created July 09, 2022 Date last updated July 09, 2022

Entities
E01
Involve

This use case allows the user to create pollution survey through the
Description
mobile application.

Trigger Click on “New Survey” button at home page.

Pre-condition User logged into the system successfully and currently at home page.

Post-condition System will redirect to survey page.

Step Actor Action System Response

Main Success
Scenario System will open camera
Click on “New Survey”
1 that allows the user to take
button at home page.
picture.

Step Actor Action System Response

Alternative
Scenario
N/A

Exceptions Step Actor Action System Response

Envir Team | 15
[Craft Village Pollution Monitor] – Architecture Design

N/A

Priority High

Business rule N/A

Use case ID UC02

Use case name Take Pollution Photo

Create by Van Cong Le Ca Last updated by Nguyen Thanh Trung

Date created July 09, 2022 Date last updated July 09, 2022

Entities
E01
Involve

This use case allows the user to take pollution photo through the
Description
mobile application.

Trigger Click on “+” icon at survey page.

User logged into the system successfully and currently at survey


Pre-condition
page.

Post-condition System will open camera that allows the user to take picture.

Step Actor Action System Response

Main Success
Scenario System will open camera
Click on “+” icon at survey
1 that allows the user to take
page.
picture.

Envir Team | 16
[Craft Village Pollution Monitor] – Architecture Design

Step Actor Action System Response

Alternative
Scenario
N/A

Exceptions Step Actor Action System Response

N/A

Priority High

Business rule N/A

Use case ID UC03

Use case name Save Survey

Create by Van Cong Le Ca Last updated by Nguyen Thanh Trung

Date created July 09, 2022 Date last updated July 09, 2022

Entities
E01, E02
Involve

This use case allows the user to save survey through the mobile
Description
application.

Trigger Click on “Save Survey” button at survey page.

User logged into the system successfully and currently at survey


Pre-condition
page.

Envir Team | 17
[Craft Village Pollution Monitor] – Architecture Design

System will save the unfinish pollution survey and redirect to


Post-condition
homepage.

Step Actor Action System Response

Main Success
Scenario System will save the
Click on “Save Survey”
1 unfinish pollution survey
button at survey page.
and redirect to homepage.

Step Actor Action System Response

Alternative
Scenario
N/A

Step Actor Action System Response

Exceptions
N/A

Priority High

Business rule N/A

Use case ID UC04

Use case name Submit Survey

Create by Van Cong Le Ca Last updated by Nguyen Thanh Trung

Date created July 09, 2022 Date last updated July 09, 2022

Envir Team | 18
[Craft Village Pollution Monitor] – Architecture Design

Entities
E01, E02
Involve

This use case allows the user to submit survey through the mobile
Description
application.

Trigger Click on “Submit Survey” button at survey page.

User logged into the system successfully and currently at survey


Pre-condition
page.

Post-condition System will submit survey and redirect user to homepage.

Step Actor Action System Response

Main Success
Scenario System will submit survey
Click on “Submit Survey”
1 and redirect user to
button at survey page.
homepage.

Step Actor Action System Response

Alternative
Scenario
N/A

Step Actor Action System Response

Exceptions Display error for user to


Click on “Submit Survey”
1 know that something is
button at survey page.
missing or cause error.

Priority High

Business rule N/A

Envir Team | 19
[Craft Village Pollution Monitor] – Architecture Design

Use case ID UC05

Use case name Verify Survey Data

Create by Van Cong Le Ca Last updated by Nguyen Thanh Trung

Date created July 09, 2022 Date last updated July 09, 2022

Entities
E01, E02
Involve

This use case allows the user to verify survey data through the
Description
mobile application.

Trigger Click on “Submit Survey” button at survey page.

User logged into the system successfully and currently at survey


Pre-condition
page.

Post-condition System will submit survey and redirect user to homepage.

Step Actor Action System Response

Main Success
Scenario System will submit survey
Click on “Submit Survey”
1 and redirect user to
button at survey page.
homepage if data is valid.

Step Actor Action System Response

Alternative
Scenario
N/A

Exceptions Step Actor Action System Response

Envir Team | 20
[Craft Village Pollution Monitor] – Architecture Design

If data is not valid then


Click on “Submit Survey” display error for user to
1
button at survey page. know that something is
missing or cause error.

Priority High

Business rule N/A

Use case ID UC06

Use case name Auto Detect Location and Pollution Types

Create by Van Cong Le Ca Last updated by Nguyen Thanh Trung

Date created July 09, 2022 Date last updated July 09, 2022

Entities
E01
Involve

This use case allows the user to auto fill the pollution survey through
Description
the mobile application.

Trigger Click on “+” icon at survey page.

User logged into the system successfully and currently at survey


Pre-condition
page.

Post-condition System will auto detect pollution types and get GPS location.

Step Actor Action System Response

Main Success
Scenario System will open camera
Click on “+” icon at survey
1 that allows the user to take
page.
picture.

Envir Team | 21
[Craft Village Pollution Monitor] – Architecture Design

System will auto detect


Click on “✓” to accept
2 pollution types and get GPS
picture. location.

Step Actor Action System Response

Alternative
Scenario
N/A

Step Actor Action System Response

Exceptions
N/A

Priority High

Business rule N/A

Use case ID UC07

Use case name Display Pollution Map

Create by Van Cong Le Ca Last updated by Nguyen Thanh Trung

Date created July 09, 2022 Date last updated July 09, 2022

Entities
E01
Involve

This use case allows the user to see pollution map when create the
Description
pollution survey through the mobile application.

Envir Team | 22
[Craft Village Pollution Monitor] – Architecture Design

Trigger Click on “+” icon at survey page.

User logged into the system successfully and currently at survey


Pre-condition
page.

Post-condition System will display pollution map.

Step Actor Action System Response

System will open camera


Click on “+” icon at survey
1 that allows the user to take
Main Success page.
picture.
Scenario

Click on “✓” to accept System will display


2
picture. pollution map.

Step Actor Action System Response

Alternative
Scenario
N/A

Step Actor Action System Response

Exceptions
N/A

Priority High

Business rule N/A

Envir Team | 23
[Craft Village Pollution Monitor] – Architecture Design

Use case ID UC08

Use case name Auto Fill Pollution Form

Create by Van Cong Le Ca Last updated by Nguyen Thanh Trung

Date created July 09, 2022 Date last updated July 09, 2022

Entities
E01
Involve

This use case allows the user to see pollution map when create the
Description
pollution survey through the mobile application.

Trigger Click on “+” icon at survey page.

User logged into the system successfully and currently at survey


Pre-condition
page.

Post-condition System will auto fill data to pollution form.

Step Actor Action System Response

System will open camera


Click on “+” icon at survey
1 that allows the user to take
Main Success page.
picture.
Scenario

Click on “✓” to accept System will display


2
picture. pollution map.

Alternative Step Actor Action System Response

Envir Team | 24
[Craft Village Pollution Monitor] – Architecture Design

Scenario N/A

Step Actor Action System Response

Exceptions
N/A

Priority High

Business rule N/A

Use case ID UC09

Use case name Create New Production Survey

Create by Van Cong Le Ca Last updated by Nguyen Thanh Trung

Date created July 09, 2022 Date last updated July 09, 2022

Entities
E02
Involve

This use case allows the user to create production survey through the
Description
mobile application.

Trigger Click on “New Survey” button at home page.

Pre-condition User logged into the system successfully and currently at home page.

Post-condition System will redirect to production survey page.

Envir Team | 25
[Craft Village Pollution Monitor] – Architecture Design

Step Actor Action System Response

Main Success
Scenario Click on “New Survey” System will redirect to
1
button at home page. production survey page.

Step Actor Action System Response

Alternative
Scenario
N/A

Step Actor Action System Response

Exceptions
N/A

Priority High

Business rule N/A

Use case ID UC10

Use case name View Craft Village Data

Create by Van Cong Le Ca Last updated by Nguyen Thanh Trung

Date created July 09, 2022 Date last updated July 09, 2022

Entities
E03
Involve

Envir Team | 26
[Craft Village Pollution Monitor] – Architecture Design

This use case allows the user to view pollution data of a craft village
Description
through the mobile application.

Trigger Click on “View Pollution Data” button at home page.

Pre-condition User logged into the system successfully and currently at home page.

Post-condition System will redirect to pollition data page.

Step Actor Action System Response

Main Success
Scenario Click on “View Pollution System will redirect to
1
Data” button at home page. pollition data page.

Step Actor Action System Response

Alternative
Scenario
N/A

Step Actor Action System Response

Exceptions
N/A

Priority High

Business rule N/A

Use case ID UC11

Envir Team | 27
[Craft Village Pollution Monitor] – Architecture Design

Use case name Give Account Approval

Create by Van Cong Le Ca Last updated by Nguyen Thanh Trung

Date created July 09, 2022 Date last updated July 09, 2022

Entities
E03
Involve

This use case allows the user to give approval for a household
Description
through the mobile application.

Trigger Click on “View Request Account” button at home page.

Pre-condition User logged into the system successfully and currently at home page.

Post-condition System will redirect request account page.

Step Actor Action System Response

Click on “View Request


System will redirect request
1 Account” button at home
Main Success account page.
page.
Scenario

Click on “Approve” button System will active the user


2 to at the side bar of each that have been approved
account. throught the application.

Step Actor Action System Response

Alternative
Scenario Click on “View Request
System will redirect request
1 Account” button at home
account page.
page.

Envir Team | 28
[Craft Village Pollution Monitor] – Architecture Design

System will reject account


Click on “Reject” button to
the user that have been
2 at the side bar of each
rejected throught the
account.
application.

Step Actor Action System Response

Exceptions
N/A

Priority High

Business rule N/A

3.4 Use Case Diagram

Figure 5 Use Case Diagram


3.5 Quality Attributes
Availability:

Envir Team | 29
[Craft Village Pollution Monitor] – Architecture Design

Scenario A1

Attribute concern Downtime of system

Description The operating time of the system should be 95% to have time
for backup data, maintenance and repair.

Source Internal to system

Stimulus System pause

Artifact System

Environment The system works normally

Response Be temporarily unavailable while backup data, maintenance


and repair are being effected

Response Measure Uptime of the system should be 95%, downtime is about 1.2
hours per day

Performance:

Scenario P2

Attribute concern The latency of initiating transactions

Description Users initiate transactions under normal operations. The


system processes the transactions with latency less than 5
seconds.

Source Users

Stimulus Initiate transactions

Artifact System

Environment Under normal operations

Envir Team | 30
[Craft Village Pollution Monitor] – Architecture Design

Response Transactions are processed

Response Measure With latency less than 5 seconds

Scenario P3

Attribute concern The throughput of the system

Description At peak load, the system is able to complete 100 normalized


transactions per second.

Source Internal to system

Stimulus Multiple transactions at the same time

Artifact System

Environment Peak load

Response Throughput

Response Measure Throughput is 100 transactions per second

Usability:

Scenario U4

Attribute concern Using effectively

Description Craft Village Pollution Monitor can be easy for end-users to


create a report after 10 minutes using.

Source End-users

Stimulus Create a report

Envir Team | 31
[Craft Village Pollution Monitor] – Architecture Design

Artifact System

Environment The system work normally

Response Easy to use

Response Measure Easy to use after 10 minutes using

4 Constraints
4.1 Business Constraint

❖ Project will be started on: 09 – Jul– 2022.

❖ Project will be finished on: 31 – Jul– 2022.

❖ Budget: $5000

4.2 Technical Constraint

❖ Technology: Flutter, Java (Spring Framework), Python (FastAI, Flask).

❖ Environment:

 Operating System: Android/IOS.


 Develop Tools: VSCode, Eclipse, Pycharm, Google Colab
 Source version control: Git (Github).
 Database: Oracle Database.
 Internet Connection.

Envir Team | 32
[Craft Village Pollution Monitor] – Architecture Design

5 High level architecture


5.1 Component and Connector view (C&C view)

Figure 6 Component & connector view (Personal)

Envir Team | 33
[Craft Village Pollution Monitor] – Architecture Design

Figure 7 Component & connector view (Household)

Envir Team | 34
[Craft Village Pollution Monitor] – Architecture Design

Figure 8 Component & connector view (Authority)

Envir Team | 35
5.2 Module view

Figure 9 Module view


[Craft Village Pollution Monitor] – Architecture Design

5.3 Allocation view

Figure 10 Allocation view

Envir Team | 2

You might also like