smart-accounts-lib-ang

SmartAccountsLib

Usage no npm install needed!

<script type="module">
  import smartAccountsLibAng from 'https://cdn.skypack.dev/smart-accounts-lib-ang';
</script>

README

Backbase Accelerators Widget (Shared Library)

Technologies:

  • Angular 8
  • Bootstrap 4
  • Sass
  • PrimeNg
  • BackBase Design System
  • Ngx libraries

Last Version

  • 1.0.8

Setup:

To run this project, install it localy using npm:

$ npm i @aurel.nica/smart-accounts-lib-ang

Publish package to npmjs.com

  • Important! Change version in package.json and README.md from library folder.
$ npm run package:libs // create package (IMPORTANT it is private package)

$ cd dist/libs/smart-accounts-lib // navigate to

$ npm login // login with aurel.nica or dumitrutirsina both accounts had read/write rights

$ npm whoami // check if you are logged

$ npm publish // publish package to npm

Generate Data Modules using RAML files:

Zip with raml files from your PC:

$ ng generate @bb-cli/schematics:data-module --name consent-specification --ramlPath {path to api.raml file}/raml/consent-specification/api.raml
$ ng generate @bb-cli/schematics:data-module --name accounts-specification --ramlPath {path to api.raml file}/raml/accounts-specification/api.raml
$ ng generate @bb-cli/schematics:data-module --name transactions-specification --ramlPath {path to api.raml file}/raml/transactions-specification/api.raml
$ ng generate @bb-cli/schematics:data-module --name token-specification --ramlPath {path to api.raml file}/raml/token-specification/api.raml

Data Modules && API Services:

Data Modules:
* smart-accounts-lib -> consent-specification [Consent API Data Module] -> methods [postConsentRecordByBankName(), getAvailableBanks()]
* smart-accounts-lib -> accounts-specification [GetAccounts API Data Module] -> method [getAccountsRecordByBankName()]
* smart-accounts-lib -> transactions-specification [GetTransactions API Data Module] -> method [getAccountTransactionsRecordByAccountIdByBankName()]
* smart-accounts-lib -> token-specification [Token API Data Module] -> methods [postTokenRecordByBankName()]

API Services that are integrated in Widget Components:
* smart-accounts-lib -> api-services -> api-specification.service.ts -> methods:
    * getAvailableBanks()
    * postConsentRecordByBankName()
    * postTokenRecordByBankName()
    * getAccountsRecordByBankName()
    * getAccountTransactionsRecordByAccountIdByBankName()

Main Widget (smart-accounts-lib)

* smart-accounts-lib -> lib -> smart-accounts-lib.component.ts
* smart-accounts-lib -> lib -> smart-accounts-lib.module.ts

UI Components used in Main Widget

* smart-accounts-lib -> src -> lib -> bank-authorization [html, ts]
* smart-accounts-lib -> src -> lib -> bank-transactions-list [html, ts, pipe]
* smart-accounts-lib -> src -> lib -> dashboard [html, ts]
* smart-accounts-lib -> src -> lib -> new-bank [html, ts]

Application routes

routes: [
    { path: '', component: DashboardComponent, pathMatch: 'full'},
    { path: 'add-new-bank', component: NewBankComponent },
    { path: 'bank-auth', component: BankAuthorizationComponent },
    { path: 'transactions-list', component: BankTransactionsListComponent }
  ]