Update Home

djmil 2024-05-27 15:50:58 +02:00
parent f1332b9c96
commit dc6b8c6b7b

96
Home.md

@ -1,49 +1,49 @@
# High Level Overview # High Level Overview
This project is focused on exploring Corda Application that will be managing rules of the Checkers game. This project is focused on exploring Corda Application that will be managing rules of the Checkers game.
It was decided to keep out of scope all Corda Cluster management tasks. As result, SpringBoot server *(which acts as a intermediary gateway between the world and a CordApp)* will be using solely default `admin` access rights. It was decided to keep out of scope all Corda Cluster management tasks. As result, SpringBoot server *(which acts as a intermediary gateway between the world and a CordApp)* will be using solely default `admin` access rights.
```mermaid ```mermaid
flowchart TD flowchart TD
ReactJS <--> SpringBoot ReactJS <--> SpringBoot
subgraph midleware subgraph midleware
direction LR direction LR
SpringBoot -.users.-U[(Hardcoded DB)] SpringBoot -.users.-U[(Hardcoded DB)]
end end
SpringBoot -- admin ---> C[(Corda)] SpringBoot -- admin ---> C[(Corda)]
C --- c1([Alice]) C --- c1([Alice])
C --- c2([Bob]) C --- c2([Bob])
C --- c3{Notary} C --- c3{Notary}
C --- c4([Kumar]) C --- c4([Kumar])
C --- c5([Charlie]) C --- c5([Charlie])
``` ```
Although it is possible to add MDM instance to the game, and enforce `users`, `groups`, `roles` and `permissions`. At the moment, the setup will be using set of default users, provided by CSDE. Although it is possible to add MDM instance to the game, and enforce `users`, `groups`, `roles` and `permissions`. At the moment, the setup will be using set of default users, provided by CSDE.
On a front end side, before initiating any interactions, a login credentials has to be provided. The name and a password of a user has to match SpringBoot hardcoded users, which on itself is a representation of set of predefined Corda users, aka `VirtualNode` names from Corda Cluster. Such a scheme, ensures that SpringBoot server will always know on behalf of which identity a given operation shall be performed (despite the fact that in reality it will be executed under `admin` role). On a front end side, before initiating any interactions, a login credentials has to be provided. The name and a password of a user has to match SpringBoot hardcoded users, which on itself is a representation of set of predefined Corda users, aka `VirtualNode` names from Corda Cluster. Such a scheme, ensures that SpringBoot server will always know on behalf of which identity a given operation shall be performed (despite the fact that in reality it will be executed under `admin` role).
# Major development milestones # Major development milestones
## Entities ## Entities
- [[ReactJs and SpringBoot]] - [[ReactJs and SpringBoot]]
Classic WebApp with ReactJS frontend and SpringBoot backend. Classic WebApp with ReactJS frontend and SpringBoot backend.
- [[CSDE|Corda Standard Dev Environment]] - [[Corda Standard Dev Environment|CSDE]]
CSDE will be hosting and enforcing Checkers game logic. CSDE will be hosting and enforcing Checkers game logic.
## Messaging ## Messaging
- [[Secure REST Client]] - [[Secure REST Client]]
Communication channel between SpringBoot server and CordApp. Communication channel between SpringBoot server and CordApp.
- [[Holding Identity short Hash]] - [[Holding Identity short Hash]]
A CordaCheckers end user shall be able to perform actions (to play the game) on behalf of his representation in Corda Cluster. This means, that SpringBoot middleware shall be able to authenticate REST requests from React app and translate them onto request aimed to concrete virtual node: Alice, Bob, Kumar, Charlie, etc. One way of doing this, is to have hardcoded set of users. But this is *boring*. Instead, SpringBoot middleware is going to dynamically obtain information about available virtual nodes (their `names` and `short hashes`) and dynamically register set of relevant front end users. A CordaCheckers end user shall be able to perform actions (to play the game) on behalf of his representation in Corda Cluster. This means, that SpringBoot middleware shall be able to authenticate REST requests from React app and translate them onto request aimed to concrete virtual node: Alice, Bob, Kumar, Charlie, etc. One way of doing this, is to have hardcoded set of users. But this is *boring*. Instead, SpringBoot middleware is going to dynamically obtain information about available virtual nodes (their `names` and `short hashes`) and dynamically register set of relevant front end users.
- Sequence diagrams - Sequence diagrams
A high level overview of an execution pass for major actions. A high level overview of an execution pass for major actions.
# TODOs # TODOs
- Use [jsonschema2pojo](https://github.com/joelittlejohn/jsonschema2pojo/tree/master/jsonschema2pojo-gradle-plugin) to generate POJO objects for SpringBoot server from REST API schemas provided by CSDE - Use [jsonschema2pojo](https://github.com/joelittlejohn/jsonschema2pojo/tree/master/jsonschema2pojo-gradle-plugin) to generate POJO objects for SpringBoot server from REST API schemas provided by CSDE