FFDC Sample Web App Using FFDC Design System

November 30, 2021 ยท View on GitHub

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

Duplicate .env.template file and rename it it .env, 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

You will need to build both client and server

# Server build
npm run build:server

# Client build
npm run build


Optionnally, 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:

UserPassword
ffdcuser1123456
ffdcuser2123456

Environement variables

VariableDefault value
CLIENT_ID
CLIENT_SECRET
SESSION_SECRET
FFDC_URLhttps://api.fusionfabric.cloud
PORT3000
HOST
AUTHORIZATION_WELLKNOWN${FFDC_URL}/login/v1/sandbox/.well-known/openid-configuration
LOGOUT_URLhttps://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.