Demo Application Setup
This guide demonstrates how to set up the sample demo Singpass Application built on React framework and Javascript API as server-side code.
To begin the setup, you’ll need to:
Step 1: Clone the Frontend Code of Sample Application
In Visual Studio Code, open a new terminal. Clone the Singpass Demo App Frontend repository.
Step 2: Navigate to the Project Directory
Once the project is created, open the cloned project directory.
Step 3: Install the Project Dependencies
Use
npm install
command to install the project dependencies.
Step 4: Run the React Application
Use
npm run start
command to run the React application. The application should be loaded up automatically through the web browser http://localhost:3000.com. The demo project calls the token endpoint through an external API hosted on a separate server.
Step 6: Clone the Server Side Code of the Sample Application
Open a new Visual Studio Code window, then open a new terminal. Clone the Singpass Demo App Sever Side Code repository.
Step 7: Deploy the Sample Application
Deploy both the frontend code and server-side code separately to your desired hosting platform. Refer to this simple guide on how to deploy a mobile/web application. The sample server-side code is hosted on Netlify as an API function, hence there is a Netlify folder created as per Netlify's requirement. You may need to refer to the documentation of the different hosting providers when deploying your application.
Next steps
Setup the JSON Web Key Store (JWKS)
If you already have it, proceed to configure Singpass Application