MongoDB Schema
| No. | Field | Type | Description |
|---|---|---|---|
| 1 | kind | String/Enum | C = Citizen card D = Driver’s license P = Passport F = KITAS T = Tax card |
| 2 | identifier | String | NIK for KTP (Indonesian ID card), SIM card number, passport number, etc. depending on “kind” |
| 3 | name | String | |
| 4 | birthPlace | String | |
| 5 | birthDate | Date | |
| 6 | gender | String/Enum | M = Male F = Female |
| 7 | bloodType | String/Enum | A B O AB |
| 8 | address | String | |
| 9 | religion | String | |
| 10 | marriageStatus | String/Enum | S = Single M = Married V = Divorced W = Widowed |
| 11 | occupation | String | |
| 12 | nationalityCode | String | Example : Japan = JP |
| 13 | expiryDate | String | |
| 14 | facePhoto | Media | |
| 15 | cardImage | Media | |
| 16 | personWithCardPhoto | Media | |
| 17 | issuerCountryCode | String | Example : Japan = JP |
| 18 | issuerProvince | String | |
| 19 | issuerCity | String | |
| 20 | issuedDate | Date | |
| 21 | faceTop | Integer | |
| 22 | faceLeft | Integer | |
| 23 | faceWidth | Integer | |
| 24 | faceHeight | Integer | |
| 25 | statusCode | String/Enum | D = Draft (user hasn’t uploaded completely) U = User has uploaded, need verification P = Automatically filled by AI, not yet verified V = Verified by admin or by AI with high confidence T = Trusted (provides external or supporting evidence) R = Rejected |
| 26 | uploadedAt | Date | TimeStamp when uploaded to Strapi. This is set automatically by upload, cannot be changed. |
| 27 | extractedAt | Date | TimeStamp when extracted to AI program. This is set automatically by AI extractor, cannot be changed |
| 28 | verifiedAt | Date | TimeStamp after verified by the admin. An ID card reviewer can modify `statusCode`, and if statusCode becomes V/T, then verifiedAt is changed automatically to current time. |
ID card extractor docs : https://id-card-extractor.lovia.life/redoc
AWS S3 Storage
Files uploaded to ID Card Repository (Strapi) are stored in AWS S3 bucket media-app-staging.lovia.life (“samara” AWS account).
CORS Configuration
These files need to be downloadable by ID Card Review PWA, so bucket must have CORS configuration below (Buckets > Permissions > CORS). Reference: Using cross-origin resource sharing (CORS) | AWS S3.
[
{
"AllowedHeaders": [],
"AllowedMethods": [
"GET"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": []
}
]