This is a full stack OCR application to retreive JSON format data from the Thai ID cards.
Makes use of the Google Cloud Vision Api for retreiving text from the images.
- Reactjs.
- Mongoose-- Mongodb object modelling.
- Mongodb as database.
- Express server.
- TailwindCss styling.
The application takes an image from the user, as an input. The image must follow the format, similar to that of a Thai Id card, images other than that may give unpredictable outputs. Results are shown in the JSON format, along with the number of success/failure operations happening.
- cd frontend
- run the command
npm install
- In the frontend folder add .env file in the following format---
VITE_PRODUCT_ID = <your_google_cloud_project_id_comes_here>
- In the frontend folder, src/utils go to origin.js change origin to
http://localhost:3000
- run the command
npm run dev
- cd backend
- run the command
npm install
- In the backend folder add a secret file of the json format obtained from google cloud vision api, which contains secret public/private key in json.
- In the backend folder add .env file in the following format---
PROJECT_ID = <your_google_cloud_project_id_comes_here>
SECRET_KEY_PATH = <secret_file_name>.json
uri = <mongodb_uri_connect_comes_here>
- run the command
npm run dev
note- The backend is deployed on Free tier of Render, so may take time to respond, kindly wait.