06 StockMarketCharting Case Study v4 0 Deployment Phase6

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Stock Market Charting

(Deployment Phase6) v4.0


Case Study

This document covers Software Requirements of Stock


Market Charting, along with list of Technologies to be
used to develop this Software System, and also
includes some details on the Architecture

IIHT
Table of Contents
1. Business Requirement(Stock Market Charting).............................................................................2
1.1. Admin Use Cases:...................................................................................................................2
1.2. User Use Cases:......................................................................................................................3
1.3. Company related Data Fields:................................................................................................4
1.4. Stock Price details Excel:........................................................................................................4
1.5. IPOs planned:.........................................................................................................................4
1.6. Sectors data Fields:................................................................................................................4
1.7. User DB Table:.......................................................................................................................4
1.8. Stock Exchange Data Fields:...................................................................................................5
2. Design Inputs.................................................................................................................................5
3. Jenkins CI/CD.................................................................................................................................5
4. Configure Jenkins and Docker for the Project................................................................................5
5. Dockerization.................................................................................................................................6
6. Perform CI/CD................................................................................................................................7
7. Diagram.........................................................................................................................................7
8. Deliverables of this Phase..............................................................................................................7
9. Deliverables from all Phases..........................................................................................................7
10. Final Deliverables Folder Structure............................................................................................8
11. Full Stack Technologies..............................................................................................................9
12. Technical Spec – Solution Development Environment..............................................................9
Front End Layer.................................................................................................................................9
Middle Tier Layer...............................................................................................................................9
Database & Integration Layer............................................................................................................9
Ancillary Layer.................................................................................................................................10
Security............................................................................................................................................10
Deployment & Infrastructure..........................................................................................................10
Editors.............................................................................................................................................10
13. Important Instructions.............................................................................................................10

Stock Market Charting, Customized for GenC(IIHT) Page 1


1. Business Requirement(Stock Market Charting)
This Software System lets Admin to upload Stock Price of a Company(which is listed in a
Stock Exchange) at different points of time. It need to support multiple Stock Exchanges.
And the registered Users should be able to generate various charts to perform Stock Market
performance of various Companies or Sectors over certain period of time. More details on
the features which need to be supported are specified, below.

This Case study supports below two different Roles:

1. Admin
2. User

1.1. Admin Use Cases:


Admin can perform below operations. It is mandatory to implement all the requirements,
except the ones mentioned as optional.

1. Login/Logout: Login and Logout. To avoid Complexity, there can be a predefined


username and password for Admin
2. Manage Stock Exchanges(Optional): If this feature is not implemented, you may
use hard coded fixed records in database. This feature lists all the Stock Exchanges
currently supported. BSE, NSE Stock Exchanges need to be available by default. It
should be possible to add new Stock Exchanges. Deletion of Stock Exchange need
not be supported.
3. Manage Company(Optional): If this feature is not implemented, you may use hard
coded fixed records in database.
a. Add a new company details with fields or edit an already existing Company
details
b. Deactivate an already existing company
c. Update any IPO related data
4. Import Data(Excel Format):
a. Data can be imported(in Excel format), it's basically to feed stock price of a
company at various points of time.
Below is sample Excel format, which can be used. (Associates can add more
fields, if required)
https://github.com/vskreddy652/Genc_BatchB/blob/master/StockExchange_C
aseStudy/sample_stock_data.xlsx
b. Uploaded Excel need to be in a specific format, if not error message need to
be displayed. While uploading Excel, specify the Stock Exchange to which the
uploaded data belong to.
c. The company code, date ranges need to be appropriately checked, if any
data will be over written.

Stock Market Charting, Customized for GenC(IIHT) Page 2


d. After successfully imported, data need to get stored in a database and
Uploaded Summary need to be displayed like which company, Stock
Exchange, how many records got imported, from and to date range, etc…
5. Missing Data(Optional): Able to check the dates for which Stock Price of a
Company is not available

1.2. User Use Cases:


A User can perform below operations. It is mandatory to implement all the requirements,
except the ones mentioned as optional.

1. User Signup/Login/Logout: An User can


a. Signup for a new Account. When signed up, an email needs to be sent to the
User with confirmation link.
b. Login to an existing and Email confirmed account. User should be able to
Login only after E-Mail Confirmation is done.
c. Logout from an account.
2. User can update profile, password of an already existing Account
3. Able to search for a company to display Company profile & Turn over, CEO, board
members, Industry, sector, brief write up, current/latest Stock market price. Search
can be based on Company Name.
4. Whenever user requests charts/data for certain period, the period need to be divided
into appropriate intervals(Week or Month or Quarter or Year), to display the chart
5. View IPOs planned in a Chronological order(Optional)
6. When user types in 2 or more characters for a company name or company code, it
should display matching company names(using ajax), so that user can select one of
them, if required
7. Comparison Charts. It should be possible to perform below comparisons of
a. a single company over different periods of time
b. Two different companies over a specific period
c. a single sector over different periods of time
d. different sectors over a specific period(Optional)
e. between a Sector and a company over a specific period of time(Optional)
8. Should be possible to select if comparisons need to be displayed in a single
chart(Optional)
9. Use different colors when multiple Companies/sectors are displayed in a single chart
and display legend
10. You may use Bar charts to display data.
11. For a displayed chart, it should be possible to export data and download in Excel
12. Whenever a chart is displayed, display Average, Min, Max, Growth(Optional) for that
specific period
13. Possibility to perform multiple comparisons between Company’s or Sectors, over a
period of time.(Optional)
14. When data does not exist for certain period in between, that need to be appropriately
indicated in the chart(Optional)
15. View future Trend /Basic Prediction for a Company or Sector (Optional)

Stock Market Charting, Customized for GenC(IIHT) Page 3


1.3. Company related Data Fields:
1. Company Name
2. Turnover
3. CEO
4. Board of Directors
5. Listed in Stock Exchanges
6. Sector
7. Brief writeup, about companies Services/Product, etc…
8. Stock code in each Stock Exchange

1.4. Stock Price details Excel:


1. Company Code – to which Company this Stock Price Info belongs to
2. Stock Exchange – the Stock Price of the Company in this Stock Exchange
3. Current Price – Stock Price
4. Date – Date of the Stock Price
5. Time – Stock Price at this Specific time

1.5. IPOs planned:


1. id
2. Company Name
3. Stock Exchange
4. Price per share
5. Total number of Shares
6. Open Date Time
7. Remarks

1.6. Sectors data Fields:


1. Id
2. Sector Name
3. Brief

You may consider 3 or 4 sample sectors, as a sample data. For example Finance,
Healthcare Services, Pharmaceuticals, Hotels, Internet Software & Services

1.7. User DB Table:


1. Id
2. Username
3. Password
4. UserType(if Admin or normal User)
5. E-mail
6. Mobile number
7. Confirmed

Stock Market Charting, Customized for GenC(IIHT) Page 4


1.8. Stock Exchange Data Fields:
1. Id
2. Stock Exchange
3. Brief
4. Contact Address
5. Remarks

2. Design Inputs
Next sections in this document provides inputs on designing the solution for above
requirements.

Design inputs provided in this document are just for your reference purpose, Associates can
make changes or additions to the Design, based on their analysis.

3. Jenkins CI/CD
Jenkins CI/CD: As already known Jenkins is popular tool to perform CI/CD. When the code
is pushed to GIT, build need to be automatically fired and deployed. If possible create a
Docker image and run the Container on Docker Host

Deployment on Cloud(optional): Any of the Microservices or Front End can be deployed


on any Cloud(AWS, Azure, etc…) of your choice.

Jenkinsfile with pipeline, having below steps to build, test and deploy

 Pull code from Git repository


 Check Code Quality(using SonarQube)
 Perform Build
 Containerize(Create Docker Images)
 Run the Docker Images and start Containers

4. Configure Jenkins and Docker for the Project


• Import the project (as discussed above) in Spring Tool Suite and configure it locally
to run it as Spring Boot App.
• You may need to configure MySQL credentials and database name.

Stock Market Charting, Customized for GenC(IIHT) Page 5


• Execute the project locally and access the app at http://localhost:portnumber
• Once, it is working fine in local development environment; Configure CI/CD in
Jenkins, along with Dockerization
• Push the app source in internal GIT server. Internal GIT is 172.18.2.18 which can be
accessed from IIHT VMs only.
• Configure Jenkins locally to pull the source from internal GIT repository
• Jenkins should build the project and create the deployable (war/jar). Run the unit
tests.
• From Jenkins, invoke Docker commands to perform, below
• Creation of Docker Image(docker build . )
• Create and run Docker Container(docker run <image_id>)

5. Dockerization
It is mandatory that all standalone applications of the Project such as below need to be
Dockerized and deployed on Docker Host.

 All Microservices
 Database Server
 Angular Front End

Each need to have a corresponding Dockerfile, and a Docker container. MySQL DB Image is
prepcreated and need to be pulled from hub.docker.com

To create and deploy all containers with ease, either docker-compose or docker commands
can be used.

Deployment of Microservices, Database Servers and Front End on Docker Host can be
visually represented as below.

Stock Market Charting, Customized for GenC(IIHT) Page 6


To Setup Docker Client on your VM please refer
https://github.com/vskreddy652/Genc_BatchB/blob/master/Docker%20Remote%20Host
%20Access%20Steps%20(3).docx

6. Perform CI/CD

1. Make few changes in the project (source code)

2. Make it sure that project is running locally in development environment without errors.

3. If it running locally without errors, push the changes to the internal GIT repository which
was connected

4. If Project was Setup properly, Jenkins will automatically pull the code updates from
internal GIT repo and build and deploy the project with updated code.

5. Now, when you visit http://localhost; you should see the changes in the browser window

7. Diagram

8. Deliverables of this Phase

1. Jenkinsfile, Jenkins screenshots


2. Dockerfile and Docker commands used and Screen shots of usage of Docker

9. Deliverables from all Phases


Below deliverables need to be checked in(to internal GIT or github)
1. FrontEnd Source code, Unit Tested using Jasmine
2. Mid Tier Source code of all Microservices, Unit Tested using Spring Test
3. Screen shots of Usage of Post Man tool to test each End Point of all Microservices
4. Few Steps on how to run the solution.

Stock Market Charting, Customized for GenC(IIHT) Page 7


5. Test code of Angular and Mid Tier need to be included
6. Jmeter’s JMX file to test atleast one REST End point, and Screenshot of report
7. Dockerfile & docker-compose
8. Jenkinsfile or Jenkins UI ScreenShot
9. URL where the Project is deployed

Below Traceability Matrix need to be filled by Associates and need to be placed in


Root Folder, while delivering the Project.
https://github.com/vskreddy652/Genc_BatchB/blob/master/TraceabilityMatrix.xlsx

10. Final Deliverables Folder Structure


Below delivery structure includes Deliveries from all other Previous phases as well

It is mandatory to follow below folder structure for the Project delivered by Associates.

(If any specific Items not specified in the below sample folder structure, the same can be
included in the appropriate related folders)

ReadMe file covers instructions on

1. how to run the project and check output


2. url at which the project is deployed and can be accessed
3. any other specific inputs for Evaluation

11. Full Stack Technologies


The technologies included in Full Stack are not limited to following but may consist of:

Stock Market Charting, Customized for GenC(IIHT) Page 8


• UI Layer (HTML5, CSS3, Bootstrap 4, JavaScript, Jquery, Angular 4/6)
• Middleware Restful API (Spring Boot Restful & MicroServices, JAX-RS, Spring MVC)
• Database Persistence ( Hibernate)
• Database layer (MySQL or MongoDB)
• Ancillary skills (GIT, Jenkins(CI/CD), Docker, Maven) etc.

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

12. Technical Spec – Solution Development Environment


Front End Layer
Framework(s)/SDK/Libraries Version
Angular with TypeScript 4/6
Bootstrap 3.0 or above
CSS 3
HTML 5
JavaScript 1.8 or above
JQuery 1.3

Middle Tier Layer


Technology Framework(s)/SDK/Libraries Version
Spring Boot 1.5 or above
Spring MVC 4.0 or above
Java Stack
JDK 1.7 or above
Maven 3.x or above

Database & Integration Layer


Technology Framework(s)/SDK/Libraries Version
Hibernate 4.0 or above
Java Stack JAX-RS Jersey/ Spring Restful
MySQL 5.7.19
MongoDB 3.4
MongoDB
NoSQL

Ancillary Layer
Technology Framework(s)/SDK/Librarie
s Version
Source Code Management Tool GIT 2.14.2
Build Tool/JAVA Stack Maven 3.x

Stock Market Charting, Customized for GenC(IIHT) Page 9


Testing Tool/JAVA Stack JUnit/Mockito 4.x
Testing Tool/JAVA Stack Spring Test 4.x
Controllers can be tested using Postman Tool

Security
Name Version
Spring Boot Security
JWT

Deployment & Infrastructure


Technology Framework(s)/SDK/Libraries Version
Docker -
Apache Tomcat -
Jenkins(CI/CD) -
Node -

Editors
Name Version
STS(Spring Tool Suite)
Visual Studio Code

Agile/Scrum Software development Model can be used

13. Important Instructions


1. Consider using below Java features
a. Lambda Expressions
b. Collection Streams
c. Generics
2. Sample Design provided is just for reference, Associates can make changes over it
or follow their own Design.
3. Based on your current work, alternate Technologies can be used, for example
ReactJS instead of Angular, etc…, however prior approval from the Mentor is
required.
4. Please make sure that your code does not have any compilation errors while
submitting your case study solution.
5. The final solution should be a zipped code having solution. Solution code will be
used to perform Static code evaluation.
6. Implement the code using best design standards/family Design Patterns.

7. Use Internationalization for all the labels and messages in Rest API Development.

Stock Market Charting, Customized for GenC(IIHT) Page 10


8. 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.
9. 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.
10. Write web service which takes input and return required details from database.
11. Use JSON format to transfer the results.

For any further queries you can contact [email protected]

Stock Market Charting, Customized for GenC(IIHT) Page 11

You might also like