rediOps/docs/developer_client_start.md

211 lines
5.8 KiB
Markdown
Raw Normal View History

2023-07-23 11:45:31 +00:00
# Front end client developer flow (start)
This is the initialisation of the front end
client code. Coding the server is covered in document
[developers server start](developers_server_start.md)
The [analysis start](analysis_start.md) is a pre-requisite for
this flow.
The assumptions for this documents are:
* the Git repository has been created
* a new API is required to be exposed
* an OpenAPI definition exists in Git
* no API coding has commenced
* Visual Studio Code has been installed
* Developer has access to the API editor viewer for the OpenAPI specification
## Sequence Diagram
### Automation
2023-07-23 11:57:08 +00:00
The sequence of automation activity using **devops** file and **qaskx-cli** is
2023-07-23 11:45:31 +00:00
as follows.
The Qaskx command line tool needs to be installed on the developer machine
```mermaid
2023-08-02 12:55:02 +00:00
---
title: Client development task flow
---
2023-07-23 11:45:31 +00:00
sequenceDiagram
actor dev as Developer
participant vsc as Visual Studio Code
participant term as Terminal
participant qaskx as qaskx-cli
participant cmdb as CMDB
participant git as Github
2023-07-23 11:57:08 +00:00
link git: GitHub @ https://github.com/meerkat-manor/devops
2023-07-23 11:45:31 +00:00
participant oas3f as OpenAPI file
2023-07-23 11:57:08 +00:00
participant devops as devops file
2023-07-23 11:45:31 +00:00
participant apip as API portal
dev ->>+ vsc: start IDE
Note over vsc, term: Clone existing git for project
vsc ->>+ git :
git -->>- vsc : Cloned, project opened
2023-07-23 11:57:08 +00:00
Note over git, devops: The OpenAPI and devops files are stored in Git
2023-07-23 11:45:31 +00:00
alt If no OpenAPI dependency linked
vsc -) devops: Update OpenAPI dependency entry
end
2023-07-23 11:45:31 +00:00
vsc ->>+ term: start
2023-08-02 12:55:02 +00:00
term ->>+ qaskx: New CMDB CI
2023-07-23 11:57:08 +00:00
qaskx ->>+ devops: Read
devops -->>- qaskx: Contents
loop Read called dependencies
qaskx ->>+ oas3f: Read dependency
2023-07-23 11:45:31 +00:00
oas3f -->>- qaskx: Contents
end
2023-08-02 12:55:02 +00:00
Note over cmdb, git: qaskx-cli rediops cmdb cmd
2023-07-23 11:45:31 +00:00
qaskx ->>+ cmdb:
2023-08-02 12:55:02 +00:00
cmdb -->>- qaskx: New CMDB CI value
qaskx -) devops: Update CMDB CI entry
2023-07-23 11:45:31 +00:00
qaskx -->>- term: Success
term ->>+ qaskx: Generate code
2023-08-01 13:46:54 +00:00
Note over qaskx, cmdb: qaskx-cli gen client cmd
qaskx ->>+ devops: Read dependency list
2023-07-23 11:57:08 +00:00
devops -->>- qaskx: Contents
loop Read called dependencies
qaskx ->>+ oas3f: Read dependency
2023-07-23 11:45:31 +00:00
oas3f -->>- qaskx: Contents
qaskx -) qaskx: Auto generate client code
end
2023-07-23 11:45:31 +00:00
qaskx -) qaskx: Auto generate sequence diagram
qaskx -) qaskx: Auto generate feature flags
2023-07-23 11:57:08 +00:00
qaskx -) devops: Auto update entries, including build, test
2023-07-23 11:45:31 +00:00
qaskx -->>- term: Success
alt Register using API dependencies if not already done
2023-07-23 11:45:31 +00:00
term ->>+ qaskx: Register API dependencies
2023-08-01 13:46:54 +00:00
Note over cmdb, git: qaskx-cli rediops register cmd
2023-07-23 11:57:08 +00:00
qaskx ->>+ devops: Read
devops -->>- qaskx: Contents
loop Read called dependencies
2023-07-23 11:45:31 +00:00
qaskx ->>+ oas3f: Read
oas3f -->>- qaskx: Contents
qaskx ->>+ apip:
apip -->>- qaskx: Registered as consumer
end
2023-07-23 11:57:08 +00:00
qaskx -) devops: Auto update API entry
2023-07-23 11:45:31 +00:00
qaskx -->>- term: Success
end
term -->- vsc: close
2023-08-02 13:07:38 +00:00
rect lightgrey
2023-08-02 12:55:02 +00:00
Note over vsc, qaskx: Developer codes to use the OpenAPI definition, with base code in place
vsc -->> vsc: Code update
vsc -->> vsc: Local build
vsc -->> vsc: Local test
end
2023-08-02 13:07:38 +00:00
2023-07-23 11:45:31 +00:00
vsc ->>+ git: Commit
git --) git: Trigger GitActions for lint, gateway, features, etc
git ->>- vsc: Success
vsc -->>- dev: close
```
### Manual
The equivalent sequence of manual activity, non qaskx actions is as follows.
2023-07-23 11:57:08 +00:00
The **devops** file is still used. Without **devops** file you will
2023-07-23 11:45:31 +00:00
follow whatever your existing process is and recorded the necessary
details in various documents
The OpenAPI tool needs to be installed on the developer machine.
```mermaid
2023-08-02 12:55:02 +00:00
---
title: Client development task flow
---
2023-07-23 11:45:31 +00:00
sequenceDiagram
actor dev as Developer
participant vsc as Visual Studio Code
participant cmdb as CMDB
link vsc: Visual Studio @ https://code.visualstudio.com/
participant term as Terminal
participant git as Github
2023-07-23 11:57:08 +00:00
link git: GitHub @ https://github.com/meerkat-manor/devops
2023-07-23 11:45:31 +00:00
participant oas3f as OpenAPI file
2023-07-23 11:57:08 +00:00
participant devops as devops file
2023-07-23 11:45:31 +00:00
participant oas3 as OpenAPI tool
participant apip as API portal
2023-08-02 12:55:02 +00:00
Note over cmdb, vsc: Create new CMDB CI entry for Client
2023-07-23 11:45:31 +00:00
dev ->>+ cmdb: Access UI
2023-08-02 12:55:02 +00:00
cmdb -->> cmdb: Create CMDB CI entry
2023-07-23 11:45:31 +00:00
cmdb -->>- dev: Close, noting CI value
2023-07-23 11:57:08 +00:00
Note over git, devops: The devops file is stored in Git
2023-07-23 11:45:31 +00:00
dev ->>+ vsc: start IDE
Note over cmdb, vsc: Clone existing git for project
vsc ->>+ git :
git -->>- vsc : Cloned, project opened
2023-08-02 12:55:02 +00:00
vsc -) devops: Update CMDB CI entry
2023-07-23 11:45:31 +00:00
vsc ->>+ term: start
Note over git, oas3: Set generation parameters
term ->>+ oas3: Generate code cmd
oas3 ->>+ oas3f: Read
oas3f -->>- oas3: Contents
oas3 -->>- term: Success
term -->- vsc: close
vsc -) vsc: Update client code with defaults
vsc -) vsc: Manually write sequence diagrams
vsc -) vsc: Manually write Gateway infra
vsc -) vsc: Manually write feature flags
alt Register using API dependencies if not already done
2023-07-23 11:45:31 +00:00
dev ->>+ apip: Register as consuming APIs
2023-07-23 11:45:31 +00:00
apip -->>- dev: Registered
end
2023-07-23 11:57:08 +00:00
vsc -) devops: Manually update entries
2023-07-23 11:45:31 +00:00
vsc ->>+ git: Commit
git --) git: Trigger GitActions for lint, gateway, features, etc
git ->>- vsc: Success
vsc -->>- dev: Done
```
# End Status of flow
At the end of this flow the basic code stubs exist and have been committed
to Github. The code can execute and will return not implemented
response results if the client is a non UI, headless consumer of the API.
For clients that will have a UI, the code will not work as no UI coding is
expected to have been done.
# Reading Notes
For automation, some activities can be performed by GitActions calling
qaskx-cli.
2023-07-23 11:57:08 +00:00
The Visual Studio Code, CMDB and Github components can be substituted for
2023-07-23 11:45:31 +00:00
other software products such IntelliJ and Bitbucket.