GAMS Requirement & Design Specs 1.0
GAMS Requirement & Design Specs 1.0
GAMS-SRS_v1.0 Page 1 / 20
Record of Changes
Version Date A* In charge Change Description
M, D
V1.0 18/5 A DuongVD Add User Requirements of all Actors
V1.0 19/5 A DuongVD Add Use Case Diagram for Guest, Customer, Sale
V1.0 19/5 A DuongVD Add Screen Flow Diagram of Guest
V1.0 19/5 M HoangVT Modify some detail in actor descriptions
V1.0 19/5 A HoangVT Add Use Case Diagram for Marketing,Admin
V1.0 19/5 A DuongNQ Add information to Use Cases descriptions
V1.0 19/5 A DuongNQ Add screen flow diagram of Customer
V1.0 19/5 M DuongNQ Modify the Use Case of Customer
V1.0 19/5 M VinhBT Modify the Screen Authorization
V1.0 19/5 A VinhBT Add Screen Descriptions
V1.0 19/5 A VinhBT Add screen flow diagram of Customer
V1.0 19/5 A HoangVT Add screen flow diagram of Marketing
V1.0 21/5 A HoangVT Add data schema
V1.0 24/5 M HoangVT Update 3.1 Database design
V1.0 24/5 M HoangVT Modify Use Case
None None
None None
*A - Added M - Modified D - Deleted
GAMS-SRS_v1.0 Page 2 / 20
Contents
Record of Changes.........................................................................................................................................2
I. Overview....................................................................................................................................................5
1. User Requirements.................................................................................................................................5
1.1 Actors...............................................................................................................................................5
1.2 Use Cases.........................................................................................................................................5
2. Overall Functionalities...........................................................................................................................6
2.1 Screens Flow....................................................................................................................................6
2.2 Screen Descriptions.........................................................................................................................6
2.3 Screen Authorization.......................................................................................................................6
2.4 Non-UI Functions............................................................................................................................7
3. System High Level Design....................................................................................................................7
3.1 Database Design...............................................................................................................................7
3.2 Code Packages.................................................................................................................................7
II. Requirement Specifications.......................................................................................................................9
1. <<Feature Name>>................................................................................................................................9
1.1 << UC Name>>...............................................................................................................................9
2. Common Functions..............................................................................................................................11
2.1 Login System.................................................................................................................................11
3. Patron Feature......................................................................................................................................12
3.1 Order a Meal..................................................................................................................................12
3.2 Register for Payroll Deduction......................................................................................................13
III. Screen Designs.......................................................................................................................................14
1. <<Feature Name>>..............................................................................................................................14
1.1 <<SubFeature Name>>..................................................................................................................14
1.2 System Access...............................................................................................................................14
IV. Code Designs.........................................................................................................................................17
1. <Feature/Function Name1>.................................................................................................................17
1.1 Class Diagram................................................................................................................................17
1.2 Sequence Diagram(s).....................................................................................................................17
1.3 Database Queries...........................................................................................................................18
2. <Feature/Function Name2>.................................................................................................................18
V. Appendix.................................................................................................................................................18
1. Assumptions & Dependencies.............................................................................................................18
2. Limitations & Exclusions....................................................................................................................18
3. Business Rules.....................................................................................................................................18
GAMS-SRS_v1.0 Page 3 / 20
4. ..............................................................................................................................................................19
GAMS-SRS_v1.0 Page 4 / 20
I. Overview
1. User Requirements
1.1 Actors
[An actor is a person (or sometimes another software system or a hardware device) that interacts with
the system to perform a use case. Following are some questions you might ask to help user
representatives identify actors
● Who (or what) is notified when something occurs within the system?
● Who (or what) helps the system respond to and complete a task?
This part gives the description of system actors, you can follow the table form as below]
# Actor Description
1 Admin Administrative role for managing user accounts, system settings
2 Guest Common role for unregistered user, this user can view products, view posts
This user has all permissions of Guest user can
3 Customer
place orders and send feedbacks.
4 Sale This user manages specific users’ orders
5 Sale Manager This user has access to all orders and can assign orders for Sale users
This user can manage posts, sliders, products manage user, view feedback
6 Marketing
and edit feedback status.
GAMS-SRS_v1.0 Page 5 / 20
a. Diagram(s)
[Provide the UC diagram(s) to show the actor-UCs and UC-UC relationships like the sample below. You
can have multiple UC diagrams for the system]
GAMS-SRS_v1.0 Page 6 / 20
Figure 1.2.2: Customer’s Use Case Diagram
GAMS-SRS_v1.0 Page 7 / 20
Figure 1.2.3: Sale and Sale Manager’s Use Case Diagram
GAMS-SRS_v1.0 Page 8 / 20
Figure 1.2.4: Marketing’s Use Case Diagram
GAMS-SRS_v1.0 Page 9 / 20
Figure 1.2.5: Admin’s Use Case Diagram
b. Descriptions
This part describes the use cases, you can follow the table form as below]
ID Feature Use Case Use Case Description
01 Manage Setting View Setting Admin can list, filter, search, sort, show or hide system
List settings.
02 Setting Editor View Setting Admin can view and edit the details of a specific system
Details setting.
03 User Editor View User Enables admin to view and edit the detail of a specific user.
Details
04 Product Details View Show the product’s information including name, image,
Product price,...and relevant product.
Details
05 Profile Editor View User Show the information of user and enable to edit their own
Profile information except email
2. Overall Functionalities
2.1 Screens Flow
[This part shows the system screens and the relationship among screens. You can draw the Screens Flow
for the system in the form of diagram as below. Please note that beside the normal flat screen, we might
GAMS-SRS_v1.0 Page 10 / 20
have the oval notation for pop-up screen (Orders Import) or a screen with multiple information tab
(Order Update), etc. You may also use text or background format for different visuality purpose]
GAMS-SRS_v1.0 Page 11 / 20
his/her clicking
- Shown product information includes its thumbnail, title,
brief information; the user is redirected to the product's
details on his/her clicking
2 Manage Setting Setting list View list of system setting.
3 Allows administrator of the system to edit setting
Setting Editor Setting Details
information
4 Allows admin of the system view detailed user
User Editor User Details
information, add new, view or edit user information
5 Product Show the information of a product and the relevant
Product Detail
Details product
6 Show the information of user and able to edit the
Profile Editor Profile Details
information except email
7 Show the posts pagination (sorted by updated date,
paginated) + the sider with the post search box, post
Manager Blog categories, the latest posts, and static contacts/links;
Blog List
List Shown post information includes its thumbnail, title,
brief-info; the user is redirected to the post's details on
his/her clicking
8 Show post details (including title, author, updated date,
Manager Blog
Blog Details category, and post details) + the sider with the post
Details
search box, post categories, static contacts/links
9 This is a pop-up screen which allows the user to enter
email & password to login; on this page, there are also
User Login Login
options for user to register new information or reset the
password for the case s/he forget it
10 This is a pop-up screen which allows the user to register
himself/herself to the system by inputing following
information: full name, gender, email, mobile, and
User Register User Register
address; User then need to verify by clicking the link sent
via email to him/her before being able to access the
system
11 This is a pop-up screen which allows the user to edit
his/her profile information, including the registered ones
User Profile User Profile
& the avatar image. Please note that s/he is not allowed
to change the email
GAMS-SRS_v1.0 Page 12 / 20
2.3 Screen Authorization
GAMS-SRS_v1.0 Page 13 / 20
Screen Admin Guest Customer Marketing Sale Sale Manager
Home Page x x x x x x
Blogs List x x x x x x
Blog Details x x x x x x
Products List x x x x x x
(Public)
Product Details x x x x x x
(Public)
Cart Details x x
Cart Contact x
Cart Completion x
Feedback x
User Login x
User Register x
Reset Password x
Change Password x x x x x
User Profile x x x x x
My Orders x
Order Information x
MKT Dashboard x
Posts List x
Post Details x
GAMS-SRS_v1.0 Page 14 / 20
Sliders List x
Slider Details x
Products List x
(Marketing)
Product Details x
(Marketing)
Customers List x
Customer Details x
Feedbacks List x
Feedback Details x
Sale Dashboard x x
Orders List x x
Order Details x x
Admin Dashboard x
Users List x
User Details x
User Insert x
Setting Details x
Setting List x
GAMS-SRS_v1.0 Page 15 / 20
2.4 Non-UI Functions
[Provide the descriptions for the functions which have no UI (or not screens), i.e batch/cron job, service,
API, etc.]
# Feature System Function Description
1
2
GAMS-SRS_v1.0 Page 16 / 20
b. Table Descriptions
No Table Description
01 Address id INT ,
district VARCHAR(255),
city VARCHAR(255),
detail TEXT,
is_default BOOLEAN
GAMS-SRS_v1.0 Page 17 / 20
- Primary keys: id
- Foreign keys: No
02 Role id INT,
name VARCHAR(255)
- Primary keys: id
- Foreign keys: No
03 User id INT,
email VARCHAR(255) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
name VARCHAR(255),
gender BOOLEAN,
status VARCHAR(50),
role_id INT,
phone VARCHAR(20),
last_log DATETIME,
created_by INT,
created_date DATETIME,
pfp TEXT,
- Primary keys: id
- Foreign keys: role_id,updated_by
04 User_address customer_id INT,
address_id INT,
- Primary keys: id,address_id
- Foreign keys: id,address_id
05 Product id INT,
title VARCHAR(255),
description TEXT,
import_price DECIMAL(10, 2),
list_price DECIMAL(10, 2),
status VARCHAR(50),
featured BOOLEAN,
thumbnail TEXT,
created_date DATETIME,
quantity INT,
category_id INT,
- Primary keys: id
- Foreign keys: category_id
06 Cart id INT,
user_id INT,
product_id INT,
quantity INT
- Primary keys: id
- Foreign keys: user_id,product_id
07 Order id INT,
customer_id INT,
ordered_date DATETIME,
status VARCHAR(50),
GAMS-SRS_v1.0 Page 18 / 20
is_delivered BOOLEAN,
delivered_date DATETIME,
total DECIMAL(10, 2),
- Primary keys: id
- Foreign keys: customer_id
08 Order_details order_id INT AUTO_INCREMENT,
product_id INT,
quantity INT,
import_price DECIMAL(10, 2),
sell_price DECIMAL(10, 2),
- Primary keys: id
- Foreign keys: product_id,user_id
10 Promotion id INT,
product_id INT,
sale_price DECIMAL(10, 2),
start_date DATETIME,
end_date DATETIME,
- Primary keys: id
- Foreign keys: product_id
11 Setting_type id INT,
name VARCHAR(20)
- Primary keys: id
- Foreign keys: No
12 Setting id INT,
setting_type_id INT,
name VARCHAR(50),
`order` INT,
status VARCHAR(10),
description TEXT,
- Primary keys: id
- Foreign keys: type_id
13 Post id INT,
title VARCHAR(255),
GAMS-SRS_v1.0 Page 19 / 20
thumbnail TEXT,
detail TEXT,
status VARCHAR(50),
featured BOOLEAN,
created_date DATETIME,
created_by INT,
category_id INT,
- Primary keys: id
- Foreign keys: categor_id,created_by
14 Slider id INT,
title VARCHAR(255),
image TEXT,
back_link TEXT,
status VARCHAR(50),
description TEXT
- Primary keys: id
- Foreign keys: no
15 Contact id INT,
icon TEXT,
link TEXT
- Primary keys: id
Package descriptions
No Package Description
1 controller Contains controller classes or control methods.
2 dao Contains classes and files related to accessing and
processing data from the data source (database, file,
API, etc.).
3 dbcontext Create and manage connections to the database
4 model Contains filters that are used to apply rules and
process before or after actions in the controller.
Filters allow us to perform tasks such as
authentication, access checks, logging handling, and
data changes before it is sent to the view or after it is
sent from the view.
GAMS-SRS_v1.0 Page 20 / 20
II. Requirement Specifications
1. Common Functions
1.1 Login System
a. UC Specification
UC Name: Login System
Primary Actor: Customer Secondary Actors: None
Trigger: User clicks Login button from the page header, or
User accesses an authenticated feature (from a link or type the page URL directly
into the address bar)
Description: As a user, I want to be able to log into the system so that I can use the system’s
authenticated features and access my personalized account.
Preconditions: User account has been created & authorized
Postconditions: ● Admin logs in the system successfully
GAMS-SRS_v1.0 Page 21 / 20
Business Rules: FR1, FR2, FR3
b. Business Rules
1.2 View Homepage
a. UC Specification
UC Name: View Homepage
Primary Actor: Guest Secondary Actors: None
Trigger: User clicks on site’s logo, Home button on other pages or initially called upon
web run.
Description: As a guest, i want to view Homepage to see other functions/screens
Preconditions: None
Postconditions: The Homepage is displayed to user.
Normal Flow View Homepage
1. User enters the homepage URL in the browser.
2. System retrieves the homepage content.
3. System displays the homepage to the user.
Alternative Flows: AF1. Registered User
Personalized Homepage is displayed.
Exceptions: E1. Incorrect URL
Redirect to 404 error page. => UC stops.
Business Rules:
b. Business Rules
GAMS-SRS_v1.0 Page 22 / 20
4. Due to server errors, database issues, or network problems, the system fails to
retrieve all or certain details of the product
5. As the product images couldn't be retrieved, the system displays a placeholder
image or a loading icon
Exceptions: E1. Product not found (user enter ođ link)
1. The system displays a message indicating that the product is not available.
2. It may suggest similar products or provide an option to return to the product
listing page
Business Rules: FR1, FR2, FR3
b. Business Rules
None
2. Admin Feature
2.1 View Users List
a. UC Specification
GAMS-SRS_v1.0 Page 23 / 20
visible in the list.
GAMS-SRS_v1.0 Page 24 / 20
2.3 View Settings List.
a. UC Specification
GAMS-SRS_v1.0 Page 25 / 20
1. Admin logs into the system.
2. System check Admin authentication.(E1)
3. Admin access Settings List screen.
4. System display paginated list of Setting
5. Admin clicks on Edit button from specific Settings in Settings List.
6. System display specific setting details.
Alternative Flows: AF1. Admin edit an setting
1. Admin input changed details.
2. Admin clicks on Save Changes Button.(E2)
3. Return to Users List screen.
AF2. Admin add an setting
1. Admin clicks on Add New Setitng.
2. User input user details that he want to add.(E3)
3. Admin clicks on Add button.
4. System return to Settings List screen
3. Customer Feature
3.1 Add feedback
a. UC Specifications
UC Name: Add Feedback
Primary Actor: Customer Secondary Actors: None
Trigger: User Clicks on Add Feedback button on order details page
Description: As a customer, i want to add my feedback to let other people know what is
the quality of the real product.
Preconditions: ● User has already logged in and ordered a product.
● That product status is set to delivered
Postconditions: User’s comment is successfully posted on product feedback screen.
Normal Flow: Add a feedback
1. User access order details page, chooses Delivered section.
2. User clicks on Add Feedback button.
3. User type in feedback in the textbox.
4. User can choose to add image of product(see alternative flow AF1)
GAMS-SRS_v1.0 Page 26 / 20
5. User clicks Submit button().
6. Feedback is successfully posted and will be pending to posted on
product feedback screen
Alternative Flows: AF1. Add Image of Product
1. User clicks on Add Image button.
2. User is prompted to select image, then clicks submit.
3. Selected image will be displayed for preview.
4. User can choose to Submit feedback or remove selected image(see
alternative flow AF2.
5. Return to step 5 of normal flow.
AF2. Remove Image
1. User clicks on X button on each image to remove.
2. Return to step 5 of AF1.
E1. User inputs too many character (>700)
Exceptions: 1. Summit button will be blurred, user can not post the feedback
2. Display warning message, prompt user to reduce characters
E2. User upload too large image (>50MB)
1. Summit button will be blurred, user can not post post feedback
2. Display warning message, prompt user to reduce characters
Business Rules: FR1, FR2
b. Business Rules
4. Blog List
a. UC Specification
GAMS-SRS_v1.0 Page 27 / 20
2. User accesses the "Blogs List" screen.
3. System shows a paginated blog list.
4. User clicks on a specific blog entry to view details.
5. System displays blog details.
Exceptions:
E1. No Blogs Found:
b. Business Rules
GAMS-SRS_v1.0 Page 28 / 20
Field Name Field Type Description
Filter/Search Fields
Search Name Text box This is for user to input name to search for settings.
Search Button User click to search by name.
Type filter Combo Box Filled with the list of current active setting types
(Single Choice) Allow to filter the list by setting type;
Default value is “All Type”
Status filter Combo Box Filled with the All Status, Pending, Active, Inactive
(Single Choice) Allow to filter the list by status;
Default value is “All Status”
Clear Button User clicks to reset filter, sort ,search
Data Table
ID INT Auto-increased identifier of the setting
Setting type String(20) Name of setting type
Name String(20) Name of setting
Order INT Order of setting
Status String(10) Status of setting
Action Links
Edit Button User click to redirect to User Details
Active Button User click to active setting
Inactive Button User click to inactive setting
GAMS-SRS_v1.0 Page 29 / 20
setting_type R Query the list of type name
GAMS-SRS_v1.0 Page 30 / 20
Action Links
Add new Button User click to redirect to pop up a form to add new Setting.
Save changes Button User click to update setting.
Database Access
Table CRUD Description
setting U Update setitng
GAMS-SRS_v1.0 Page 31 / 20
String(20)
Description Text This is for user to input description of setting.
Action Links
Add Button User click to add new setting.
Database Access
Table CRUD Description
setting C Create new setting
GAMS-SRS_v1.0 Page 32 / 20
2. Homepage
GAMS-SRS_v1.0 Page 33 / 20
Field Name Field Type Description
Logo Hyperlink Redirect to homepage
Home Hyperlink Redirect to homepage
About Hyperlink Redirect to about section
Shop Hyperlink Redirect to product list screen
Blog Hyperlink Redirect to blog list screen
Account Hyperlink Redirect to login screen or register screen
Slider Diplay image of slider
Slider button Button Redirect to slider backlink
Slider next/back Button Next or Previous Slider
button
All product Button User click to display all products
Hot product Button User click to display hot products
New product Button User click to display new products
Product item Hyperlink Redirect to product details page
Blog Item Hyperlink Redirect to blog details page
GAMS-SRS_v1.0 Page 34 / 20
3. Product Detail
GAMS-SRS_v1.0 Page 35 / 20
Table CRUD Description
Product R Query specify product from the database
4. UserList
GAMS-SRS_v1.0 Page 36 / 20
Product RU Query list of user from the database
Update user status
5 Blog List
UI Design
Field
Name Field Type Description
Search Text Box Search field to find specific blog posts by title.
View Button Click to view the detailed content of the blog post
GAMS-SRS_v1.0 Page 37 / 20
5.1 Blog Detail
1. Settings List
[Provide the detailed design for the function <Feature/Function Name1>. It includes class diagram and
sequence diagram(s)]
1.1 Class Diagram
[This part presents the class diagram for the relevant feature]
GAMS-SRS_v1.0 Page 38 / 20
1.2 Sequence Diagram(s)
[Provide the sequence diagram(s) for the feature/function, see the sample below. Sequence diagrams
with similar message flow can be omitted, but you need to mention the appropriate reference to the
similar sequence diagram]
- Get all Setting: SELECT [Link], type_id, [Link],`order`,status, description, [Link] as type FROM
setting as s join setting_type as t on type_id = [Link] order by [Link]
- Get all Setting Type: SELECT name from setting_type
GAMS-SRS_v1.0 Page 39 / 20
- Get search Setting: SELECT [Link],type_id,[Link],`order`, status, description,[Link] as type
FROM setting as s join setting_type as t on type_id = [Link] where [Link] like ?
- UPDATE setting SET status = 'Active' WHERE id = ?
- UPDATE setting SET status = 'Inactive' WHERE id = ?
2. Settings Details
2.1 Class Diagram
GAMS-SRS_v1.0 Page 40 / 20
2.3 Database Queries
- INSERT INTO setting(type_id,`order`,name,status,description) VALUES (?,?,?,'Pending',?)
- UPDATE setting SET type_id = ?, name = ?, `order` = ?, status = ?, description = ? WHERE id
=?
3. User Details
3.1 Class Diagram
GAMS-SRS_v1.0 Page 41 / 20
3.2 Sequence Diagram
4. Product Details
GAMS-SRS_v1.0 Page 42 / 20
4.1 Class Diagram
GAMS-SRS_v1.0 Page 43 / 20
FROM product_feedback p join user u on p.user_id = [Link]
where product_id = 1
ORDER BY created_date desc
limit 3;
5. User List
GAMS-SRS_v1.0 Page 44 / 20
4.2 Sequence Diagram(s)
6. Homepage
5.1 Class Diagram
GAMS-SRS_v1.0 Page 45 / 20
5.2 Sequence Diagram
GAMS-SRS_v1.0 Page 46 / 20
7. Blog
7.1 Class Diagram
GAMS-SRS_v1.0 Page 47 / 20
7.2 Sequence Diagram
[Link] AS user_id,
[Link] AS user_email,
[Link] AS user_name,
[Link] AS user_phone,
[Link] AS setting_id,
[Link] AS setting_name,
[Link] AS setting_order,
[Link] AS setting_status,
[Link] AS user_name
FROM
post
JOIN
user ON post.created_by = [Link]
JOIN
setting ON post.category_id = [Link]
where [Link] like ?
GAMS-SRS_v1.0 Page 48 / 20
V. Appendix
3. Business Rules
[Provide common business rules that you must follow. The information can be provided in the table
format as the sample below]
GAMS-SRS_v1.0 Page 49 / 20