{"id":20176555,"url":"https://github.com/algoan/nestjs-bridge-connector","last_synced_at":"2025-04-10T04:11:00.797Z","repository":{"id":37798183,"uuid":"276345017","full_name":"algoan/nestjs-bridge-connector","owner":"algoan","description":"A NestJS Algoan connector for Bridge APIs","archived":false,"fork":false,"pushed_at":"2024-10-28T09:43:53.000Z","size":8670,"stargazers_count":4,"open_issues_count":14,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T05:26:31.544Z","etag":null,"topics":["algoan","backend","backend-connector","bridge","open-banking"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/algoan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-07-01T10:15:16.000Z","updated_at":"2024-10-28T09:43:58.000Z","dependencies_parsed_at":"2023-11-30T15:47:13.670Z","dependency_job_id":null,"html_url":"https://github.com/algoan/nestjs-bridge-connector","commit_stats":null,"previous_names":[],"tags_count":46,"template":false,"template_full_name":"algoan/nestjs-connector-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algoan%2Fnestjs-bridge-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algoan%2Fnestjs-bridge-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algoan%2Fnestjs-bridge-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algoan%2Fnestjs-bridge-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/algoan","download_url":"https://codeload.github.com/algoan/nestjs-bridge-connector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154988,"owners_count":21056543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algoan","backend","backend-connector","bridge","open-banking"],"created_at":"2024-11-14T02:09:57.781Z","updated_at":"2025-04-10T04:11:00.777Z","avatar_url":"https://github.com/algoan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.algoan.com/\" target=\"blank\"\u003e\u003cimg src=\"./assets/algoan_bridge.png\" alt=\"Algoan Logo\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Algoan NestJS Bridge connector\n\nA simple connector using [NestJS](https://github.com/nestjs/nest) framework to connect your service to [Bridge](https://bridgeapi.io/).\n\n## Table of contents\n\n- [About Algoan and Bridge](#about-algoan-and-bridge)\n- [Goal and Philosophy](#goal-and-philosophy)\n- [Listened Subscriptions](#listened-subscriptions)\n  - [Bankreader Link Required](#bankreader-link-required)\n  - [Bankreader required](#bankreader-required)\n- [Application Structure](#application-structure)\n- [Usage](#usage)\n  - [Requirements](#requirements)\n  - [Installation](#installation)\n  - [Running the app](#running-the-app)\n  - [Test](#test)\n  - [How to test locally](#how-to-test-locally)\n  - [How to configure](#how-to-configure)\n  - [Using Docker](#using-docker)\n- [Contributing](#contributing)\n  - [Instructions](#instructions)\n  - [Code Style](#code-style)\n- [Support](#support)\n\n## About Algoan and Bridge\n\n- [Algoan](https://www.algoan.com) helps companies to build the best open banking experience for credits. To see our products, please refer to our [official website](https://www.algoan.com)\n- [Bridge](https://bridgeapi.io/) is a French banking data aggregator for financial services.\n\n## Goal and Philosophy\n\nA [connector](https://developers.algoan.com/public/docs/algoan_documentation/chatbot_and_services/connectors.html) is a web software able to connect a provider to Algoan's API. It subscribes to [REST Hooks](https://developers.algoan.com/public/docs/algoan_documentation/resthooks_and_events/resthooks.html) which lets Algoan notifying the connector when a specific [event](https://developers.algoan.com/public/docs/algoan_documentation/resthooks_and_events/resthooks.html#resthook-events) happens.\n\nMore information on the [official documentation](https://developers.algoan.com).\n\nThe **`nestjs-bridge-connector`** focuses on a user bank accounts and transactions. The main goal of this connector is to be able to retrieve a user bank data when Algoan wishes to.\n\n## Listened Subscriptions\n\nThis section describes the process required for each subscription for a [Bank reader](https://developers.algoan.com/public/docs/algoan_documentation/resthooks_and_events/event_list.html#bank-reader) connector.\n\n### Bankreader Link Required\n\nThe Bridge user needs to be redirected to an external page. The diagram below describes interactions:\n\n![bankreader_link_required](assets/bankreader_link_required.png)\n\nRefers to the [`bankreader_link_required`](https://developers.algoan.com/public/docs/algoan_documentation/resthooks_and_events/event_list.html#bankreader_link_required) event.\n\n\n### Bankreader required\n\nWhen the user has finished the aggregation process, the connector has to retrieve user's banks accounts and transactions.\n\nRefers to the [`bankreader_required`](https://developers.algoan.com/public/docs/algoan_documentation/resthooks_and_events/event_list.html#bankreader_required) event.\n\n#### Redirection to Bridge user interface\n\n![bankreader_required](assets/bankreader_required_1.png)\n\n\n## Application Structure\n\n- `config/`: stores all configurations for the application. It uses [node-config-ts](https://github.com/tusharmath/node-config-ts) to generate a type definition of the `default.json` file.\n- `src/algoan/`: Algoan module getting your service accounts. It uses the [@algoan/rest](https://github.com/algoan/rest-nodejs) library.\n- `src/hooks/`: Entry point for your [RestHook](https://developers.algoan.com/public/docs/algoan_documentation/resthooks_and_events/resthooks.html) called by Algoan. It handles [events](https://developers.algoan.com/public/docs/algoan_documentation/resthooks_and_events/event_list.html) you've subscribed to.\n- `src/aggregator`: contains all API calls to Bridge. It also handles the mapping between Bridge and Algoan.\n- `test/`: contains e2e tests.\n\n## Usage\n\nHow to use locally this connector.\n\n### Requirements\n\nThis connector is a [Node.js](https://nodejs.org/en/) application available on [Docker Hub](#using-docker). Before reading further, you need to [download and install Node.js](https://nodejs.org/en/download/).\n\n### Installation\n\nClone the repository:\n\n```bash\n$ git clone https://github.com/algoan/nestjs-bridge-connector.git --depth=1\n```\n\nInstall all dependencies running:\n\n```bash\n$ npm i -g @nestjs/cli\n$ npm install\n```\n\n\u003e NestJS CLI must be installed globally because of a peer dependency conflict inclusing webpack versions and node-config-ts.\n\n### Running the app\n\n```bash\n# development\n$ npm run start\n\n# watch mode: will also run the fake-server app\n$ npm run start:dev\n\n# production mode\n$ npm run start:prod\n```\n\n### Test\n\n```bash\n# unit tests\n$ npm run test\n\n# e2e tests\n$ npm run test:e2e\n\n# test coverage\n$ npm run test:cov\n```\n\n### How to test locally\n\nTo test locally the Bridge process, a simple `index.html` file is rendered. To use it:\n\n- Create a `config/user/{process.env.USER}.json` file to override app configurations. _NOTE_: This application uses [node-config-ts](https://github.com/tusharmath/node-config-ts). See the [How to configure](#how-to-configure) section for further information.\n- Run `npm run start:dev`\n- Go to your favorite browser and navigate to http://localhost:4000. It should display a web page: \n\n![index_page](assets/index-page.png)\n\n- Click on the first button \"Launch Bridge redirection process\". It will create a new Banks User and triggers the hooks controller.\n- To be redirected to Bridge, click on the second button \"Redirect to Bridge\" . This will get your banks-user and redirect you to the Bridge redirect URL. If an alert appears, it means that the BanksUser has not been updated.\n\n### How to configure\n\nTo configure your application properly, here is a list of key to set:\n\n| Property name | Mandatory | Type | Description |\n|-|-|-|-|\n| `algoan` | Yes | _object_ | Algoan base configurations to retrieve service accounts |\n| `algoan.baseUrl` | Yes | _string_ | Algoan host URL |\n| `algoan.clientId` | Yes | _string_ | OAuth2 Client ID provided by Algoan |\n| `algoan.clientSecret` | Yes | _string_ | OAuth2 Client Secret provided by Algoan |\n| `bridge` | No | _object_| Bridge credentials if it is not set in your service account |\n| `bridge.baseUrl` | No | _string_ | Bridge sandbox URL |\n| `bridge.clientId` | No | _string_ | Bridge Client ID for the sandbox |\n| `bridge.clientSecret` | No | _string_ | Bridge Client secret for the sandbox |\n| `bridge.bankinVersion` | No | _string_ | Bankin version |\n| `targetUrl` | No | _string_ | Target URL for your resthook. See [the documentation](https://developers.algoan.com/public/docs/algoan_documentation/resthooks_and_events/resthooks.html#managing-your-resthook) for more information |\n| `eventList` | No | _array\u003cstring\u003e_ | Event List you want to subscribe to |\n| `restHooksSecret` | No | _string_ | Resthooks secrets ensuring that all calls are made by Algoan. See [the documentation](https://developers.algoan.com/public/docs/algoan_documentation/resthooks_and_events/resthooks.html#validating-resthook-events) for more information |\n| `port` | No | _number_ | Application networking port |\n| `customerIdPassword` | Yes | _string_ | Password used to encrypt the banks user identifier to authenticate to Bridge. **Ensure that your password is hidden in your production environment** |\n\n_NOTE_: Default values are defined in the [`config/default.json`](./config/default.json) file.\n\n### Using Docker\n\nIf you use a Docker environment, you can pull the latest version of the connector on [Algoan's docker hub registry](https://hub.docker.com/u/algoan).\n\n```bash\n$ docker pull algoan/nestjs-bridge-connector\n```\n\nThen run the application:\n\n```bash\n$ docker run -p 8080:8080 algoan/nestjs-bridge-connector\n```\n\nAs the docker image uses a production `NODE_ENV` and the [node-config-ts](https://github.com/tusharmath/node-config-ts) library, you need to create a `config/deployment/production.secret.json` file with your configurations or use environment variables:\n\n| Variable | Description |\n|-|-|\n| `ALGOAN_BASE_URL` | Algoan host to retrieve service accounts |\n| `ALGOAN_CLIENT_ID` | Client ID used to connect to Algoan |\n| `ALGOAN_CLIENT_SECRET` | Client Secret used to connect to Algoan |\n\n_Example_:\n\n```bash\n$ docker run -p 8080:8080 -e ALGOAN_BASE_URL=https://api.preprod.algoan.com \\ \n  -e ALGOAN_CLIENT_ID=test \\\n  -e ALGOAN_CLIENT_SECRET=password \\\n  algoan/nestjs-bridge-connector\n```\n\n_NOTE_: For security reasons, the `index.html` is not served in production environment.\n \n## Contributing\n\nWe would love to have your contribution, thank you for that! 🎉\n\nIf you want to add missing APIs, or correct an issue, you will have to follow this list of instructions.\n\n### Instructions\n\n- Set up your local environment by forking the repository.\n- When you are about to commit, [commitlint](https://github.com/conventional-changelog/commitlint) is running to check if your commit message respects [conventional commit](https://www.conventionalcommits.org/en/v1.0.0/).\n- Write tests, there is a high coverage on the repository. Simply run `npm run test:cov` to generate a `coverage/` directory.\n- Respect [coding style](#code-style). Run `npm run lint` to check if there are errors.\n- Open a Pull Request where you describe the feature/issue you are about to publish.\n\n### Code Style\n\nThis project uses [ESLint](https://eslint.org/) to analyze the TypeScript code. Commit are linted too thanks to [commitlint](https://github.com/conventional-changelog/commitlint) and the [conventional commit format](https://conventionalcommits.org/).\n\n## Support\n\nIf you need credentials for your service, please contact support@algoan.com.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgoan%2Fnestjs-bridge-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falgoan%2Fnestjs-bridge-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgoan%2Fnestjs-bridge-connector/lists"}