Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/lerna monorepo #123

Merged
merged 46 commits into from
May 19, 2020

Conversation

petermetz
Copy link
Member

@petermetz petermetz commented Mar 23, 2020

This is work in progress - not requesting a final review yet, but feedback is welcome already

Started writing some code that enables us to scale up development by way of having

  • Standardized way of defining and (automatically) documenting the REST API through the OpenAPI specification: https://swagger.io/specification/
  • as much automation as possible in all levels of the development flow
  • universal packages where applicable (e.g. works both in browser and NodeJS)
  • Typescript usage for better developer experience both for maintainers/contributors and people who will import BIF as a dependency for their project.
  • Built-in support in the API server to host a web application for a user friendly way of testing/monitoring/managing a consortium of BIF validator nodes (which are now just called as API server in the code)
  • declarative REST API definition that backs the SDK code generation (no time to write client and backend code every time we add or change an endpoint definition)
  • plugin architecture skeleton in place: it can load any npm package in place of the default implementations
  • high flexibility of the API server through both CLI and ENV variables and static configuration files. Once you define a new configuration parameter in the code, the validation of it is automated at runtime and it also automatically gets added to the help text of the API server binary.

Still working on a lot of things, but I believe it to be off to a good start here.
The idea is to incrementally shovel everything from connection-chain and core to this code base performing the mother of all merges in the process, something that we've been working on for months.

Off the top of my head these are still missing/being worked on:

  • adding connectors and a lot of other things (but the plugin mechanism is there already to support it).
  • Open ID Connect - pluggable, testable, embeddable identity provider (in memory data store)
  • Secure Web Host Isolation: certain endpoints can be cherry picked to be listening on a different TCP port which supports enterprise use-cases with complex, legacy firewall configurations.
  • pulling in the connection chain endpoints that manage end chain registration
  • connection chain escrow mechanism, in a plugin-enabled way
  • further develop the plugin interface of the ledger connectors to include the compilation and deployment of their own smart contracts that they depend on (e.g. in the case of core the smart contracts that hold the foreign validator nodes' public keys.

How to test (if you feel adventurous or want to help out)

  • checkout this branch
  • cd to the project root
  • npm run configure --- takes on a few minutes, or 20(!) on windows (but at least it works on windows)
  • at the end of the output of the previous command, there should be a message printed with a new command that can start the API server.
  • you should see a couple of messages on the terminal saying that the API is listening on port 3000 and the cockpit UI is accessible on port 4000

@ghost
Copy link

ghost commented Mar 23, 2020

There were the following issues with this Pull Request

  • Commit: 2a70e6b
    • ✖ message may not be empty
    • ✖ type may not be empty

You may need to change the commit messages to comply with the repository contributing guidelines.


🤖 This comment was generated by commitlint[bot]. Please report issues here.

Happy coding!

5 similar comments
@ghost
Copy link

ghost commented Apr 26, 2020

There were the following issues with this Pull Request

  • Commit: 2a70e6b
    • ✖ message may not be empty
    • ✖ type may not be empty

You may need to change the commit messages to comply with the repository contributing guidelines.


🤖 This comment was generated by commitlint[bot]. Please report issues here.

Happy coding!

@ghost
Copy link

ghost commented May 1, 2020

There were the following issues with this Pull Request

  • Commit: 2a70e6b
    • ✖ message may not be empty
    • ✖ type may not be empty

You may need to change the commit messages to comply with the repository contributing guidelines.


🤖 This comment was generated by commitlint[bot]. Please report issues here.

Happy coding!

@ghost
Copy link

ghost commented May 4, 2020

There were the following issues with this Pull Request

  • Commit: 2a70e6b
    • ✖ message may not be empty
    • ✖ type may not be empty

You may need to change the commit messages to comply with the repository contributing guidelines.


🤖 This comment was generated by commitlint[bot]. Please report issues here.

Happy coding!

@ghost
Copy link

ghost commented May 4, 2020

There were the following issues with this Pull Request

  • Commit: 2a70e6b
    • ✖ message may not be empty
    • ✖ type may not be empty

You may need to change the commit messages to comply with the repository contributing guidelines.


🤖 This comment was generated by commitlint[bot]. Please report issues here.

Happy coding!

@ghost
Copy link

ghost commented May 5, 2020

There were the following issues with this Pull Request

  • Commit: 2a70e6b
    • ✖ message may not be empty
    • ✖ type may not be empty

You may need to change the commit messages to comply with the repository contributing guidelines.


🤖 This comment was generated by commitlint[bot]. Please report issues here.

Happy coding!

@ghost
Copy link

ghost commented May 5, 2020

There were the following issues with this Pull Request

  • Commit: 2a70e6b
    • ✖ message may not be empty
    • ✖ type may not be empty
  • Commit: bf4e780
    • ✖ message may not be empty
    • ✖ type may not be empty

You may need to change the commit messages to comply with the repository contributing guidelines.


🤖 This comment was generated by commitlint[bot]. Please report issues here.

Happy coding!

@ghost
Copy link

ghost commented May 6, 2020

There were the following issues with this Pull Request

  • Commit: 2a70e6b
    • ✖ message may not be empty
    • ✖ type may not be empty
  • Commit: bf4e780
    • ✖ message may not be empty
    • ✖ type may not be empty
  • Commit: c4b1ae3
    • ✖ message may not be empty
    • ✖ type may not be empty

You may need to change the commit messages to comply with the repository contributing guidelines.


🤖 This comment was generated by commitlint[bot]. Please report issues here.

Happy coding!

@petermetz petermetz force-pushed the refactor/lerna-monorepo branch 3 times, most recently from aee10be to f55ff74 Compare May 14, 2020 18:02
Fixes hyperledger#43

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
The storage plugin has an example implementation here that is a dummy, in-memory implementation
which is useless in production environments but great for developer testing on a local machine.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
This is totally unsafe and unsuitable for a production
environment but can work well for single node developer
scenarios and demos.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
It is a universal package by design meaning that it works in the
browser and also in NodeJS which allows both the API server
and the cockpit to use the logger from the common package.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Also: performance improvement by using compression on the
API server and the front end web server as well.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
The OpenAPI spec is used to auto generate a cross-platform (universal) SDK that can be used to hit the REST API endpoints from both a browser and NodeJS environments.

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
…eric

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 15, 2021
tests

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 18, 2021
tests

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 18, 2021
tests

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 18, 2021
tests

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 19, 2021
tests

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 22, 2021
tests

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 22, 2021
tests

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 22, 2021
tests

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 22, 2021
tests

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 23, 2021
tests

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 23, 2021
tests

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 23, 2021
tests

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 23, 2021
tests

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 23, 2021
Fix warnings triggered by the strict flag. format the code according to
cactus/.prettierrc.js. minor fixes (mostly in log writing), dependency
injection for VerifierAuthentication.verify.

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 23, 2021
New jest test suite that checks the public interface of Verifier
component of cactus-cmd-socketio-server.

Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Dec 10, 2021
Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Dec 13, 2021
Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Dec 13, 2021
Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Dec 15, 2021
Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Dec 20, 2021
Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Dec 20, 2021
Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Dec 20, 2021
Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Dec 20, 2021
Closes: hyperledger#123
Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants