PROJECT: Giatros by CS2103 AY1819S2 W13-4


Overview

Hi! I am Chua Eng Soon, a Computer Science undergraduate in National University of Singapore. Giatros is my first software engineering project under CS2103.

An introduction is as such:

Giatros is a desktop patient record application that allows staff to keep track of patient data in a hospital. Written in Java, the user interacts with it using a CLI, and it has a GUI created with JavaFX. With the authentication and user management components, these restrict people without proper credentials from viewing or editing information.

Summary of contributions

  • Major enhancement: Added the User Authentication feature

    • What it does: Prevents user without proper credentials from executing role-restricted command and viewing of sensitive information.

    • Justification: This feature provides data protection for sensitive information from user without proper credential.

    • Highlights: 'Login', 'Logout' and 'Register' commands are available to faciliate the User Authentication feature.

  • Minor enhancement:

    • Change the ab4 logo to Giatros

    • Change the UI to show the username of the current user at the top right corner of the gui.

    • Added sample data for accounts and patients

  • Code contributed: [Functional code] [Test code] {give links to collated code files}

  • Other contributions:

    • Project management:

      • Managed releases v1.0 - v1.4 (5 releases) on GitHub

    • Documentation:

      • Updated the Product Website

      • Updated the user guide

      • Updated the developed guide

      • Updated the portfolio page

    • Tools:

      • Created an organization repository for the team on Github

      • Integrated a Github plugin (TravisCI) to the team repo

      • Integrated a Github plugin (Appveyor) to the team repo

      • Integrated a Github plugin (Coveralls) to the team repo

Contributions to the User Guide

Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

User Authentication Features

When the application is first opened, it will be in Guest mode and no command can be executed except the login command.

Logging in to the application : login

Allows a guest to login and start using the application.
Format: login id/USERNAME pw/PASSWORD

A dummy staff account with sample data is available by default. Username: STAFF and Password: 1122qq

Logging out of the application : logout

Allows the user to logout when done with the session.
Format: logout

You can only logout when you have been logged in.

Registering a new staff to use the application : register

Allows the manager to create new staff account using which new staff can log into the application.
Format: register id/USERNAME pw/PASSWORD n/NAME

  • Only the manager can create new staff accounts. A normal staff will not be able to execute the register command

  • The username manager is restricted. There can only be one manager.

A dummy manager account is available by default. Username: MANAGER and Password: 1122qq

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

User authentication feature

Current Implementation

The user account mechanism is facilitated by GiatrosBook. Additionally, it implements the following operations:

  • GiatrosBook#addAccount(Account) — Saves the new account.

These operations are exposed in the Model interface as Model#getAccount(Account). The following commands will invoke the aforementioned operations:

  • Command#LoginCommand() — Invokes Model#getAccount(Account).

  • Command#RegisterCommand() — Invokes Model#addAccount(Account).

Given below are usage scenarios and how each of the command and its respective operations behave at each step which involves two components, Logic which is responsible for parsing the user input and Model which is responsible for manipulating the list, if necessary. Both components are extended by LogicManager and ModelManager respectively.

The following sequence diagram shows how the register command works:

RegisterSequenceDiagram

Figure 4.2.1.1: Sequence diagram to illustrate component interactions for the register command

  • We assume the user is already logged in to an account with appropriate privilege level (e.g. Administrator)

  • If the username already exists, a warning message will be shown to the user to select another username

Step 1. The user executes register id/ces pw/1122qq n/Chua Eng Soon command to create a new user account.

Step 2. LogicManager invokes the GiatrosBookParser#parseCommand() method which takes in the user input as arguments.

Step 3. When the command is parsed, the Command#RegisterCommand() will be created which is returned to the LogicManager.

Step 4. LogicManager invokes the execute() method of the Command#RegisterCommand(), rc which is instantiated in Step 3. The Model component will be involved as the Command#RegisterCommand() invokes a request to add the account into the storage by calling Model#addAccount(Account).

Step 5: The new account is added into the storage. Then, a CommandResult is generated and returned to LogicManager which is used to display the result to the user.

The following sequence diagram shows how the login command works:

LoginSequenceDiagram

Figure 4.2.1.2: Sequence diagram to illustrate component interactions for the login command

We assume the user will enter the correct password. Otherwise, warning message will be shown to the user to re-enter the credential

Step 1. The user executes login id/ces pw/1122qq command to login to an existing user account.

Step 2. LogicManager invokes the GiatrosBookParser#parseCommand() method which takes in the user input as arguments.

Step 3. When the command is parsed, the Command#LoginCommand() will be created which is returned to the LogicManager.

Step 4. LogicManager invokes the execute() method of the Command#LoginCommand(), lc which is instantiated in Step 3. The Model component will be involved as the Command#LoginCommand() invokes a request to retrieve an account based on the username. If it exists, the account will be retrieved and the password hash will be compared. If it matches, then the credential is valid and the user is authenticated.