WebsiteAdministration UseCase JavaFullStack
WebsiteAdministration UseCase JavaFullStack
Website administration
Use Case document for Full Stack development
This document covers Software Requirements of Website administration, along with list
of Technologies to be used to develop this Software System, and also includes some
details on the Architecture
Use Case Document: Website administration
Table of Contents
1. Business Requirement (Website Administration)
2. Technical Spec – Solution Development Environment
Front End Layer
Middle Tier Layer
Database & Integration Layer
Ancillary Layer
Security
Deployment & Infrastructure
Editors
Coding Standards and Guidelines
Designing for Testability
3. UI Components
3.1. UI Wireframes
3.2. UX – Angular Components
4. Mid-Tier Java Components
4.1. Architecture Diagram
4.2. Database Constructs, Model Classes and Entity classes
4.3. Development of individual Microservices
4.4. Microservices Integration and Security
4.5. Spring Microservices Tools to be used
4.6. JWT Authentication
5. DevOps Activity
5.1. Diagram
5.2. Jenkins CI/CD
5.3. Configure Jenkins and Docker for the Project
5.4. Perform CI/CD
6. Important Instructions
Use Case Document: Website administration
Manage User Groups abstract use case is specialized by Create Group, Update Group,
and Delete Group use cases. The idea is that website administrator could create different
user groups, for example, having different privileges or options, and later some user groups
could be modified or even deleted.
Use Case Document: Website administration
User group management use case diagram for the administration website.
User management use cases are available both to the Website Administrator and to
the Help Desk. There is standard user CRUD (Create, Retrieve/Find, Update, Delete)
functionality set.
Two other use cases, Lock User and Unlock User are specific to website security. For
example, if during some predefined period of time there were several unsuccessful login
attempts using wrong user password, user account should be locked for some predefined
time to prevent possible brute force password guessing attack. This locking and unlocking is
usually done automatically by intrusion detection or website authentication subsystem, but
this functionality needs to be available in the manual mode too, just in case. For example,
some user might call and ask to lock his or her account.
Use Case Document: Website administration
Ancillary Layer
Technology Framework(s)/SDK/Libraries Version
Source Code Management Tool GIT 2.25.1 or above
Build Tool/JAVA Stack Maven 3.6.3 or above
Testing Tool/JAVA Stack JUnit/Mockito 4.x.x
Testing Tool/JAVA Stack Spring Test 4.x.x
Controllers can be tested using Postman Tool
Security
Name Version
Spring Boot Security 5.x
JWT
Editors
Name Version
STS(Spring Tool Suite) 4.6.0
Visual Studio Code 1.4.2
Eclipse Jee 4.11.0
https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pub
https://itnext.io/clean-code-checklist-in-angular-%EF%B8%8F-10d4db877f74
https://docs.oracle.com/cd/E12517_01/back_office/pdf/141/html/pos_impg2/developmentstandards.htm
https://www.oracle.com/technetwork/java/codeconventions-150003.pdf
3. UI Components
3.1. UI Wireframes
In this Phase you will develop, responsive UI of the application using HTLM5, HTML5 API, CSS3 and
Bootstrap/Material. (This Phase does not include development of Angular Components)
Below are wireframes which need to be developed in this Phase
Based on the requirements, Front End need to be divided into multiple components to
accommodate above Wireframes. Angular Routing can be used to create navigation Links. For
Authentication, store JWT token in Local or Session Storage. REST APIs are invoked from the
corresponding Services,
As known JWT token is generated on the Server side and received by Client on successful
authentication. Angular’s HttpInterceptor can be used to automatically send JWT Token thru Header
of every HttpRequest.
To complete this case study, you should be comfortable with basic single page web application
concepts including REST and CRUD. You may use angular-cli to create your template project. All web
pages need to be responsive.
Ref1: https://cli.angular.io/
Ref2: https://github.com/angular/angular-cli
Angular Routing feature is used to display Navigation links on Web Pages. When User clicks a
Navigation link, the corresponding Component is displayed.
As known, Angular Services is used to interact with the REST end points, using Observable or
Promises.
Based on the requirements, Front End need to be divided into multiple components to
accommodate above Wireframes. Angular Routing can be used to create navigation Links. For
Authentication, store JWT token in Local or Session Storage. REST APIs are invoked from the
corresponding Services,
As known JWT token is generated on the Server side and received by Client on successful
authentication. Angular’s HttpInterceptor can be used to automatically send JWT Token thru Header
of every HttpRequest.
Deliverables of this Phase
1. UI screens ready to be integrated with backend REST API endpoints.
2. Demo-able screens with mock data.
Use Case Document: Website administration
Architecture of a Single Microservice with REST Controller, Service, Model & Entity Classes and
Repository classes
This specific phase is to design/develop individual Microservices. Analyze the requirement and divide
back end functionality into multiple Microservices. Based on the Website administrator
requirements
Each of above Microservice need to comprise below functionality, which need to be developed
1. REST Controllers
2. Services
3. Entity & Model classes, including appropriate relationship (like One-One, Many-One, etc…)
between Entity Classes. (Entity and Model classes have been developed in the Previous
Phase)
4. In case specific Entity or Model classes are required across multiple Microservices, it is
recommended to maintain separate copy of Entity or Model classes for each Microservice.
5. Microservice interaction with corresponding DB tables or Databases it owns.
6. It is possible that one Microservice need to interact with other Microservice(using
RestTemplate or FeignClient)
7. Repository class which implements JPA or CrudRepository, if RDBMS is used
8. Usage of Custom Queries using @Query wherever custom functionality required
9. Feign Client can be used to invoke one Microservice, from another Microservice
10. Use Postman to test the Microservices by directly passing requests to each REST end Point,
of each Microservice
11. Unit Testing code can be developed using JUnit, Mockito, and perform Unit Testing
Use Case Document: Website administration
Zuul Gateway(create a Zuul based Project using Spring Initilaizer or STS IDE), add required
annotation. Authentication and JWT Token validation can be performed in Zuul’s Pre Filter.
Add below details to yml or property file
1. add route configurations
2. port number & url of eureka Server
Eureka Server(create a Eureka Discovery Server using Spring Initializer or STS IDE), add required
annotation & port number in yaml configuration file
Add Eureka Discovery Client to all the Microservice
Now open Eureka Server Dashboard by opening and crosscheck if all Microservices are registered in
the dashboard
Now start sending the requests to Zuul Gateway which further routes to a specific Microservice
based on the url pattern
Develop code for Unit Testing
PostMan, to test REST end points
5. DevOps Activity
This phase includes performing below Activities
Dockerization: Dockerize atleast Front End or any one Microservice of Mid Tier. Provide Dockerfile
and the docker commands used to create image and run Container. Share Screen shots of running
Docker. To Setup Docker Client on your VM please refer
JMeter: As already known JMeter is used to perform Performance or Load Testing. Create a JMeter
Test Case, which invokes a REST End point, with multiple threads. Check in jmx file and share the
report generated after Performance Testing. Repeat this for atleast two REST end points.
Code Coverage: Code coverage is a Quality Metric to check if sufficient number of Test Cases are
created. EclEmma tool can be used as Code Coverage Tool. Code Coverage can be performed on any
one Microservice.Ensure that Code Coverage need to be atleast 80%
5.1. Diagram
Assessment Deliverables
1. Jenkinsfile, Jenkins screenshots
2. Dockerfile and Docker commands used and Screen shots of usage of Docker
Use Case Document: Website administration
6. Important Instructions
Adhere to the design specifications mentioned in the case study.
1. Please make sure that your code does not have any compilation errors while submitting your
case study solution.
2. The final solution should be a zipped code having solution. Solution code will be used to
perform Static code evaluation.
3. Implement the code using best design standards/family Design Patterns.
4. Use Internationalization for all the labels and messages in Rest API Development.
5. Do not use System out statements or console.log for logging in Rest API and FrontEnd
respectively. Use appropriate logging methods for logging statements/variable/return
values.
6. If you are using Spring Restful or Jersey JAX-RS to develop Rest API, then use Maven to build
the project and create WAR file.
7. Write web service which takes input and return required details from database.
8. Use JSON format to transfer the results.