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!
- required: { node:
>=16.14
} - required: { npm:
>=8.0.0
}
- Setup your .env file (see .env.example)
yarn install
or
npm install
yarn dev
or
npm run dev
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.
Run Unit Tests with Vitest
yarn test:unit
or
npm test:unit
npm run build
npm run build-server
npx ts-node <path-to-your-install>/server/app.js
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
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.
This project is licensed under the AGPL V3 (see NOTICE) and a commercial license from TESOBE.