/ffdc-sample-retail-webapp

Sample application using FFDC Design System for front-end and US Consumer Banking APIs (B2C)

Primary LanguageTypeScriptMIT LicenseMIT

Deploy to Azure Deploy to Heroku

FFDC Sample Web App Using FFDC Design System

This repository contains a sample application using FFDC Design System for front-end and FusionFabric.cloud for backend service.

Installation

  1. Clone this repository
git clone https://github.com/fusionfabric/ffdc-sample-retail-webapp.git
  1. Register FFDC application

You need to register an application on FusionFabric.cloud Developer Portal and select Account Information (US) - B2C API.

  1. Setup environment variables

Open .env file then add CLIENT_ID and CLIENT_SECRET of application created at step 2.

  1. Run npm install

Build

This application contains two applications, Angular Application and ExpressJs application. so you need to run two commands :

npm run build:server
npm run build

You can also run in watch mode.

npm run build:server:watch
npm run build -- --watch

To build Angular Application for production, use npm run build -- --prod

Running application

After building applications, now you can run it:

npm run start:server

or with debug mode

npm run start:server:debug

Go to http://localhost:3000 and enjoy demo application.

Credentials

For testing purpose, you can login with one of the following credentials:

User Password
ffdcuser1 123456
ffdcuser2 123456

Environement variables

Variable Default value
CLIENT_ID
CLIENT_SECRET
SESSION_SECRET
FFDC_URL https://api.fusionfabric.cloud
PORT 3000
HOST
AUTHORIZATION_WELLKNOWN ${FFDC_URL}/login/v1/sandbox/.well-known/openid-configuration
LOGOUT_URL https://login.microsoftonline.com/finastra.onmicrosoft.com/oauth2/v2.0/logout
ROOT_URL $HOST or http://localhost:${PORT}

License

These sample applications are released under the MIT License. See LICENSE for details.