Car Service Record Management System

High-Level Design


System Architecture

Based on the system's requirements, we identified five main components. The database, REST API (authentication module, DAO Module, and Request Handler Module), and The five core components are the five core components. Each of these components belongs to one of three tiers in a multi-tier design. The data tier is in charge of data storage and retrieval. The database module is included in this tier. All business logic, including permission and access control, is handled by the application tier. This tier is made up entirely of the REST API, which is made up of the Authentication module, the DAO module, and the Request Handler module. The presentation tier serves as the system's external interface. The web application is part of this tier. In the presentation tier, the web application talks to the REST API modules in the application tier, and the REST API talks to the database module in the data tier.

(Figure 6) Overview of our system

It is important for us to define modules in a way such that the application behaves in a cohesive manner and performs all the functionalities. The basic workflow of this application is as follows:

  • Request Handler module: This module is responsible for handling the requests made by the client and validating them by either giving an invalid request response or continuing processing the requests.
  • Authentication module: This module is responsible for authenticating the clients. This will make sure only certain users are given the permission to edit or update certain data on the website. Whenever a user tries to log into the website, they will first be authenticated, and then they will be logged in.
  • DAO module: This module is responsible for connecting the database module through any request that is made. This module contains all the queries that will fetch all the data from the database. This is the only module that will connect to the database.
  • Database: This module is responsible for providing all the functionalities of a database to the website. When a user requests a service, the website will pull up data that is stored in our database and display it to the user.


Database design

Databases are an important part of every web application because they provide the application with the ability to retrieve, store and handle all the data. There are several popular types of databases: relational, key-value, and document based with their own benefits and drawbacks. Relational databases are used to store the structured data.

The primary key for the majority of the entities defined in the data model will be a number. This identifier will be produced automatically by the database and won't reveal any extra information about the entity it represents. Using the IDs and a foreign key constraint, certain entities will relate to other entities. Additional restrictions will be set to enforce unique rules that will be defined for certain of the data stored in the system to ensure data integrity. Lastly, effective data retrieval is required. We shall define the necessary data indices for this. We will choose Azure SQL database service to host databases due to its superior cost and performance in comparison to other cloud providers.

(Figure 7) Database Design

Web Application Design

Using the SPA approach has a number of benefits. The first is that, since only one page is used and is rewritten based on what the user does, the page does not need to be reloaded when switching between pages. This keeps the user experience smooth and makes it work like a normal desktop app. Additionally, the web page only loads once, and any additional code (such as HTML, CSS, or JavaScript) is only loaded when the user interacts with the page or as needed. This will make page loads faster and reduce the overall load on the server, which will make the user experience better and meet NFR-8.

React, a JavaScript toolkit for making user interfaces (the "view layer"), will be used to make the application's front end. The program will be divided into a number of independent, self-contained modules, which will speed up development and make it simple to reuse components across the entire application. React employs a virtual DOM, which makes loading multiple views quick and efficient. It also lets apps run smoothly on a variety of platforms and devices, including mobile, which will also be a key part of our system. We will also use Redux because it will be hard to keep track of all the different states of our complex and large application. Managing application state is easy with Redux, an open-source JavaScript toolkit that is incredibly lightweight. This will help us to make sure that we are always providing the user with accurate information and that the program is responding appropriately to user input.


Backend Design

For the backend we are using the REST API which will be crucial to the system's operation. It will provide a common language for dealing with the data and house the majority of the system's business logic.

DAO
DAOs help setting up the database connection and interacting with it by sending SQL CRUD commands.They also communicate with the clients to provide and obtain data.

(Figure 8)Car manufacturer Sequence Diagram
As we can see in the sequence diagram above, the car manufacturer client will interact with the web application when it tries to request login. The request handler will handle the request login information by authenticating the client and then validates the login by authenticating it. The authenticating module will send the request to DAO module will check if the email or password entered by the user is valid or not and then relates the status to request handler. Now, the car manufacturer client can enter the model of the car they want an information about and the request handler will send this request to REST API will send this request to DAO module. After receiving data from the database, DAO creates a model object or a list of model objects. Finally, DAO returns the model object(s) created to the client

(Figure 9) Insurance Company Sequence Diagram
In the sequence diagram above, the Insurance company client will interact with the web application when it tries to request login. The request handler will handle the request login information by authenticating the client and then validates the login by authenticating it. The authenticating module will send the request to DAO module will check if the email or password entered by the user is valid or not and then relates the status to request handler. Now, the insurance company client wil want information about different cars in order to decide the car insurance and for that they can enter the model of the car they want an information about and the REST API will send this request to DAO module. After receiving data from the database, DAO creates a model object or a list of model objects. Finally, DAO returns the model object(s) created to the client.

(Figure 10) Admin Sequence Diagram
In case of Admin Client, the admin will be able to login into the system and our website will authenticate this using the authenticate module provided in our website. Main functionality of Admin will be approving, authorizing and unauthorizing the different clients. Only he is given this access to update changes regarding this. The admin can enter the new details and request the changes to be made via the REST APIs and the DAO module will form a connection with the database to make these changes using UPDATE statement and the INSERT statements. And after the changes have been made a message will be displayed on the screen informing the admin in the form of model object(s).

(Figure 11) General User Sequence Diagram
In the sequence diagram above, the user will interact with the web application when it tries to request login. The request handler will handle the request login information by authenticating the client and then validates the login by authenticating it. The authenticating module will send the request to DAO module will check if the email or password entered by the user is valid or not and then relates the status to request handler. Now, the user can search the information about any model of any car by entering the model name and registration number of that particular vehicle. The corresponding information will be displayed on the screen and the user can also download pdf of the same if the requirement be.

(Figure 12) Workshop Sequence Diagram
In case of Workshop Owner Client, the user will be able to login into the system and our website will authenticate this using the authenticate module provided in our website. Main functionality of workshop owner will be adding, updating changes about the car maintenance records. The owner can enter the new details and request the changes to be made via the REST APIs and the DAO module will form a connection with the database to make these changes using UPDATE statement, INSERT statements and the SELECT statement. And after the changes have been made a message will be displayed on the screen informing the admin in the form of model object(s).

Traceability Matrix


Functional Requirement Traceability Matrix

Web Application Component Authentication Module Request Handler Database Component Additional Services (Azure)
FR-1 X X X X
FR-2 X X X
FR-3 X X X
FR-4 X X X
FR-5
X X X
FR-6 X X X
FR-7 X X
FR-8 X X X
FR-9 X X
FR-10 X X X


Non-Functional Requirement Traceability Matrix

Web Application Component Authentication Module Request Handler Database Component Additional Services (Azure)
NFR-1 X X X X X
NFR-2 X X X
NFR-3 X
NFR-4 X X X
NFR-5
X X X X X
NFR-6 X X
NFR-7 X X X X X
NFR-8 X X X X X
NFR-9 X X X X X

Previous: Requirements Next: Design Rational