This application provides sample code that showcases a working Frontend on top of our IB reference implementation. The example UI interacts with both the REST and WebSocket endpoints.
The application was built using React, Cloudscape Design System, and NextJS.
Requires Node.js 16.x+
git clone git@github.com:coinbase-samples/ib-frontend-js.git
Init via npm:
cd ib-frontend-js
npm install
Add the following environment variables to a .env file in base of the repository:
NX_PORT=8442
NX_HOST=Your_Port
NX_USERPOOL_ID=Your_Cognito_Pool_ID
NX_CLIENT_ID=Your_Cognito_Client_ID
NX_API_URL=http://localhost:8443
NX_WS_URL=ws://localhost:8443/ws?alias=
Your values will be pulled into constants.js
Validate the values contained in the .env file:
cd to packages/neoworks and run:
source .env
echo $NX_CLIENT_ID
npm run run:web
Navigate to localhost:{{yourPort}}. You should see the app running.
npm run build