{"id":18624919,"url":"https://github.com/rhzs/serverless-ktp-ocr","last_synced_at":"2025-10-12T03:37:16.002Z","repository":{"id":36800529,"uuid":"163318999","full_name":"rhzs/serverless-ktp-ocr","owner":"rhzs","description":"Serverless Indonesian Identity E-KTP OCR with Google Cloud Platform (GCP) - Cloud Functions, Cloud Storage, and Cloud PubSub","archived":false,"fork":false,"pushed_at":"2023-07-11T23:20:19.000Z","size":528,"stargazers_count":76,"open_issues_count":13,"forks_count":24,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-05T11:06:20.904Z","etag":null,"topics":["cloud-functions","cloud-pubsub","cloud-storage","gcp","indonesia","ktp","nodejs","serverless","serverless-ktp-ocr"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhzs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-12-27T17:12:12.000Z","updated_at":"2025-02-24T20:59:17.000Z","dependencies_parsed_at":"2025-04-11T04:42:32.781Z","dependency_job_id":null,"html_url":"https://github.com/rhzs/serverless-ktp-ocr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rhzs/serverless-ktp-ocr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhzs%2Fserverless-ktp-ocr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhzs%2Fserverless-ktp-ocr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhzs%2Fserverless-ktp-ocr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhzs%2Fserverless-ktp-ocr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhzs","download_url":"https://codeload.github.com/rhzs/serverless-ktp-ocr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhzs%2Fserverless-ktp-ocr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010144,"owners_count":26084692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud-functions","cloud-pubsub","cloud-storage","gcp","indonesia","ktp","nodejs","serverless","serverless-ktp-ocr"],"created_at":"2024-11-07T04:31:56.342Z","updated_at":"2025-10-12T03:37:15.984Z","avatar_url":"https://github.com/rhzs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CodeFactor](https://www.codefactor.io/repository/github/rhzs/serverless-ktp-ocr/badge/master)](https://www.codefactor.io/repository/github/rhzs/serverless-ktp-ocr/overview/master)\n\n## Serverless Indonesian KTP OCR with GCP\n\nThis is reproducible work from [Ekstraksi Informasi e-KTP dengan Google Cloud Function dan Cloud Vision API](https://medium.com/@imrenagi/ekstraksi-informasi-e-ktp-dengan-google-cloud-function-dan-cloud-vision-api-4655db21d084). It also contains code fix to match with ES6 compliant module usages.\n\n### KTP OCR Architecture\n\n![Alt text](docs/arch.png?raw=true \"E-KTP OCR with GCP\")\n\n### Pre-requisites\n\n1. Google Cloud Account\n2. `gcloud` CLI\n3. Create New Google Cloud project `gcloud projects create ektp-ocr`\n4. Enable Google Cloud Functions `gcloud services enable cloudfunctions.googleapis.com`\n5. Enable Google Cloud Storage `gcloud services enable storage-api.googleapis.com` `gcloud services enable storage-component.googleapis.com`, create bucket name `uploaded_ktp`\n6. Enable Google Cloud PubSub `gcloud services enable pubsub.googleapis.com`, create topic name `ektp-text-extracted`\n7. Enable Google Cloud Vision [this link](console.cloud.google.com/flows/enableapi?apiid=vision.googleapis.com)\n\n### How to deploy\n\n1. Deploy HTTP\n\n```shell\n$ cd http-ktp\n$ npm i\n$ gcloud functions deploy http-ktp --entry-point uploadKtp --trigger-http\n```\n\n2. Deploy KTP Image Event Trigger\n\n```shell\n$ cd ktp-iamge-event-trigger\n$ npm i\n$ gcloud functions deploy processImageFromGCSEvent --trigger-resource uploaded_ektp --trigger-event google.storage.object.finalize\n```\n\n3. Deploy Extraction Data\n\n```shell\n$ gcloud functions deploy extract_ktp --runtime python37 --trigger-topic ektp-text-extracted\n```\n\n### Results\n\nView Stackdriver logs from `extract-ktp` function.\n\n### Love it?\n\nPlease support me by **stars* this Github repo. Thank you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhzs%2Fserverless-ktp-ocr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhzs%2Fserverless-ktp-ocr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhzs%2Fserverless-ktp-ocr/lists"}