This repository represents a MyKad / MyKid webserver app which is written in NodeJS. The primary function of the app is to extract useful information using suitable card reader through OpenSC executable file. There probably no need for individual smartcard driver when using Microsoft Usbccid Smartcard Reader (WUDF) driver is installed.
Some of the information that can be extracted includes:
- name
- address1
- address2
- address3
- ic
- name2
- gender
- old_ic
- state
- nationality
- race
- religion
- city
- state
- postcode
The project compromise of the following folder/file:
/utils
- Contains the base functions to extract information,MyKad.js
andMyKid.js
./opensc
- Contains OpenSC executable file.
To set up the webserver locally, follow the steps below:
-
Clone this repository to your local machine.
-
Install NodeJS & NPM package manager to your computer. As writing, NodeJS v16.14.0 is used.
-
Install the required dependencies by running
npm install
in the project root directory.npm install
Once the installation is complete, you can start using the webserver app and its endpoints. You can use tools like Postman or any HTTP client to interact with the API.
-
Connect your card reader and insert a MyKad. This have been tested using following smart card reader:
- PS/SC CCID ISO7818 USB MyKad MyKid Reader by Admire IT Solutions - ACR39U Smart Card Reader by Advance Card System Ltd.
-
Start the webserver on local computer.
npm start
-
Make an RESTful API
POST
request atlocalhost:9090/api/smartcard/mykad
to fetch your MyKad details.