Test the Application

Before you deploy the application to the remote console, you can test the application on a local server and check if everything works using the Catalyst CLI. For detailed information on catalyst serve, refer to the Serve Resources help page.

To serve the Catalyst project locally, execute the following command from your project directory:

copy
$
catalyst serve

This will first compile the React app and then serve it. To know more about serving react applications, please refer to this page. The Document Processor application will now be served at default port 3000. The local endpoint URLs of the components will be displayed in the CLI.

react-compilation

Note : Every time you access the home page or any of the sub-pages of your client, or the function, the CLI will display a live log of the URL accessed, along with the HTTP request method.

You can now open the application in a browser using the local URL of the client displayed in the CLI and test it.

To test each of these, click on the required feature and upload an image file or a document file from your local system, then click Process Image. To test the Aadhaar functionality, you must upload two images of the front and the back of the Aadhaar card.

The extracted text in case of OCR, Aadhaar, Pan, Passbook, and Cheque will be displayed in the output panel in the JSON format. In the case of Barcode Scanner, the decoded information from the barcode will be displayed. Also note that, Pan and Aadhaar are identity proof documents specific to India region.

For OCR, the output will also contain a confidence score as a percentage value that represents the accuracy of information extraction and processing.

Note: The supported formats for input images are configured to be .jpeg, .jpg, and .png, and the maximum file size allowed is 10MB.
  • Cheque

cheque-test

  • PAN

pan-test

  • Passbook

passbook-test

  • Aadhaar

aadhar-test

  • Barcode Scanner

barcode-test

  • OCR

ocr-test

If this setup is working correctly, we can deploy the application to production.

You can quit the serve session in your terminal by executing the command to kill a running process, based on your OS.

Last Updated 2023-12-15 18:54:08 +0530 +0530

RELATED LINKS

Serve CLI Resources