API Explorer II
Go to file
2026-01-14 13:00:46 +01:00
.github/workflows fix local build pipeline 2026-01-14 13:00:45 +01:00
.vscode WIP: API-Explorer-II 2023-03-29 23:22:33 +08:00
.zed OAuth2/OIDC 2025-12-02 14:26:19 +01:00
Dockerfiles fix backend docker build 2025-12-17 18:52:34 +01:00
public remove redundant js script 2025-05-21 19:34:25 +07:00
scripts ES modules 2025-12-11 20:44:07 +01:00
server VITE_OBP_SERVER_SESSION_PASSWORD corrected name 2026-01-14 13:00:46 +01:00
src cleanup multi provider 2026-01-14 13:00:46 +01:00
src-svelte Split dropdown of versions 2025-12-08 19:39:19 +01:00
.dockerignore container build pipeline 2024-05-14 11:02:58 +02:00
.env-docker.example add docker compose file 2024-12-10 14:28:42 +01:00
.env.example cleanup multi provider 2026-01-14 13:00:46 +01:00
.eslintrc.cjs REFACTOR: moved obp client to backend 2023-05-04 01:17:01 +08:00
.gitignore OAuth2/OIDC 2025-12-02 14:26:19 +01:00
.prettierrc.json WIP: API-Explorer-II 2023-03-29 23:22:33 +08:00
ai_env.example session timeout 2025-12-19 16:01:14 +01:00
auto-imports.d.ts README change and fixing Opey env.example and some debug messages at API Days with Nemo 2024-12-03 15:24:37 +01:00
components.d.ts components.d.ts previous 2026-01-14 13:00:45 +01:00
CONVERT_TO_SVELTE.md Svelte port doc 2025-12-02 14:32:39 +01:00
dockercompose.yml add docker compose file 2024-12-10 14:28:42 +01:00
env_ai cleanup multi provider 2026-01-14 13:00:46 +01:00
env.d.ts WIP: API-Explorer-II 2023-03-29 23:22:33 +08:00
IMPLEMENTATION-COMPLETE.txt Add implementation completion summary 2026-01-14 13:00:45 +01:00
index.html feature/Add copy/paste button for response body 2024-12-19 15:18:34 +01:00
jest.config.js streams WIP 2025-02-11 17:12:07 +00:00
MULTI-OIDC-FLOW-DIAGRAM.md Add multi-OIDC provider backend services 2026-01-14 13:00:45 +01:00
MULTI-OIDC-IMPLEMENTATION-STATUS.md Add implementation status document 2026-01-14 13:00:45 +01:00
MULTI-OIDC-PROVIDER-IMPLEMENTATION.md Add multi-OIDC provider backend services 2026-01-14 13:00:45 +01:00
MULTI-OIDC-PROVIDER-SUMMARY.md Add multi-OIDC provider backend services 2026-01-14 13:00:45 +01:00
MULTI-OIDC-TESTING-GUIDE.md Add comprehensive testing guide for multi-provider implementation 2026-01-14 13:00:45 +01:00
NOTICE Update NOTICE 2025-04-16 15:42:14 +02:00
OAUTH2-BEARER-TOKEN-IMPLEMENTATION.md OAuth2/OIDC 2025-12-02 14:26:19 +01:00
OAUTH2-DEPENDENCY-INJECTION-FIX.md OAuth2/OIDC 2025-12-02 14:26:19 +01:00
OAUTH2-IMPLEMENTATION-STATUS.md Add implementation status tracking document 2025-11-29 19:56:19 +01:00
OAUTH2-OIDC-INTEGRATION-PREP.md Add OAuth2/OIDC integration preparation documentation 2025-11-29 19:48:30 +01:00
OAUTH2-QUICK-START.md Add OAuth2/OIDC integration preparation documentation 2025-11-29 19:48:30 +01:00
OAUTH2-README.md Add OAuth2/OIDC integration preparation documentation 2025-11-29 19:48:30 +01:00
package-lock.json Glad you're happy! 2025-12-05 12:05:17 +01:00
package.json ES modules 2025-12-11 20:44:07 +01:00
playwright.config.ts basic opey integration tests 2025-03-26 17:44:25 +00:00
README.md move integration testing to full playwright framework 2025-03-26 12:59:39 +00:00
svelte.config.mjs Svelte drop downs for Version and Message Docs 2025-12-08 19:25:01 +01:00
tsconfig.app.json move integration testing to full playwright framework 2025-03-26 12:59:39 +00:00
tsconfig.json streaming WIP 2025-02-26 12:01:37 +00:00
tsconfig.node.json WIP: styling and authentication 2023-04-20 14:04:46 +08:00
tsconfig.server.json ES modules 2025-12-11 20:44:07 +01:00
tsconfig.vitest.json streaming WIP 2025-02-26 12:01:37 +00:00
vite.config.mts Svelte drop downs for Version and Message Docs 2025-12-08 19:25:01 +01:00
vitest.config.js fix tool messages not being found by ID 2025-03-26 19:03:26 +00:00
vitest.integration.config.js tool messages WIP and add integration test framework 2025-03-25 11:06:42 +00:00

Welcome to the OBP API Explorer II

ABOUT

This application is used to explore OBP APIs and interact with the data and services in the context of the logged in user.

This application will gradually replace the original API Explorer. Long live the API Explorer!

Install the Prerequisite Software

  • required: { node: >=16.14 }
  • required: { npm: >=8.0.0 }

Development Project Setup

  • Setup your .env file (see .env.example)
Install dependencies
yarn install

or

npm install
Compile and Hot-Reload for Development
yarn dev

or

npm run dev
Get a Consumer Key for the OBP-API

API Explorer needs a Consumer Key / Secret to access the Open Bank Project API with OAuth. To get this Consumer, go to the Portal of OBP-API, login and "Get a Consumer Key". The callback URL (if running locally) should be http://localhost:5173/api/callback Copy and paste the Consumer Key and Consumer Secret and add it to your .env file here. You can use .env.example as a basis of your .env file.

Testing

Unit tests are located in server/test and src/test.

Integration tests are located in src/test/integration

Run Unit Tests with Vitest
npm test
Run Integration Tests with Playwright
npx playwright test

or if you want a fancy testing UI to see what the browser is doing:

npx playwright test ui

Compile and Minify for Production

Build
npm run build
Build Server
npm run build-server
Start the backend server
npx ts-node <path-to-your-install>/server/app.js
Check the status of API-Explorer II back-end
Please find a message at a log file similar to this one:

Backend is running. You can check a status at http://localhost:8085/api/status

and use the link to check the status
Nginx deployment
server {
    # Frontend
    location / {
        root    /path_to_dist/dist;
        try_files $uri $uri/ /index.html;
    }
    
    # Proxy API
    location /api {
        proxy_pass http://localhost:8085;
    }
}

Note: if you have issues with session stickyness / login issues, enable #DEBUG=express-session in your .env and if you see messages like these in the log,

Dec 10 12:26:18 obp-sandbox node[1060160]: Tue, 10 Dec 2024 12:26:18 GMT express-session no SID sent, generating session
Dec 10 12:26:18 obp-sandbox node[1060160]: Tue, 10 Dec 2024 12:26:18 GMT express-session saving 5JIW_dx9CG8qs0OK4iv7Pn2Kg2huZuvQ
Dec 10 12:26:18 obp-sandbox node[1060160]: Tue, 10 Dec 2024 12:26:18 GMT express-session not secured
Dec 10 12:26:18 obp-sandbox node[1060160]: Tue, 10 Dec 2024 12:26:18 GMT express-session split response
Dec 10 12:26:18 obp-sandbox node[1060160]: Tue, 10 Dec 2024 12:26:18 GMT express-session saving -yf0uzAZf5mP9JVYov9oMR7CxQLnO4wm
Dec 10 12:26:18 obp-sandbox node[1060160]: Tue, 10 Dec 2024 12:26:18 GMT express-session not secured
Dec 10 12:26:18 obp-sandbox node[1060160]: Tue, 10 Dec 2024 12:26:18 GMT express-session no SID sent, generating session
Dec 10 12:26:18 obp-sandbox node[1060160]: Tue, 10 Dec 2024 12:26:18 GMT express-session saving nballQYMYZRn_HG0enM2RIPdv7GAdzJc
Dec 10 12:26:18 obp-sandbox node[1060160]: Tue, 10 Dec 2024 12:26:18 GMT express-session not secured
Dec 10 12:26:18 obp-sandbox node[1060160]: Tue, 10 Dec 2024 12:26:18 GMT express-session no SID sent, generating session
Dec 10 12:26:18 obp-sandbox node[1060160]: Tue, 10 Dec 2024 12:26:18 GMT express-session no SID sent, generating session

then make sure your NGINX config includes the $scheme:


proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

so that Node knows that the cookies have been sent securely over https.

Running Opey

If you want to run Opey locally you'll need to have a local instance running. The repo can be found here.

You will need to create a public-private key pair using open ssl (minimum 2048 bits).

  1. create the directory ./server/cert
mkdir ./server/cert
cd ./server/cert  
  1. Generate the public private key pair inside the ./server/cert directory
openssl genrsa -out private_key.pem 2048
openssl rsa -in private_key.pem -pubout -out public_key.pem
  1. Copy the public key to Opey top level directory
cp public_key.pem {path-to-your-opey-install}/

Building the frontend container

As the frontend environment is read at build time, we need to reprocess the values at container runtime. This is done here: Dockerfiles/prestart.go overwriting the values set here: Dockerfiles/frontend_build.env Any newly introduced environment variables should be added to the prestart.go and frontend_build.env files accordingly.

LICENSE

This project is licensed under the AGPL V3 (see NOTICE) and a commercial license from TESOBE.