You are on page 1of 20

Mess Management System

Himani Raina Omais Pandith Vishal Sharma


2016csz8515 2016csz8514 2016csz8119

Group 12

April 22, 2017

1
Contents
1 Introduction 3
1.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Definitions, acronyms and abbreviations . . . . . . . . . . . . . . 3
1.4 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 System Overview 3
2.1 Architectural Design . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Module Definition . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.1 Student Module . . . . . . . . . . . . . . . . . . . . . . . 4
2.2.2 Manager web portal . . . . . . . . . . . . . . . . . . . . . 5
2.3 Technology Used . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3.1 Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3.2 XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3.3 JSON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3.4 PHP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3.5 HTML-CSS . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3.6 Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3.7 MySql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3.8 Spring Framework . . . . . . . . . . . . . . . . . . . . . . 7
2.3.9 Hibernate Framework . . . . . . . . . . . . . . . . . . . . 7

3 Detailed Design 7
3.1 Module APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Database Design . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3 Screen Layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.4 Use Cases: High Level Code . . . . . . . . . . . . . . . . . . . . . 13
3.4.1 Login: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4.2 Mark Attendance: . . . . . . . . . . . . . . . . . . . . . . 13
3.4.3 Rebate: . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4.4 Feedback: . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4.5 Menu selection: . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4.6 Create Poll: . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.5 Use Cases: Sequence Diagrams . . . . . . . . . . . . . . . . . . . 15

4 Deployment Design 20

2
1 Introduction
1.1 Purpose
The purpose of this document is to provide design details of the Mess Manage-
ment software so as to allow customer and system developer to have document
of reference.

1.2 Scope
The product is an android application used to manage daily mess attendance
along with streamlining rebate and menu selection processes. Objective of the
system is to provide a user friendly daily attendance system that is easy to
manage, maintain and query. Our primary focus is to develop a paperless system
that provides the management a way to facilitate smoother functioning of the
mess system.

1.3 Definitions, acronyms and abbreviations


• SRS: System Requirement Specifications
• JSP: Java Server Pages
• Http: Hypertext Transfer Protocol
• Https: Hypertext Transfer Protocol Secure
• API: Application program interface

1.4 Overview
The document is organized in 4 sections. Section 1 gives brief introduction on
the design document. Section 2 presents system overview of the product being
developed. Section 3 provides detailed design of the product and section 4 gives
the deployment design.

2 System Overview
2.1 Architectural Design
There are three major blocks in our application, an android application, a web
application, a database and a web services API that interacts with all three
parts and carries out all the transactions. Architectural diagram is shown in
figure 1.
The android application will be accessible to the user from the client side.The
user interacts with APIs to send and query for information within the system.
The client side will be designed in XML and functionality will be provided
through java. The web service will be provided by Apache.

3
The web services package will be RESTful and will be written in Spring and
Hibernate framework using java. The request and response will transferred as
an JSON object.

Figure 1: Architectural diagram of mess management application

2.2 Module Definition


2.2.1 Student Module
Allows users to interact with the system. Various sub modules in this are:

1. Login: Handling student login and validation of details will be handled in


this module
2. Mark attendance: Marking daily attendance of the students will be han-
dled here.

3. Rebate: Application for rebates and their approval.


4. Feedback and Complaints: Handling all feedbacks and complaints and
storing them in the database will be done by this module.
5. Vote for menu: Voting for menu items will be handled by this module.

6. User: Students can access their profiles and other meal related data.

4
2.2.2 Manager web portal
Various screens in the manager web portal are:

1. Login screen: Handling manager login done from web portal.


2. Account handling: Manager can activate a student’s account from this
module.

3. Approve rebate: Approving or disapproving rebates of the user.


4. View statistics: Manager can see various statistics related to the mess(like
number of students attended). This will be done by this module.
5. Handle feedbacks: Manager can view all the feedbacks in this module.

6. Manage polls: Managing polls will be handled by this module.

2.3 Technology Used


2.3.1 Android
Android is a mobile operating system developed by Google, based on the Linux
kernel and designed primarily for touchscreen mobile devices such as smart-
phones and tablets. Android software development is the process by which new
applications are created for the Android operating system. Applications are
usually developed in Java programming language using the Android software
development kit (SDK) integrated with Android Studio.Android Studio is the
official integrated development environment (IDE) for the Android platform.

2.3.2 XML
Extensible Markup Language (XML) is a markup language that defines a set
of rules for encoding documents in a format that is both human-readable and
machine-readable. The design goals of XML emphasize simplicity, generality,
and usability across the Internet. It is a textual data format with strong support
via Unicode for different human languages. Although the design of XML focuses
on documents, the language is widely used for the representation of arbitrary
data structures such as those used in web services.

2.3.3 JSON
JSON (JavaScript Object Notation) is an open-standard format that uses human-
readable text to transmit data objects consisting of attributevalue pairs. It is
the most common data format used for asynchronous browser/server commu-
nication, largely replacing XML, and is used by AJAX. JSON is a language-
independent data format. It was derived from JavaScript, but as of 2017 many
programming languages include code to generate and parse JSON-format data.
The official Internet media type for JSON is application/json. JSON filenames

5
use the extension .json. When exchanging data between a browser and a server,
the data can only be text. JSON is text, and we can convert any JavaScript
object into JSON, and send JSON to the server. We can also convert any JSON
received from the server into JavaScript objects. This way we can work with
the data as JavaScript objects, with no complicated parsing and translations.

2.3.4 PHP
PHP is a server-side scripting language designed for web development but also
used as a general- purpose programming language. PHP code may be embedded
into HTML code, or it can be used in combination with various web template
systems, web content management system and web frameworks. PHP code is
usually processed by a PHP interpreter implemented as a module in the web
server or as a Common Gateway Interface (CGI) executable.

2.3.5 HTML-CSS
HTML stands for Hypertext Markup Language, and it is the most widely used
language to write Web Pages. Hypertext refers to the way in which Web pages
(HTML documents) are linked together. Thus the link available on a webpage
are called Hypertext. As its name suggests, HTML is a Markup Language which
means you use HTML to simply ”mark up” a text document with tags that tell
a Web browser how to structure it to display.
Cascading Style Sheets (CSS) is a style sheet language used for describing
the presentation of a document written in a markup language. Although most
often used to set the visual style of web pages and user interfaces written in
HTML and XHTML, the language can be applied to any XML document, in-
cluding plain XML, SVG and XUL, and is applicable to rendering in speech,
or on other media. Along with HTML and JavaScript, CSS is a cornerstone
technology used by most websites to create visually engaging webpages, user
interfaces for web applications, and user interfaces for many mobile applica-
tions.CSS is designed primarily to enable the separation of document content
from document presentation, including aspects such as the layout, colors, and
fonts. This separation can improve content accessibility, provide more flexibility
and control in the specification of presentation characteristics, enable multiple
HTML pages to share formatting by specifying the relevant CSS in a separate
.css file, and reduce complexity and repetition in the structural content

2.3.6 Apache
The Apache HTTP Server, is the world’s most used web server software. Apache
supports a variety of features, many implemented as compiled modules which
extend the core functionality. These can range from server-side programming
language support to authentication schemes.

6
2.3.7 MySql
MySQL is the world’s most popular open source database. With its proven per-
formance, reliability and ease-of-use, MySQL has become the leading database
choice for web-based applications. It is also open source.

2.3.8 Spring Framework


The Spring Framework is an application framework and inversion of control
container for the Java platform. The framework’s core features can be used by
any Java application, but there are extensions for building web applications on
top of the Java EE platform.

2.3.9 Hibernate Framework


Hibernate is an object-relational mapping tool for the Java programming lan-
guage. It provides a framework for mapping an object-oriented domain model to
a relational database. Hibernate solves object-relational impedance mismatch
problems by replacing direct, persistent database accesses with high-level object
handling functions.

3 Detailed Design
3.1 Module APIs
3.2 Database Design
The database is formed of 7 tables. The attributes of each table are organized in
such way to facilitate current supported features and future features that might
be added. The Entity- Relation diagram is shown in figure 2.

3.3 Screen Layouts


Various screen layouts are shown in Figures 3 to 9.

7
Module Name API Function Description
User String login(loginId, password) Returns token for session.
boolean deactivateUser(loginId, token) Deactivates a user from mess.
boolean activateUser(loginId, token) Activates a user for the mess.
updateUser(userDetails, token) Update a user.
UserSRO getUserDetails(token) Get details of a user.
boolean isTokenValid(token) Checks if the session is still valid or not.
boolean isUserExists(token) Checks if a user exists or not.
boolean logout(token, token) Logs out a user.
boolean addUser(token, password, fName, lName) Adds a new user.
List<UserSRO> getAllActiveUsers(messId) Returns all active users.
int getAllActiveUsersCount(messId) Returns count of all active users.
UserSRO getUserByLoginIdManager(loginId) Return details of user by login id

Feedback boolean submitFeedback(FeedBack, loginId) Submit a feedback.


List<FeedbackSRO> getFeedbacks(messId, startDate, endDate) Retrieve all feedback.

Attendance (boolean, timeStamp) markAttendence(loginId) Mark attendance for an user.


List<AttendanceSRO> getAttendenceStats(messId, startDate) Get attendance stats for a mess.

Rebate boolean requestRebate(token, startDate, endDate) Apply for a rebate.


boolean approveRebate(token,rebateId) Approve a rebate of an user.
List<RebateSRO> getPendingRebate(messId, tokenOfmgr) Return all pending details.

Menu createPoll(tokenOfmgr,messId,breakFast,lunch,validity) Create a new poll.


pollSRO fetchPoll(token) Get the latest poll.
boolean castVote(token, breakFast, Lunch) Submit the vote of a student.
MenuSRO getMenu(token) Get current menu.
(top5bfDish, top5LunchDish) fetchFinalPollResult(pollId) Get the results of poll

Table 1: Module APIs

8
Figure 2: ER diagram of mess management application

9
Figure 3: Login Page

Figure 4: Home Screen Page

10
Figure 5: Attendance Page

Figure 6: Rebate Page

11
Figure 7: Feedback Page

Figure 8: Menu Page

12
Figure 9: Profile Page

3.4 Use Cases: High Level Code


The web services package will be RESTful and will be written in Spring and
Hibernate framework using java. The request and response will be received and
sent using JSON. Various flows are as follows:

3.4.1 Login:
The process is:
1. Get userId and Password from User.

2. Call to Login API:validateUser(userid,password)


3. If response of validateUser() is false, then display login Failure.

3.4.2 Mark Attendance:


1. Retrieve time, date and menu for the present day from the server.

2. Call to Mark Attendance API: markAttendance()


3. If response of markAttendance() is false, Display ”Could not mark Atten-
dance”.

13
3.4.3 Rebate:
1. Get start-date, end-date and Department from the user.
2. Call to Rebate API: applyForRebate(start-date,end-date,department)

3. If response of applyForRebate() is false, Display ”Rebate Application Re-


jected”.
4. else, Display ”Rebate Application Approved”.

3.4.4 Feedback:
1. Get comments and feedback from user.

2. Call to feedback API: addFeedback().


3. If response of addFeedback() is false, Display ”Feedback could not be
added.

3.4.5 Menu selection:


1. Send a request to the server.

2. Call to Menu API: getMenu()


3. Select from the list retrieved.

3.4.6 Create Poll:


1. Call to Poll API: getBreakFastDishes() and getLunchDinnerDishes()
2. Select from the retrieved dishes and Save the Poll.

14
3.5 Use Cases: Sequence Diagrams
The sequence diagrams are sown in Figures 10 to 16.

Figure 10: Sequence diagram for mark attendance.

15
Figure 11: Sequence diagram for requesting rebate.

16
Figure 12: Sequence diagram for submitting feedback.

17
Figure 13: Sequence diagram for menu selection.

Figure 14: Sequence diagram for viewing stats.

18
Figure 15: Sequence diagram for approving rebate request.

Figure 16: Sequence diagram for creating a menu poll.

19
4 Deployment Design

Figure 17: Deployment design for the product.

20

You might also like